从Mac发现RN4020 BLE服务

时间:2014-09-05 17:37:23

标签: objective-c macos bluetooth-lowenergy core-bluetooth

我想我误解了私人服务的概念。 我使用的是Apple 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时,我也不应该看到终端中的所有这些服务(电池,设备信息和通用访问配置文件)????

谢谢!

1 个答案:

答案 0 :(得分:2)

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