Bonjour,
Je développe une application qui est à l'écoute d'évènement bluetooth de device AND.
Il se trouve que sous Fedora 20 (utilisant la version 5 de bluez), le bluetooth et bluez sont non fonctionnelle sur ma machine (je précise et certifie qu'avec fedora 19, je n'ai aucun problème. Tout fonctionne à merveille).
J'utilise le device hci1 (une dongle bluetooth)
[root@localhost ~]# hciconfig -a
hci1: Type: BR/EDR Bus: USB
BD Address: 00:02:72:CC:97:CD ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN ISCAN
RX bytes:58948 acl:33 sco:0 events:789 errors:0
TX bytes:4671 acl:35 sco:0 commands:408 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'localhost.localdomain #2'
Class: 0x0c010c
Service Classes: Rendering, Capturing
Device Class: Computer, Laptop
HCI Version: 4.0 (0x6) Revision: 0x1000
LMP Version: 4.0 (0x6) Subversion: 0x220e
Manufacturer: Broadcom Corporation (15)
hci0: Type: BR/EDR Bus: USB
BD Address: 40:F0:2F:56:7E:85 ACL MTU: 1022:8 SCO MTU: 183:5
UP RUNNING
RX bytes:8791 acl:0 sco:0 events:256 errors:0
TX bytes:2228 acl:0 sco:0 commands:153 errors:0
Features: 0xff 0xfe 0x0d 0xfe 0xd8 0x7f 0x7b 0x8f
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: 'localhost.localdomain'
Class: 0x0c010c
Service Classes: Rendering, Capturing
Device Class: Computer, Laptop
HCI Version: 4.1 (0x7) Revision: 0x3101
LMP Version: 4.1 (0x7) Subversion: 0x1
Manufacturer: Atheros Communications, Inc. (69)
[root@localhost ~]# hcid^C
[root@localhost ~]#
[root@localhost ~]# sdptool browse local
Browsing FF:FF:FF:00:00:00 ...
Service RecHandle: 0x10000
Service Class ID List:
"PnP Information" (0x1200)
Profile Descriptor List:
"PnP Information" (0x1200)
Version: 0x0103
Browsing FF:FF:FF:00:00:00 ...
Service Search failed: Invalid argument
Service Name: Generic Access Profile
Service Provider: BlueZ
Service RecHandle: 0x10001
Service Class ID List:
"Generic Access" (0x1800)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 31
"ATT" (0x0007)
uint16: 0x0001
uint16: 0x0008
Service Name: Generic Attribute Profile
Service Provider: BlueZ
Service RecHandle: 0x10002
Service Class ID List:
"Generic Attribute" (0x1801)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 31
"ATT" (0x0007)
uint16: 0x0010
uint16: 0x0010
Service Name: AVRCP CT
Service RecHandle: 0x10003
Service Class ID List:
"AV Remote" (0x110e)
"AV Remote Controller" (0x110f)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 23
"AVCTP" (0x0017)
uint16: 0x0103
Profile Descriptor List:
"AV Remote" (0x110e)
Version: 0x0105
Service Name: AVRCP TG
Service RecHandle: 0x10004
Service Class ID List:
"AV Remote Target" (0x110c)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 23
"AVCTP" (0x0017)
uint16: 0x0103
Profile Descriptor List:
"AV Remote" (0x110e)
Version: 0x0104
Service Name: Audio Source
Service RecHandle: 0x10005
Service Class ID List:
"Audio Source" (0x110a)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 25
"AVDTP" (0x0019)
uint16: 0x0103
Profile Descriptor List:
"Advanced Audio" (0x110d)
Version: 0x0103
Service Name: Audio Sink
Service RecHandle: 0x10006
Service Class ID List:
"Audio Sink" (0x110b)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 25
"AVDTP" (0x0019)
uint16: 0x0103
Profile Descriptor List:
"Advanced Audio" (0x110d)
Version: 0x0103
Service Name: Generic Access Profile
Service Provider: BlueZ
Service RecHandle: 0x10007
Service Class ID List:
"Generic Access" (0x1800)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 31
"ATT" (0x0007)
uint16: 0x0001
uint16: 0x0008
Service Name: Generic Attribute Profile
Service Provider: BlueZ
Service RecHandle: 0x10008
Service Class ID List:
"Generic Attribute" (0x1801)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 31
"ATT" (0x0007)
uint16: 0x0010
uint16: 0x0010
Service Name: AVRCP CT
Service RecHandle: 0x10009
Service Class ID List:
"AV Remote" (0x110e)
"AV Remote Controller" (0x110f)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 23
"AVCTP" (0x0017)
uint16: 0x0103
Profile Descriptor List:
"AV Remote" (0x110e)
Version: 0x0105
Service Name: AVRCP TG
Service RecHandle: 0x1000a
Service Class ID List:
"AV Remote Target" (0x110c)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 23
"AVCTP" (0x0017)
uint16: 0x0103
Profile Descriptor List:
"AV Remote" (0x110e)
Version: 0x0104
Service Name: Audio Source
Service RecHandle: 0x1000b
Service Class ID List:
"Audio Source" (0x110a)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 25
"AVDTP" (0x0019)
uint16: 0x0103
Profile Descriptor List:
"Advanced Audio" (0x110d)
Version: 0x0103
Service Name: Audio Sink
Service RecHandle: 0x1000c
Service Class ID List:
"Audio Sink" (0x110b)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 25
"AVDTP" (0x0019)
uint16: 0x0103
Profile Descriptor List:
"Advanced Audio" (0x110d)
Version: 0x0103
Service Name: PWAccessP
Service Description: PW Access Point
Service Provider: Sirlan
Service RecHandle: 0x1000d
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 11
Voici le résultat d'autres commandes:
[root@localhost ~]# service bluetooth status
Redirecting to /bin/systemctl status bluetooth.service
bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since mer. 2014-05-07 15:39:06 CEST; 1h 6min ago
Docs: man:bluetoothd(8)
Main PID: 935 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─935 /usr/libexec/bluetooth/bluetoothd --compat
mai 07 16:30:05 localhost.localdomain bluetoothd[935]: No agent available for request type 2
mai 07 16:30:05 localhost.localdomain bluetoothd[935]: device_confirm_passkey: Operation not permitted
mai 07 16:36:15 localhost.localdomain bluetoothd[935]: No agent available for request type 2
mai 07 16:36:15 localhost.localdomain bluetoothd[935]: device_confirm_passkey: Operation not permitted
mai 07 16:36:30 localhost.localdomain bluetoothd[935]: No agent available for request type 2
mai 07 16:36:30 localhost.localdomain bluetoothd[935]: device_confirm_passkey: Operation not permitted
mai 07 16:38:33 localhost.localdomain bluetoothd[935]: No agent available for request type 2
mai 07 16:38:33 localhost.localdomain bluetoothd[935]: device_confirm_passkey: Operation not permitted
mai 07 16:39:12 localhost.localdomain bluetoothd[935]: No agent available for request type 2
mai 07 16:39:12 localhost.localdomain bluetoothd[935]: device_confirm_passkey: Operation not permitted
[root@localhost ~]#
[root@localhost ~]# dmesg |grep bluetooth
[ 10.503266] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler
[ 10.505200] toshiba_bluetooth: Re-enabling Toshiba Bluetooth
[root@localhost ~]#
[root@localhost ~]# lspci |grep bluetooth
Je n'arrive pas à pinger mon device local:
[root@localhost ~]# l2ping 00:02:72:CC:97:CD
Can't connect: Connection refused
[root@localhost ~]#
Voici les traces hcidump récupérées lorsque j'ai effectué la commande l2ping:
[root@localhost ~]# hcidump 00:02:72:CC:97:CD
HCI sniffer - Bluetooth packet analyzer ver 5.18
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 21
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:02:72:CC:97:CD
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr 00:02:72:CC:97:CD
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr 00:02:72:CC:97:CD
> HCI Event: IO Capability Request (0x31) plen 6
bdaddr 00:02:72:CC:97:CD
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
bdaddr 00:02:72:CC:97:CD capability 0x03 oob 0x00 auth 0x00
Capability: NoInputNoOutput (OOB data not present)
Authentication: No Bonding (No MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
IO Capability Request Reply (0x01|0x002b) ncmd 1
status 0x00 bdaddr 00:02:72:CC:97:CD
> HCI Event: IO Capability Response (0x32) plen 9
bdaddr 00:02:72:CC:97:CD capability 0x03 oob 0x00 auth 0x00
Capability: NoInputNoOutput (OOB data not present)
Authentication: No Bonding (No MITM Protection)
> HCI Event: User Confirmation Request (0x33) plen 10
bdaddr 00:02:72:CC:97:CD passkey 889358
< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6
bdaddr 00:02:72:CC:97:CD
> HCI Event: Command Complete (0x0e) plen 10
User Confirmation Request Reply (0x01|0x002c) ncmd 1
status 0x00 bdaddr 00:02:72:CC:97:CD
> HCI Event: Simple Pairing Complete (0x36) plen 7
status 0x05 bdaddr 00:02:72:CC:97:CD
Error: Authentication Failure
> HCI Event: Auth Complete (0x06) plen 3
status 0x05 handle 21
Error: Authentication Failure
> HCI Event: Vendor (0xff) plen 7
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 21 reason 0x13
Reason: Remote User Terminated Connection
J'ai notamment l'erreur suivante: '" Error: Authentication Failure"
Je précise avoir installé tout les paquets bluez* et hidapi.
Voici le résultat de la commande rfkill:
[root@localhost ~]# rfkill list
0: nfc0: NFC
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
3: hci1: Bluetooth
Soft blocked: no
Hard blocked: no
[root@localhost ~]#
Auriez vous une idée du problème ?,
En vous remerciant pour votre retour.