在某些Android手机中连接后没有发现服务

时间:2016-12-27 19:19:16

标签: android bluetooth-lowenergy embedded-linux bluez pybluez

我正在尝试使用Android的蓝牙低功耗[支持BLE的Android]与BLE设备进行通信。与设备连接后,将无法发现服务。 在三星Galaxy s6,iphone,ipad等少数手机中,发现并且可见。 我不知道,为什么它在一些手机上工作?

对于BLE,我在我的Raspberry pi 3设备上使用BLUEZ5堆栈,对于运行gatt服务器,我在我的主板(服务器)中使用了example-gatt-server.py,并将移动设备用于中央设备(客户端)

我使用以下链接例如-gatt-server.py: https://github.com/RadiusNetworks/bluez/blob/master/test/example-gatt-server

对于广告和启动blutooth守护进程我使用了以下命令

$ /usr/lib/bluez5/bluetooth/bluetoothd  -dE &

$ hciconfig hci0 up 

$ hcitool -i hci0 cmd 0x08 0x0008 15 02 01 1a 11 07 41 42 43 44 45 46 47 48 49  4a 4b 4c 4d 4e 4f 50 00 00 00 00 00 00 00 00 00 00

$ hciconfig hci0 leadv 0

$ python example-gatt-server &

0 个答案:

没有答案