简体   繁体   中英

CoreBluetooth: How to obtain Bluetooth MAC address of BLE device I'm connected to?

Is there a particular service and characteristic that I can read from a BLE device that will provide its MAC address? I've tried reading the Serial Number in the blind hope that it was the MAC (from the Device Info), but attempting to do so seems to give an error. I'm coding this for iOS, but if iOS is blocking my good-natured desire to obtain data, I'd be willing to dump it and move to Android.

您无法使用iOS上的Core Bluetooth获取设备MAC地址。

If you have control of the BlE accessory,you can add a MAC address to your advertisementData,so that you can get the MAC address even without connectting.
But since you can always get your BlE accessory's UUID,why bother use MAC address instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM