Android上的BLE扫描上未显示蓝牙GATT服务

Android上的BLE扫描上未显示蓝牙GATT服务,android,bluetooth,bluetooth-lowenergy,Android,Bluetooth,Bluetooth Lowenergy,我正在TinyCore linux机器上与Bluez合作,该机器带有USB蓝牙加密狗。我们使用示例gatt服务器添加了一个电池服务,以发送一个降低的电池电量。使用bluetoothctl,控制器(USB蓝牙加密狗)的信息显示服务: Controller 00:07:80:C1:AC:89 Name: box Alias: box Class: 0x000104 Powered: yes Discoverable: yes Pairable: yes UUID: Battery Service

我正在TinyCore linux机器上与Bluez合作,该机器带有USB蓝牙加密狗。我们使用示例gatt服务器添加了一个电池服务,以发送一个降低的电池电量。使用bluetoothctl,控制器(USB蓝牙加密狗)的信息显示服务:

Controller 00:07:80:C1:AC:89
Name: box
Alias: box
Class: 0x000104
Powered: yes
Discoverable: yes
Pairable: yes
UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1D6Bp0246d052D
Discovering: no
我们的目标是在Android应用程序上阅读此内容,但在我们的定制应用程序和示例BLE扫描应用程序中,我们看到的唯一服务是00001800(通用访问配置文件)和00001801(通用属性配置文件)


我的问题是,为什么我们可以在bluetoothctl上看到电池服务,但该服务在discoverServices()上没有显示?

如果这可以引导您找到解决方案(我使用的是Raspberry Pi-而不是Tiny Core):
将蓝牙连接到串行接口时出现问题。重新连接它可以解决问题-在我的情况下:

sudo hciattach /dev/ttyAMA0 bcm43xx 9210600 noflow 
呼叫:
hciattach-l
检查您的设备


PS:始终感谢版主的意见,感谢他们的负面反馈——我正在满怀激情地收集他们;)

你解决了这个问题吗?我也有同样的问题。@lufte不,不幸的是没有。我刚换成了普通的蓝牙设备