bluetooth-console
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
bluetooth-console [2020/09/20 17:48] – benny | bluetooth-console [2024/06/09 10:29] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 5: | Zeile 5: | ||
===== Kompatible/ | ===== Kompatible/ | ||
Die im hier Artikel aufgeführten Ausgaben/ | Die im hier Artikel aufgeführten Ausgaben/ | ||
+ | Die AOS Release Notes enhalten jeweils aktuelle Angaben zu den unterstützen OmniSwitch Modellen. | ||
^ Produkt/ | ^ Produkt/ | ||
| Belkin USB BT 4.0 | 8.7.280.R01 (OS6465T-P12) | | Belkin USB BT 4.0 | 8.7.280.R01 (OS6465T-P12) | ||
+ | |||
+ | ===== Schritte am OmniSwitch ===== | ||
<WRAP center round info 60%> | <WRAP center round info 60%> | ||
- | In AOS Release 8.7 ist Bluetooth bei eingestecktem USB-Bluetooth-Adapter standardmäßig aktiv! TODO: Prüfen ab welchem AOS Release dies der Fall war! | + | In AOS Release 8.7 ist Bluetooth bei eingestecktem USB-Bluetooth-Adapter standardmäßig aktiv! |
</ | </ | ||
- | < | + | === Kein USB-BT-Adapter eingesteckt |
- | VINDHYA #-> lsusb -vvv | + | |
- | Bus 001 Device 002: ID 050d:065a <-- der Belkin Bluetooth Adapter | + | |
- | Bus 001 Device 001: ID 1d6b:0002 | + | |
- | </ | + | |
- | + | ||
- | * Kein Adapter eingesteckt | + | |
< | < | ||
Router-> show bluetooth status | Router-> show bluetooth status | ||
Zeile 29: | Zeile 26: | ||
| | ||
</ | </ | ||
- | * USB-Adapter eingesteckt | + | === USB-BT-Adapter |
< | < | ||
Router-> show bluetooth status | Router-> show bluetooth status | ||
Zeile 38: | Zeile 35: | ||
----------+--------------------------- | ----------+--------------------------- | ||
| | ||
- | </ | ||
- | |||
- | * Ausgabe in dmesg | ||
- | < | ||
- | [1183593.649609] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002 | ||
- | [1183593.649651] orion-ehci f1050000.usb: | ||
- | [1183593.649682] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s | ||
- | [1183593.803626] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 | ||
- | [1183593.923627] usb 1-1: new full-speed USB device number 2 using orion-ehci | ||
- | [1183593.961247] usb 1-1: skipped 1 descriptor after interface | ||
- | [1183593.962243] usb 1-1: default language 0x0409 | ||
- | [1183593.965227] usb 1-1: udev 2, busnum 1, minor = 1 | ||
- | [1183593.965245] usb 1-1: New USB device found, idVendor=050d, | ||
- | [1183593.965259] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 | ||
- | [1183593.965271] usb 1-1: Product: BCM20702A0 | ||
- | [1183593.965282] usb 1-1: Manufacturer: | ||
- | [1183593.965294] usb 1-1: SerialNumber: | ||
- | [1183593.966059] usb 1-1: usb_probe_device | ||
- | [1183593.966078] usb 1-1: configuration #1 chosen from 1 choice | ||
- | [1183593.967259] usb 1-1: adding 1-1:1.0 (config #1, interface 0) | ||
- | [1183593.984447] btusb 1-1:1.0: usb_probe_interface | ||
- | [1183593.984469] btusb 1-1:1.0: usb_probe_interface - got id | ||
- | [1183593.987218] usb 1-1: adding 1-1:1.1 (config #1, interface 1) | ||
- | [1183593.991362] usb 1-1: adding 1-1:1.2 (config #1, interface 2) | ||
- | [1183593.995804] usb 1-1: link qh1-0e01/ | ||
- | [1183594.009198] btusb 1-1:1.2: usb_probe_interface | ||
- | [1183594.009224] btusb 1-1:1.2: usb_probe_interface - got id | ||
- | [1183594.009371] usb 1-1: adding 1-1:1.3 (config #1, interface 3) | ||
- | [1183594.014470] btusb 1-1:1.3: usb_probe_interface | ||
- | [1183594.014494] btusb 1-1:1.3: usb_probe_interface - got id | ||
- | [1183594.014653] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002 | ||
- | [1183595.188361] usb 1-1: unlink qh1-0e01/ | ||
- | [1183595.189628] usb usb1: clear tt buffer port 1, a2 ep2 t04048d80 | ||
- | [1183595.268571] orion-ehci f1050000.usb: | ||
- | [1183595.268599] usb 1-1: link qh1-0e01/ | ||
- | </ | ||
- | * Herausfinden welches BT-Device im OmniSwitch verwendet wird | ||
- | < | ||
- | VINDHYA #-> hcitool dev | ||
- | Devices: | ||
- | hci0 00: | ||
- | VINDHYA #-> | ||
- | |||
</ | </ | ||
Zeile 91: | Zeile 45: | ||
pi@powerpi: | pi@powerpi: | ||
Scanning ... | Scanning ... | ||
- | 00:02:72:CD:73:47 Router | + | 00:02:72:XX:YY:ZZ Router |
</ | </ | ||
Zeile 97: | Zeile 51: | ||
< | < | ||
- | pi@powerpi: | + | pi@powerpi: |
Requesting information ... | Requesting information ... | ||
- | BD Address: | + | BD Address: |
OUI Company: CC&C Technologies, | OUI Company: CC&C Technologies, | ||
Device Name: Router | Device Name: Router | ||
Zeile 126: | Zeile 80: | ||
< | < | ||
- | pi@powerpi: | + | pi@powerpi: |
Service Name: Serial Port | Service Name: Serial Port | ||
Service Description: | Service Description: | ||
Zeile 149: | Zeile 103: | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | Wichtig ist im rfcomm-Kommando die Angabe von **-r** für **RAW**, da man sonst jede Menge **^J**-Steuerzeichen im Konsolenprogramm sieht! | + | Wichtig ist im **rfcomm**-Kommando die Angabe von **-r** für **RAW**, da man sonst jede Menge **^J**-Steuerzeichen im Konsolenprogramm sieht! |
</ | </ | ||
- | === Exemplarische Ausgabe wenn " | ||
- | < | ||
- | ^J | ||
- | |||
- | ^J^J | ||
- | ^J | ||
- | |||
- | ^J^J | ||
- | ^J | ||
- | |||
- | ^J^J | ||
- | ^J | ||
- | |||
- | ^JLogin incorrect | ||
- | Router login: | ||
- | </ | ||
=== Verbindung vom Raspberry Pi zum ALE OmniSwitch aufbauen === | === Verbindung vom Raspberry Pi zum ALE OmniSwitch aufbauen === | ||
< | < | ||
- | pi@powerpi: | + | pi@powerpi: |
- | Connected / | + | Connected / |
Press CTRL-C for hangup | Press CTRL-C for hangup | ||
</ | </ | ||
- | |||
- | <WRAP center round tip 60%> | ||
- | Tipp: Aufgrund von einem Bug in einer der beteiligten Komponenten in Raspbian / Bluez oder rfcomm, empfehle ich immer erst die rfcomm-Verbindung mit STRG-C zu beenden und danach **screen** oder **minicom**! (Siehe die Sektion zu Fehlermeldungen für Details und Links zu diesem Thema!) | ||
- | </ | ||
=== Verbindung via " | === Verbindung via " | ||
Zeile 203: | Zeile 137: | ||
< | < | ||
pi@powerpi: | pi@powerpi: | ||
- | rfcomm0: DC: | + | rfcomm0: DC: |
+ | </ | ||
+ | |||
+ | ===== Weitere Details und Fehlerbehebung zum Raspberry Pi ===== | ||
+ | Hier sammle ich mögliche Fehlermeldung(en) sowie die Lösung. | ||
+ | |||
+ | ==== " | ||
+ | |||
+ | Rollt im Terminal **^J** in **screen** oder **minicom**, | ||
+ | |||
+ | === Exemplarische Ausgabe === | ||
+ | < | ||
+ | ^J | ||
+ | |||
+ | ^J^J | ||
+ | ^J | ||
+ | |||
+ | ^J^J | ||
+ | ^J | ||
+ | |||
+ | ^J^J | ||
+ | ^J | ||
+ | |||
+ | ^JLogin incorrect | ||
+ | Router login: | ||
+ | </ | ||
+ | |||
+ | === Lösung: " | ||
+ | < | ||
+ | sudo rfcomm -r connect hci0 00: | ||
+ | </ | ||
+ | |||
+ | ==== Fehlermeldung: | ||
+ | Zu dieser Fehlermeldung kam es bei mir in unregelmäßigen Abständen. Es hat geholfen in diesem Fall die lokale Bluetooth-Konfiguration zurückzusetzen (das sollte man aber vor dem copy/paste genau prüfen, in meinem Fall hängt bei mir nichts essentielles am BT-Stack). Damit werden Einstellungen und der Cache gelöscht! | ||
+ | < | ||
+ | sudo rm -rf / | ||
+ | </ | ||
+ | |||
+ | ==== Fehlermeldung: | ||
+ | Diese Fehlermeldung hatte ich regelmäßig nachdem ich erst **screen** oder **minicom** beendet habe und danach die **rfcomm**-Verbindung. In diesem [[https:// | ||
+ | < | ||
+ | sudo hciconfig hci0 reset | ||
</ | </ | ||
Zeile 209: | Zeile 184: | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | Eventuell muss das Programm hcidump noch installiert werden: sudo apt install bluez-hcidump | + | Eventuell muss das Programm |
</ | </ | ||
Zeile 217: | Zeile 192: | ||
device: hci0 snap_len: 1500 filter: 0xffffffff | device: hci0 snap_len: 1500 filter: 0xffffffff | ||
< HCI Command: Create Connection (0x01|0x0005) plen 13 | < HCI Command: Create Connection (0x01|0x0005) plen 13 | ||
- | bdaddr 00:02:72:CD:73:47 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000 | + | bdaddr 00:02:72:XX:YY:ZZ ptype 0xcc18 rswitch 0x01 clkoffset 0x0000 |
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 | Packet type: DM1 DM3 DM5 DH1 DH3 DH5 | ||
> HCI Event: Command Status (0x0f) plen 4 | > HCI Event: Command Status (0x0f) plen 4 | ||
Create Connection (0x01|0x0005) status 0x00 ncmd 1 | Create Connection (0x01|0x0005) status 0x00 ncmd 1 | ||
> HCI Event: Connect Complete (0x03) plen 11 | > HCI Event: Connect Complete (0x03) plen 11 | ||
- | status 0x00 handle 11 bdaddr 00:02:72:CD:73:47 type ACL encrypt 0x00 | + | status 0x00 handle 11 bdaddr 00:02:72:XX:YY:ZZ type ACL encrypt 0x00 |
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2 | < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2 | ||
handle 11 | handle 11 | ||
Zeile 240: | Zeile 215: | ||
handle 11 slots 5 | handle 11 slots 5 | ||
< HCI Command: Remote Name Request (0x01|0x0019) plen 10 | < HCI Command: Remote Name Request (0x01|0x0019) plen 10 | ||
- | bdaddr 00:02:72:CD:73:47 mode 2 clkoffset 0x0000 | + | bdaddr 00:02:72:XX:YY:ZZ mode 2 clkoffset 0x0000 |
> HCI Event: Command Status (0x0f) plen 4 | > HCI Event: Command Status (0x0f) plen 4 | ||
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1 | Remote Name Request (0x01|0x0019) status 0x00 ncmd 1 | ||
> HCI Event: Remote Name Req Complete (0x07) plen 255 | > HCI Event: Remote Name Req Complete (0x07) plen 255 | ||
- | status 0x00 bdaddr 00:02:72:CD:73:47 name ' | + | status 0x00 bdaddr 00:02:72:XX:YY:ZZ name ' |
< HCI Command: Authentication Requested (0x01|0x0011) plen 2 | < HCI Command: Authentication Requested (0x01|0x0011) plen 2 | ||
handle 11 | handle 11 | ||
Zeile 250: | Zeile 225: | ||
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1 | Authentication Requested (0x01|0x0011) status 0x00 ncmd 1 | ||
> HCI Event: Link Key Request (0x17) plen 6 | > HCI Event: Link Key Request (0x17) plen 6 | ||
- | bdaddr 00:02:72:CD:73:47 | + | bdaddr 00:02:72:XX:YY:ZZ |
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6 | < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6 | ||
- | bdaddr 00:02:72:CD:73:47 | + | bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: Command Complete (0x0e) plen 10 | > HCI Event: Command Complete (0x0e) plen 10 | ||
Link Key Request Negative Reply (0x01|0x000c) ncmd 1 | Link Key Request Negative Reply (0x01|0x000c) ncmd 1 | ||
- | status 0x00 bdaddr 00:02:72:CD:73:47 | + | status 0x00 bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: IO Capability Request (0x31) plen 6 | > HCI Event: IO Capability Request (0x31) plen 6 | ||
- | bdaddr 00:02:72:CD:73:47 | + | bdaddr 00:02:72:XX:YY:ZZ |
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9 | < HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9 | ||
- | bdaddr 00:02:72:CD:73:47 capability 0x03 oob 0x00 auth 0x00 | + | bdaddr 00:02:72:XX:YY:ZZ capability 0x03 oob 0x00 auth 0x00 |
Capability: NoInputNoOutput (OOB data not present) | Capability: NoInputNoOutput (OOB data not present) | ||
Authentication: | Authentication: | ||
> HCI Event: Command Complete (0x0e) plen 10 | > HCI Event: Command Complete (0x0e) plen 10 | ||
IO Capability Request Reply (0x01|0x002b) ncmd 1 | IO Capability Request Reply (0x01|0x002b) ncmd 1 | ||
- | status 0x00 bdaddr 00:02:72:CD:73:47 | + | status 0x00 bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: IO Capability Response (0x32) plen 9 | > HCI Event: IO Capability Response (0x32) plen 9 | ||
- | bdaddr 00:02:72:CD:73:47 capability 0x01 oob 0x00 auth 0x00 | + | bdaddr 00:02:72:XX:YY:ZZ capability 0x01 oob 0x00 auth 0x00 |
Capability: DisplayYesNo (OOB data not present) | Capability: DisplayYesNo (OOB data not present) | ||
Authentication: | Authentication: | ||
> HCI Event: User Confirmation Request (0x33) plen 10 | > HCI Event: User Confirmation Request (0x33) plen 10 | ||
- | bdaddr 00:02:72:CD:73:47 passkey 276893 | + | bdaddr 00:02:72:XX:YY:ZZ passkey 276893 |
< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6 | < HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6 | ||
- | bdaddr 00:02:72:CD:73:47 | + | bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: Command Complete (0x0e) plen 10 | > HCI Event: Command Complete (0x0e) plen 10 | ||
User Confirmation Request Reply (0x01|0x002c) ncmd 1 | User Confirmation Request Reply (0x01|0x002c) ncmd 1 | ||
- | status 0x00 bdaddr 00:02:72:CD:73:47 | + | status 0x00 bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: Simple Pairing Complete (0x36) plen 7 | > HCI Event: Simple Pairing Complete (0x36) plen 7 | ||
- | status 0x00 bdaddr 00:02:72:CD:73:47 | + | status 0x00 bdaddr 00:02:72:XX:YY:ZZ |
> HCI Event: Link Key Notification (0x18) plen 23 | > HCI Event: Link Key Notification (0x18) plen 23 | ||
- | bdaddr 00:02:72:CD:73:47 key E37EA95B6739FB99DFA63A45226CA428 type 4 | + | bdaddr 00:02:72:XX:YY:ZZ key E37EA95B6739FB99DFA63A45226CA428 type 4 |
Type: Unauthenticated Combination Key | Type: Unauthenticated Combination Key | ||
> HCI Event: Auth Complete (0x06) plen 3 | > HCI Event: Auth Complete (0x06) plen 3 | ||
Zeile 518: | Zeile 493: | ||
</ | </ | ||
+ | ===== Details zum OmniSwitch mit AOS R8 ===== | ||
- | ====== Copy/Paste / Notizen & Co ====== | + | ==== Ausgabe von " |
+ | < | ||
+ | VINDHYA #-> lsusb -vvv | ||
+ | Bus 001 Device 002: ID 050d:065a <-- der Belkin Bluetooth Adapter | ||
+ | Bus 001 Device 001: ID 1d6b:0002 | ||
+ | </ | ||
- | <WRAP center round tip 60%> | + | ==== Ausgabe in " |
- | Wird irgendwann entsorgt, aber besser haben als brauchen. ;) | + | Meldungen in **dmesg** wenn der USB-BT-Adapter eingesteckt wird. |
- | </ | + | |
- | + | ||
- | + | ||
- | <WRAP center round tip 60%> | + | |
- | Bisher ist das nur mein copy/paste Ziel hier, also nicht nicht final formatiert. | + | |
- | </ | + | |
- | + | ||
- | TODO/ | + | |
- | * Kompatible Adapter: Ich habe einen Belkin "Mini Bluetooth v4.0 Adapter" | + | |
- | * In AOS 8.7.280.R1 ist Bluetooth standardmäßig "admin enabled" | + | |
- | * Prüfen welche Plattformen BT unterstützen und hier aufführen | + | |
- | * OS6465T-P12 unterstützt es zumindest schon einmal, davon stammen die Ausgaben in diesem Artikel | + | |
- | + | ||
- | ==== Optional: Installation von bettercap auf dem Raspberry Pi ==== | + | |
- | + | ||
- | <WRAP center round tip 60%> | + | |
- | Mag irgendwie meinen Pi nicht, stelle dies für den Moment zurück | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | Ich nutze Raspbian Buster und die Installation erfolgt wie folgt: | + | |
< | < | ||
- | sudo apt install build-essential ruby-dev libpcap-dev | + | Router-> su |
- | sudo gem install bettercap | + | Entering maintenance shell. Type 'exit' |
- | pi@powerpi: | + | VINDHYA #-> dmesg |
- | | + | |
- | | |__ ___| |_| |_ ___ _ __ ___ __ _ _ __ | + | |
- | | '_ \ / _ \ __| __/ _ \ '__/ __/ _` | '_ \ | + | |
- | | |_) | __/ |_| || __/ | | (_| (_| | |_) | | + | |
- | |_.__/ \___|\__|\__\___|_| | + | |
- | |_| v1.6.2 | + | |
- | http:// | + | |
... | ... | ||
+ | [1183593.649609] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002 | ||
+ | [1183593.649651] orion-ehci f1050000.usb: | ||
+ | [1183593.649682] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s | ||
+ | [1183593.803626] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 | ||
+ | [1183593.923627] usb 1-1: new full-speed USB device number 2 using orion-ehci | ||
+ | [1183593.961247] usb 1-1: skipped 1 descriptor after interface | ||
+ | [1183593.962243] usb 1-1: default language 0x0409 | ||
+ | [1183593.965227] usb 1-1: udev 2, busnum 1, minor = 1 | ||
+ | [1183593.965245] usb 1-1: New USB device found, idVendor=050d, | ||
+ | [1183593.965259] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 | ||
+ | [1183593.965271] usb 1-1: Product: BCM20702A0 | ||
+ | [1183593.965282] usb 1-1: Manufacturer: | ||
+ | [1183593.965294] usb 1-1: SerialNumber: | ||
+ | [1183593.966059] usb 1-1: usb_probe_device | ||
+ | [1183593.966078] usb 1-1: configuration #1 chosen from 1 choice | ||
+ | [1183593.967259] usb 1-1: adding 1-1:1.0 (config #1, interface 0) | ||
+ | [1183593.984447] btusb 1-1:1.0: usb_probe_interface | ||
+ | [1183593.984469] btusb 1-1:1.0: usb_probe_interface - got id | ||
+ | [1183593.987218] usb 1-1: adding 1-1:1.1 (config #1, interface 1) | ||
+ | [1183593.991362] usb 1-1: adding 1-1:1.2 (config #1, interface 2) | ||
+ | [1183593.995804] usb 1-1: link qh1-0e01/ | ||
+ | [1183594.009198] btusb 1-1:1.2: usb_probe_interface | ||
+ | [1183594.009224] btusb 1-1:1.2: usb_probe_interface - got id | ||
+ | [1183594.009371] usb 1-1: adding 1-1:1.3 (config #1, interface 3) | ||
+ | [1183594.014470] btusb 1-1:1.3: usb_probe_interface | ||
+ | [1183594.014494] btusb 1-1:1.3: usb_probe_interface - got id | ||
+ | [1183594.014653] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002 | ||
+ | [1183595.188361] usb 1-1: unlink qh1-0e01/ | ||
+ | [1183595.189628] usb usb1: clear tt buffer port 1, a2 ep2 t04048d80 | ||
+ | [1183595.268571] orion-ehci f1050000.usb: | ||
+ | [1183595.268599] usb 1-1: link qh1-0e01/ | ||
</ | </ | ||
+ | ==== Herausfinden welcher USB-BT-Adapter im OmniSwitch verwendet wird ==== | ||
+ | Um herauszufinden welche MAC-Adresse der USB-BT-Adapter im OmniSwitch verwendet, werden folgende Kommandos verwendet. | ||
+ | |||
+ | < | ||
+ | Router-> su | ||
+ | Entering maintenance shell. Type ' | ||
+ | VINDHYA # | ||
+ | VINDHYA #-> hcitool dev | ||
+ | Devices: | ||
+ | hci0 00: | ||
+ | VINDHYA #-> | ||
+ | </ |
bluetooth-console.1600624100.txt.gz · Zuletzt geändert: 2024/06/09 10:29 (Externe Bearbeitung)