Hello,
I have connected USB bluetooth dongle with i.mx6 sabre-sd board. I have built the YOCTO which bluez4 support by default enabled. After bootup the imx6 board, I have used following command to verify bluetooth functionality. ( I have enabled the Bluetooth support in Linux kernel 3.10.17 ).
hciconfig -a
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:15:A3:10 ACL MTU: 339:8 SCO MTU: 128:2
UP RUNNING
RX bytes:1347 acl:0 sco:0 events:48 errors:0
TX bytes:204 acl:0 sco:0 commands:48 errors:0
Features: 0xff 0x3e 0x85 0x30 0x18 0x18 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: ''
Class: 0x000104
Service Classes: Unspecified
Device Class: Computer, Desktop workstation
HCI Version: 2.0 (0x3) Revision: 0xc5c
LMP Version: 2.0 (0x3) Subversion: 0xc5c
Manufacturer: Cambridge Silicon Radio (10)
hciconfig hci0 up
hcitool scan
Scanning ...
78:1F:DB:B9:87:4F Galaxy S4
Above commands make sure that I am able to detect the my android device. Now I have tried to pair my android phone with bluetooth dongle connected with i.mx6 board. I have used following command to do this:
rfcomm connect rfcomm0 78:1F:DB:B9:87:4F 2 &
On issuing this command, my android phone ask for the passkey. I have entered the default passkey "0000" or "1234" but it did not work for me and show below error in linux kernel
[1] 1976
root@imx6qsabresd:~# Can't connect RFCOMM socket: Operation now in progress
^C
[1]+ Done rfcomm connect rfcomm0 78:1F:DB:B9:87:4F 2
Is there anything missing to enable the bluetooth support ? Is there any help for passkey ?
One more thing, I have also tried to replace the bluez4 with bluez5 in YOCTO build and for that I have modified the local configuration file with below change :
CORE_IMAGE_EXTRA_INSTALL += "libedit bluez5"
But in build I got errors not able to build the image. Error is like below:
error: Can't install bluez4-4.101-r5@cortexa9_vfp_neon: conflicted package bluez5-5.7-r0@cortexa9_vfp_neon is locked
Does anyone has done task to add support for the bluez5 in YOCTO build?
Thanks,
Ajay-
Hi,
I have connected bluetooth dongle in imx6.
by Bluetoothctl command I am trying to scan.
scan on ---------> worked succesfully
pair 99:ss:e3:44:r4:88 --------> paired succesfully
connect 99:ss:e3:44:r4:88 --------> Failed to connect: org.bluez.Error.Failed.
but i am tring to ping ----> l2ping 99:ss:e3:44:r4:88 ----> pinged successfully.
Failed to connect: org.bluez.Error.Failed. -----------------> how to resolve this error
Hi,
Have you tried to change the hcid.conf file?
It is probable that you have a different configuration and the passkey is different.
hcid.conf(5): config file for hcid Bluetooth - Linux man page
/Alejandro
Hello,
Thanks for the feedback.
There is no hcid.conf file at /etc/bluetooth location.
I have also tried some other approaches. I have installed the bluez5 in YOCTO build along with its tools like simple-agent and used following commands to pair the bluetooth dongle connected with i.mx6 board with my samsung s4.
hciconfig -a
hciconfig hci0 up
/usr/lib/bluez5/bluetooth/bluetoothd -d &
bluetoothctl
power on
agent on
default-agent
scan on // This finds my mobile as bluetooth device. ( 78:1F:DB:B9:87:4F )
pair 78:1F:DB:B9:87:4F
// For this command I got the authentication error every time and not able to pair the device.
Thanks,
Ajay-
Hai,
I also paried successfully ,
But in connect a2:ee:44:77:gg:99 facing error: org.bluez.error
how to resolve?
Hi,
Just to narrow down the issue I wonder if you can follow the next document:
You will need a bluetooth dongle.
/Alejandro