mac/xcode 为蓝牙设置特定的 UUID
我一直在玩 Xcode RFCOMM_SPP 中的 Bluetooh 示例,这对我来说是有用的,所以我修改了它,但发现设备没有选择一些更简单的 SPP 设备(如 GPS),
我在做时遇到了类似的问题Android版本,经过挖掘,我发现如果我手动设置一个正确的UUID,我就在轻松的街道上,这让我在那里滚动真的很酷
现在回到MAC,我试图看看是否可以应用相同的过程我看到他们有这个 IOBluetoothSDPUUID,它选择一个预煮的 UUID,我的猜测是,如果我在那里做我在 Android 中所做的事情,我将能够看到 GPS 并与 GPS 交互。
是否可以像将其添加到 h 文件一样手动设置 UUID?或者它是否被阻止用于“Made for Apple”设备(例如 iPhone)?
I've been playing with the Bluetooh sample from the Xcode RFCOMM_SPP which is what would do the job for me so I modified it but the discover devices does not pick a few simpler SPP devices(like a GPS)
I had a similar issue when doing the Android version and after digging I found out if I set up a proper UUID manually I'm on easy street and that got me rolling there really cool
Now back to the MAC I'm trying to see if the same process can be applied I see they have this IOBluetoothSDPUUID which picks a pre-cooked UUID, my guess is that if I do there what I did in Android I'd be able to see and interface with the GPS.
Is it possible to set a UUID manually like adding it to the h files? Or is it blocked for "Made for Apple" devices like in the iPhone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是为 MAC 还是 iOS 设备(iphone / ipad)编程
iOS 设备不(公开)支持蓝牙 SPP 配置文件。
请参阅此http://support.apple.com/kb/HT3647?viewlocale=en_US
因此,如果您想使用非公共接口在这些设备上进行自定义操作,唯一的方法就是加入 MFi 计划
Are you programming for the MAC or iOS devices (iphone / ipad )
Bluetooth SPP profile is not supported (publicly) on iOS devices.
see this http://support.apple.com/kb/HT3647?viewlocale=en_US
So if you want to do something custom on these devices using non public interfaces, the only way is joining the MFi program