![](/img/trans.png)
[英]Android BLE : Retrieve service UUID in onLeScan() callback when advertised from iOS Peripheral
[英]Get UUID of BLE IOS Peripheral, not service UUID
如何從外圍設備端獲取UUID。 不是廣告包裝中的服務UUID。
讓我們從中央看:
- (void)centralManager:(CBCentralManager *)central
didDiscoverPeripheral:(CBPeripheral *)peripheral
advertisementData:(NSDictionary *)advertisementData
RSSI:(NSNumber *)RSSI
我需要的是UUID出peripheral.identifier
,不包括的那些advertisementData
。 我可以從中央獲取它們,但是我也需要從外圍獲取。
我認為沒有辦法從CBPeripheralManager
端獲取UUID。
由於此UUID在藍牙芯片中進行了硬編碼,並且人們幾乎不需要更換iPhone的藍牙芯片,因此該方法將用於跟蹤用戶,這與Apple的意圖相反。
蘋果在iOS 5中禁止UDID,在iOS 6中禁止MAC地址。
因此,當蘋果在iOS 6中添加CBPeripheralManager
時,蘋果沒有理由讓您訪問藍牙UUID。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.