从Mac发现RN4020蓝牙低功耗服务

3

我想我误解了私有服务的概念。我有一个使用苹果CoreBluetooth的程序,似乎一切都很好地发现了服务:

Found Characteristic 'Appearence' for service 'Generic Access Profile' 
Found Characteristic 'Peripheral Preferred Connection Parameters' for service 'Generic Access Profile' 
Found Characteristic 'Serial Number String' for service 'Device Information' 
Found Characteristic 'Hardware Revision String' for service 'Device Information' 
Found Characteristic 'Firmware Revision String' for service 'Device Information' 
Found Characteristic 'Software Revision String' for service 'Device Information' 
Found Characteristic 'Manufacturer Name String' for service 'Device Information' 
Found Characteristic 'Model Number String' for service 'Device Information' 
Found Characteristic 'Battery Level' for service 'Battery'

接下来我在RN4020中设置了私有服务和特征,这样当我在终端中输入LS时就可以看到它们:

123456789012345678901234567890FF
  12345678901234567890123456789011,000B,02,01
  12345678901234567890123456789011,000C,10,02
  12345678901234567890123456789022,000E,02,02

然后我启动广告、重新启动...但是我无法在我的应用程序中看到这项服务(?)。这是因为它们是私有的吗?那么我该如何使它公开呢? 当我输入LS时,我不应该也能在终端上看到所有这些服务(电池、设备信息和通用访问配置文件)吗?
谢谢!

你解决了吗?Microchip 怎么会让这种事情发生,我们已经苦苦挣扎好几天都没能解决。 - Curnelious
1个回答

2

我不确定具体是MAC,但我在Android中遇到了类似的问题,在显示新服务/特性之前,必须从Android内存中清除远程设备。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接