How do I make Raspberry Pi 3 discoverable for iOS and CoreBluetooth?

Jeremiah Jessel picture Jeremiah Jessel · Jun 20, 2016 · Viewed 8.5k times · Source

I have a Raspberry Pi 3 and I am trying to make it discoverable for iOS devices. I ran sudo hciconfig hci0 piscan to make it discoverable. I can see it with my iMac.

On iOS, I am using CoreBluetooth and running a scan for nearby devices. I can discover several FitBit devices and my iMac, but the Raspberry Pi is not showing up.

Is there another setting that I have to enable for Bluetooth LE discoverability? Is the Raspberry Pi 3 compatible with iOS for bluetooth connectivity?

Thanks in advance. I appreciate any help with this.

Answer

Jeremiah Jessel picture Jeremiah Jessel · Jun 21, 2016

After much research and some help from a Twitter friend, to enable the LE broadcast you have to use one of the following commands.

sudo hciconfig hci0 leadv 0
sudo hciconfig hci0 leadv 3

The 0 indicates connectable.

The 3 indicates non connectable.