I have an embedded linux device I am attempting to set up a bluetooth stack on. I am using the TI CC2564b dual mode bluetooth chip. Of course, Bluez is the first choice for embedded linux.
The problem is that most of what I am seeing out there for troubleshooting my issues is to upgrade to Bluez 5.xx. As you may know, Bluez 5 and greater requires linux kernel 3.5 to work with BLE.
The link below even states that 3.5 is required for BLE period.
I am able to do lescans
, and can even pair with some devices using gatttool
, however I have been completely unsuccessful at pairing with THE peripheral I am trying to get to work.
When I try to connect, I get the following HCIDump:
ACL data: handle 1025 flags 0x02 dlen 6
SMP: Security Request (0x0b)
auth req 0x01
ACL data: handle 1025 flags 0x00 dlen 6
SMP: Pairing Failed (0x05), reason 0x05, Reason Pairing Not Supported
Can anyone tell me if there is something I am missing, or if Bluez 4.101 with Linux 3.2 is just not going to cut it?
On another note, I know the peripheral can be paired, as I have done it with my laptop running Ubuntu 12.10 (Kernel 3.5, Bluez 4.101). I have made sure my hciconfig -a matches almost exactly.
Thanks!
Edit:
It looks like I am able to connect to some LE devices, but not others depending on whether or not they are over an encrypted connection. The following happens when I try to enable encryption with hciconfig
:
root@am335x-neptune:~# hciconfig hci0 encrypt
Can't set encrypt on hci0: Invalid request code (56)