如何使用core_bluetooth获取公共蓝牙设备地址 [英] how to get public Bluetooth Device Address using core_bluetooth

查看:235
本文介绍了如何使用core_bluetooth获取公共蓝牙设备地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个蓝牙设备.蓝牙设备有一个公共蓝牙设备地址(BDA).在android中它们像(30:03:5B:00:15:12)一样获得蓝牙.我只能获得设备名称和设备UUID 像这样

We have one bluetooth devices.Bluetooth devices have one public bluetooth device address(BDA).In android they get bluetooth like (30:03:5B:00:15:12).I can get only device name and device UUID like this

-(void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { 
NSLog(@"Discovered peripheral %@ (%@) (%@)",peripheral.name,peripheral.identifier.UUIDString); //PHARMACELL CAREOUSEL (0BEF07EA-7680-4223-2D5E-6CE159333F7E)

}

请任何一位指导我们如何获得BDA值

Please any one guide to us how to get BDA value

推荐答案

简单的答案显然是:否. (实际上)不可能从生成特定UUID的种子中获取BDA.假设实际上,生成您的UUID的算法确实使用了设备的MAC地址来生成它,并且我想您不能保证您使用的UUID生成器就是这种情况,除非您可以访问UUID生成器代码或算法.

The simple answer is clearly: NO. It is not possible (practically) to get the BDA from the seeds that generated a particular UUID. Provided that in fact the algorithm that generated your UUID did used the MAC Address of your device to generate it, and I guess you cannot guarantee that it is the case for the UUID generator you use, unless you have access to the UUID Generator code or algorithm.

由于苹果在生成UUID时可能会使用设备的MAC地址,时间戳,哈希,UDID(iOS设备)等其他组件以及其他一些因素,因此看起来也无法从UDID找回它.

As apple while generating UUID might use the MAC address of the device, other components like timestamps, hashing, UDID (iOS Devices) and also some other factors so its looks impossible to get it back from UDID also.

这篇关于如何使用core_bluetooth获取公共蓝牙设备地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆