AnsweredAssumed Answered

How to use bluez to connect the imx6dl controlled Bluetooth chip to mobile phone Bluetooth.

Question asked by weibin chi on Nov 6, 2019
Latest reply on Nov 11, 2019 by weibin chi

hello

      I want to use bluez to connect the imx6dl controlled Bluetooth chip to mobile phone Bluetooth.

      My current Linux BSP version is 3.14.38 ;

      The bluez version is 5.28, and now bluez has been ported to imx6dl.

 

      Test with bluez tool bluetoothctl。The phenomenon is as follows:  

 root@imx6qsabresd:/# bluetoothctl
[NEW] Controller AA:AA:AA:AA:AA:AA %h-%d [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# pair EC:D0:9F:A0:AC:42
Device EC:D0:9F:A0:AC:42 not available
[bluetooth]# scan on
Discovery started
[CHG] Device 7C:AB:9F:9F:1F:07 RSSI: -89
[NEW] Device EC:D0:9F:A0:AC:42 hongmi
[bluetooth]# pair EC:D0:9F:A0:AC:42
Attempting to pair with EC:D0:9F:A0:AC:42
[CHG] Device EC:D0:9F:A0:AC:42 Connected: yes
Request confirmation
[agent] Confirm passkey 335361 (yes/no): yes
[CHG] Device EC:D0:9F:A0:AC:42 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device EC:D0:9F:A0:AC:42 UUIDs:
00001105-0000-1000-8000-00805f9b34fb
0000110a-0000-1000-8000-00805f9b34fb
0000110c-0000-1000-8000-00805f9b34fb
0000110e-0000-1000-8000-00805f9b34fb
00001112-0000-1000-8000-00805f9b34fb
00001115-0000-1000-8000-00805f9b34fb
00001116-0000-1000-8000-00805f9b34fb
0000111f-0000-1000-8000-00805f9b34fb
0000112d-0000-1000-8000-00805f9b34fb
0000112f-0000-1000-8000-00805f9b34fb
00001132-0000-1000-8000-00805f9b34fb
00001200-0000-1000-8000-00805f9b34fb
00001800-0000-1000-8000-00805f9b34fb
00001801-0000-1000-8000-00805f9b34fb
[CHG] Device EC:D0:9F:A0:AC:42 Paired: yes
Pairing successful
[CHG] Device EC:D0:9F:A0:AC:42 Connected: no
[bluetooth]# connect EC:D0:9F:A0:AC:42
Attempting to connect to EC:D0:9F:A0:AC:42
Failed to connect: org.bluez.Error.Failed

 

Now I don't know what caused the connection error.

Outcomes