BlueZ auf ich.MX25 : Can ' T connect RFCOMM socket: Operation now in progress
Ich versuche, eine Verbindung zu einem bluetooth-Gerät auf embedded linux.
- BlueZ-version 4.101.
- Lokale bluetooth-adapter ist ein USB-Bluetooth-dongle Trendnet TBW-107UB, für alle tests.
- Kann ich nicht bieten details über das Zielgerät, wie es ist ein Produkt der Firma in der ich arbeite, sorry.
Mithilfe der beschriebenen Methode an
auf dieser Seite funktioniert auf Desktop-Linux Mint 17 x64, und auf RiotBoard (ich.MX6) Linaro Ubuntu.
Jedoch kann ich nicht eine ich.MX25-board (embedded benutzerdefinierte Linux) Verbindung zum Ziel-Gerät. Nur Scannen funktioniert.
rfcomm.conf
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:07:80:5A:48:93;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Example Bluetooth device";
}
hciconfig -a output
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:44:39:E2 ACL MTU: 384:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:28633 acl:0 sco:0 events:204 errors:0
TX bytes:899 acl:0 sco:0 commands:60 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'Bluetooth2.1+EDR CLASS1'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 2.1 (0x4) Revision: 0x149c
LMP Version: 2.1 (0x4) Subversion: 0x149c
Manufacturer: Cambridge Silicon Radio (10)
rfcomm connect-Ausgabe
# rfcomm connect 0
Can't connect RFCOMM socket: Operation now in progress
hcitool cc-Ausgabe
# hcitool cc 00:07:80:5A:48:93
Can't create connection: Connection timed out
l2ping Ausgabe
# l2ping 00:07:80:5A:48:93
Can't connect: Invalid exchange
Während google Suche, die nur die relevanten thread, die ich finden konnte deutet darauf hin, dass der rfcomm connect-Ausgabe könnte sein, aufgrund einer kernel 2.6.27 regression, aber mir ist 3.10.28 (verwendet uname -r).
Ich habe versucht, mit zwei anderen Ziel-bluetooth-Geräte (verschiedener Art), das problem bleibt das gleiche.
Jede Hilfe ist willkommen, danke!
Bearbeiten
Rfkill block /unblock nicht scheinen, etwas zu ändern.
InformationsquelleAutor Vincent T | 2015-05-19
Du musst angemeldet sein, um einen Kommentar abzugeben.
Es stellt sich heraus das Zielgerät war die Authentifizierung angefordert von meinem ich.MX25-board.
In der Regel, PIN-code-handling erfolgt über die bluetooth-agent.
Doch dieser agent war nicht wirklich installiert auf dem board (ich dachte, es war...), also musste ich manuell die erforderlichen PIN-code.
Dies ist, wie ich es gemacht habe :
00:15:83:44:39:E2 ist der lokale bluetooth-Gerät-Adresse.
00:07:80:5A:48:93 ist das Ziel-bluetooth-Gerät-Adresse.
045678 Ziel Geräte-PIN-code.
l2ping funktioniert :
rfcomm-Verbindung funktioniert :
Update 06.15.2015
Heute habe ich versucht l2ping auf das Zielgerät wieder, wie zuvor beschrieben. Für einige Grund, es zu werfen würde mir ein "Permission denied" - Fehler.
Dies ist, was ich herausfand, als workaround :
InformationsquelleAutor Vincent T