Ich verwende einen RPI 3, welchen ich mit einem Arduino Mega über Bluetooth verbinden möchte. Hierfür verwende ich das HC-05 Modul, welches ich am Arduino angeschlossen habe.
Im Terminal habe ich folgende Befehle eingegeben um die Verbindung aufzubauen:
Code
bluetoothctl
Agent registered
[bluetooth]# scan on
[CHG] Device 98:D3:61:FD:43:40 RSSI: -50
[bluetooth]# scan off
Discovery stopped
[CHG] Device 98:D3:61:FD:43:40 RSSI is nil
[bluetooth]# pair 98:D3:61:FD:43:40
Attempting to pair 98:D3:61:FD:43:40
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]# trust 98:D3:61:FD:43:40
Changing 98:D3:61:FD:43:40 trust scceeded
[bluetooth]# connect 98:D3:61:FD:43:40
Attempting to connect 98:D3:61:FD:43:40
[CHG] Device 98:D3:61:FD:43:40 Connected: yes
[CHG] Device 98:D3:61:FD:43:40 ServicesResolved: yes
Failed to pair: org.bluez.Error.NotAvailable
[CHG] Device 98:D3:61:FD:43:40 Connected: no
[CHG] Device 98:D3:61:FD:43:40 ServicesResolved: no
[bluetooth]# info 98:D3:61:FD:43:40
Device 98:D3:61:FD:43:40 (public)
Name: HC-05
Alias: HC-05
Class: 0*00001f00
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: yes
UUID: Serial Port (00001101-0000-1000-8000-00805f9b34fb)
Display More
Warum tritt dieser Fehler beim connecten auf? Anscheinend sind die Geräte kurzzeitig verbunden und trennen sich dann wieder.