Issue
I just started learning the ionic framework and I am working with BLE libraries.
I can scan for other BLE devices and get thier information when I run it on an Android phone (physical). The response look something like this...
'name': 'Device Name',
'id': 'DC:A6:32:D9:56:15',
'advertising': {},
'rssi': -35
link to documentation of BLE https://ionicframework.com/docs/v3/native/ble/
I was able to do the same thing on IOS BUT the MAC address/ID looks like this...
88C4BC81-E67F-E804-03C3-47E4296F577D
It looks like a serial number. Can someone please explain to me why?
I look at different encoding and such but no luck. To be honest I do not know what the right question is to ask.
Thank you for your help. Sorry if this question is not clear.
Solution
The "MAC address/ID" on iOS is not a MAC address. You're reading the identifier
property. That's a UUID created by the phone. It's generally consistent for a given device, but may change over time (though never during a single connection, and they don't generally change that often).
There is no way to get the MAC address of a CBPeripheral on iOS. There is no way to uniquely identify a BLE device on iOS in a way that is consistent across iOS devices, or that is promised to be permanent on a single iOS device.
Answered By - Rob Napier
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.