Bluetooth Pairing inconsistency

We are using image version “2.7” (Linux / Kernel 4.1.xx) on the Colibri iMX6S. We are trying to pair a bluetooth device (printer) using Linux bluetoothctl utility. The device’s security link was setup as DISPLAY ONLY. We performed the pairing procedure several times and got different results. Sometimes it asked to enter PIN code like the following

root@colibri-imx6:~# bluetoothctl
[NEW] Controller 00:1A:7D:DA:71:13 colibri-imx6 [default]
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device 00:16:A4:0E:D2:2B BT Printer
[bluetooth]# pair 00:16:A4:0E:D2:2B
Attempting to pair with 00:16:A4:0E:D2:2B
[CHG] Device 00:16:A4:0E:D2:2B Connected: yes
[CHG] Device 00:16:A4:0E:D2:2B Connected: no
[CHG] Device 00:16:A4:0E:D2:2B Connected: yes
Request PIN code
[agent] Enter PIN code:

Sometimes it asked to enter “yes” or “No” for confirmation like the following.

root@colibri-imx6:~# bluetoothctl
[NEW] Controller 00:1A:7D:DA:71:13 colibri-imx6 [default]
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[NEW] Device 00:16:A4:0E:D2:2B BT Printer
[bluetooth]# pair 00:16:A4:0E:D2:2B
Attempting to pair with 00:16:A4:0E:D2:2B
[CHG] Device 00:16:A4:0E:D2:2B Connected: yes
Request confirmation
[agent] Confirm passkey 290018 (yes/no):   

The above pairing was performed with a Bluetooth 4.0 USB dongle. We then tried a Bluetooth 2.1 one and have not seen the pairing inconsistency problem. Below is a log of “lsusb” command showing correct device for the BT 4.0 dongle.

root@colibri-imx6:~# lsusb
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Any idea of why we are getting 2 different pairing modes randomly with BT 4.0 Dongle? How can this problem be fixed?

Thank you.
William

Hi @wjzhang

Could you update to the Bsp 2.8b6 and check if you still have this Issue?

Thanks and best regards,
Jaski