• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BLE pairing problems with bluez 5.50
#1
Dear community,

I encounter problems pairing BLE devices with the NetPi using the current Bluetooth Docker image (https://hub.docker.com/r/hilschernetpi/netpi-bluetooth). As BLE device I'm using a Bosch XDK (Bluetooth 4.2/BLE) with BLE tutorial example. No security ("Just Works") is used for pairing. Other BT 4.2 or 5.0 device I tried had the same issues. 

Here's what I did:

"hcitool device" shows that the BT RF device is available ("hci0   B8:27:EB:A4:D7:88")

"dmesg" shows no errors or warnings, Bluetooth configuration looks fine
   

In "bluetoothctl"
- default agent is on, BT device is on
- "list" correctly shows the BT RF device ("Controller B8:27:EB:A4:D7:88 BlueZ 5.50 [default]")
- "scan on" correctly lists all available BT devices around, also the Bosch XDK ("Device FC:D6:BD:10:27:10")
- I trust the device: "trust FC:D6:BD:10:27:10"
- "pair FC:D6:BD:10:27:10" at first seems to work: "[CHG] Device FC:D6:BD:10:27:10 Connected: yes", the device's services and characteristics are displayed. 
- But after seconds, the device is disconnected: "Failed to pair: org.bluez.Error.AuthenticationCanceled"
   

"dmesg" now shows error "Bluetooth: SMP security requested but not available"
   

The same device pairs, connects and runs nicely with iOS or Android phones using free BLE tools as "LightBlue". 

Happy to read your ideas! 

-Alexander
  Reply
#2
Hello Alex,

I did a quick paring test with our bluetooth container and my iPhone X. I have not had any better device than this.

I started bluetoothctrl utility as you did but I called "pairable on" command first of all to enable pairing mode. Maybe this was missing in your setup.


Code:
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# pair F4:06:16:8D:DC:1D
Attempting to pair with F4:06:16:8D:DC:1D
[CHG] Device F4:06:16:8D:DC:1D Connected: yes
Request confirmation
[agent] Confirm passkey 128855 (yes/no): yes
[CHG] Device F4:06:16:8D:DC:1D Paired: yes
Pairing successful
[CHG] Device F4:06:16:8D:DC:1D Connected: no
[CHG] Device F4:06:16:8D:DC:1D Connected: yes
[CHG] Device F4:06:16:8D:DC:1D Connected: no
[CHG] Device F4:06:16:8D:DC:1D Connected: yes
[CHG] Device F4:06:16:8D:DC:1D Connected: no
[bluetooth]#

So when I called the pairing command afterwards my iPhone was asking me for the passcode 12855 (and the pairing command too as you can see in the code section) to confirm and after I did that the pairing succeeded. On the iPhone bluetooth settings dialog I saw now a device "BlueZ 5.50" beeing connected ... after a while it was disconnecting.

Since I have no real application running on my netPI talking to the iPhone over bluetooth right now the connection will to state "Connected: no" after some seconds. When I click on my iPhone to connect to device paired "BlueZ 5.50" again the state changes to "Connected: yes" for a short time and so on.

For me everything works fine right now.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Access problems Azzamjj 8 8,409 January-25th-2019, 07:43 AM
Last Post: Armin@netPI
  OS Booting Problems. ObIvan007 1 2,594 June-12th-2018, 06:18 AM
Last Post: Armin@netPI
  Problems with NTP setup adeeljsid 4 4,393 March-17th-2018, 06:42 AM
Last Post: Armin@netPI
  bluez version on netPi Thomas 20 15,547 November-10th-2017, 08:25 AM
Last Post: Thomas

Forum Jump:


Users browsing this thread: 1 Guest(s)