Search code examples
iosbluetoothbluetooth-lowenergyios-bluetooth

Why do Bluetooth classic and LE device get same name on iOS?


I have got an iphone and a peripheral. I am building the peripheral. The peripheral has the bluetooth classic name "FOO". In the LE advertisement the name is "LE FOO".

A BLE Explorer app on the iphone detects the peripheral with the name "LE FOO". After opening a BLE connection via app, the pairing menu also shows the device. So far so good.

Now suddenly the one entry changes from "LE FOO" to "FOO" and I have two devices with the same name! Why?

And moreover: How do I prevent that? I know that this is possible, because I have got a third party device which can have two different names for LE and classic. But how?

Any ideas?

Thank you.


Solution

  • The hint by Emil got me on the right track:

    In the LE advertisement the name was "LE FOO". Thus, the iPhone showed the correct name at first. After establishing the connection, iOS automatically asks for the device name characteristic in background. This characteristic returned "FOO" instead of "LE FOO".

    So to say a bug on my side. The callback for this characteristic was implemented manually with the wrong constant.