How to identify devices through BLE
ab853 last edited by ab853
I am trying to get my FiPy to detect when my mobile phone (an iPhone) is present, using Bluetooth LE.
Ideally, I would use unique identifier advertised by the phone. The broadcasted MAC address would be the obvious choice, but this randomly changes. Using the real MAC address of the phone also does not work.
As the phone is made by Apple, I believe it uses the iBeacon protocol, which should have a UUID. This should be in the
ADV_MANUFACTURER_DATAdata type, but the values in here are significantly shorter than those specified in the iBeacon protocol.
I’ve tried searching through GitLab and this forum to see if anyone has any examples of this working or for any alternative Bluetooth LE libraries to use on the PyCom device, but again, no luck.
So far I have been able to view the advertised data for BLE devices, connected (not paired) using their advertised MAC addresses and temperamentally list their services and characterstics. Apple devices showed some custom services in addition to the standard Bluetooth ones, but I couldn't find any way to identify what these were for.
tl;dr Is anyone able to offer any advice on how to successfully identify the presence of a specific mobile phone and if this is even possible with a PyCom board? Any help or pointers would be very much appreciated.
ab853 last edited by
@jcaron, ah, that is a shame - but thank you for letting me know. I was hoping this could be done passively, without having to build an iOS app.
Basically, I am trying to get the Pycom board to search through the advertising BLE devices on startup to determine if a specific one, my phone in this case, is present or not. Then the board will take one of two actions depending on if the phone is present or not.
In standard Bluetooth, there is the process of pairing, where two devices can in effect remember each other. I was hoping there would be an equivalent for BLE.
jcaron last edited by
@ab853 this is not Pycom-specific. Apple takes every possible measure to make sure this isn’t possible.
The only way you could do this would be if you had your own app running on the device advertising specific data, but even that can cause issues with Apple depending on the exact scenario.
What do you really want to do, ultimately?