I've got a custom BLE 4.1 device and I'm trying to connect it to Raspberry PI 3 B+ using hcitool, gatttool, bluetoothctl, ..., without success.
The device is an NRF BLE chip with the Nordic UART Service.
So far what I got is:
- The device shows up in a "hcitool lescan"
- bluez does all the connection attempts, seems to connect but disconnects immediately afterwards
- hci0 (raspberry pi) fails equally to two other dongles (hci1, hci2)
- Pairing fails as well
- Connecting from ESP32 - arduino works fine
- bluetoothd is already started with --experimental -d
- NRFConnect on an android phone works just fine
Output of hcitool:
pi@raspberrypi:~ $ sudo hcitool -i hci0 lescan
LE Scan ...
FD:B8:73:ED:6B:CD
pi@raspberrypi:~ $ sudo hcitool -i hci0 cc
FD:B8:73:ED:6B:CD Can't create connection: Input/output error
Output of btmon:
@ RAW Op
en: hcitool (privileged) version 2.22 {0x0006} [hci0] 35.351116
< HCI Command: Create Connection (0x01|0x0005) plen 13 [hci0] 35.351195
Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Packet type: 0xcc18
DM1 may be used
DH1 may be used
DM3 may be used
DH3 may be used
DM5 may be used
DH5 may be used
Page scan repetition mode: R2 (0x02)
Page scan mode: Mandatory (0x00)
Clock offset: 0x0000
Role switch: Allow slave (0x01)
> HCI Event: Command Status (0x0f) plen 4 [hci0] 35.351618
Create Connection (0x01|0x0005) ncmd 1
Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11 [hci0] 40.475007
Status: Page Timeout (0x04)
Handle: 11
Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0003} [hci0] 40.475087
BR/EDR Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Status: Connect Failed (0x04)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0005} [hci0] 40.475087
BR/EDR Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Status: Connect Failed (0x04)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0004} [hci0] 40.475087
BR/EDR Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Status: Connect Failed (0x04)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0002} [hci0] 40.475087
BR/EDR Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Status: Connect Failed (0x04)
@ MGMT Event: Connect Failed (0x000d) plen 8 {0x0001} [hci0] 40.475087
BR/EDR Address: FD:B8:73:ED:6B:CD (OUI FD-B8-73)
Status: Connect Failed (0x04)
@ RAW Close: hcitool {0x0006} [hci0] 40.476108
output of bluetoothd:
Mar 28 11:56:01 raspberrypi bluetoothd[3884]: src/adapter.c:connect_failed_callback() hci0 FD:B8:73:ED:6B:CD status 4
Mar 28 11:56:01 raspberrypi bluetoothd[3884]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr FD:B8:73:ED:6B:CD type 0 status 0x4
Mar 28 11:56:01 raspberrypi bluetoothd[3884]: src/adapter.c:resume_discovery()
What can I do to debug this? Anybody who had the same problems?