Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Service 无法从蓝牙传感器设备(Pycom)获取服务_Service_Bluetooth - Fatal编程技术网

Service 无法从蓝牙传感器设备(Pycom)获取服务

Service 无法从蓝牙传感器设备(Pycom)获取服务,service,bluetooth,Service,Bluetooth,已扫描并能够连接到我的Ti传感器设备,但根据服务请求,它不工作 bluetooth = Bluetooth() bluetooth.start_scan(5) while bluetooth.isscanning(): adv = bluetooth.get_adv() if adv: if(str(binascii.hexlify(adv.mac).decode()) == '78a50454b267'): conn = bluetooth.connect(adv.mac) print(typ

已扫描并能够连接到我的Ti传感器设备,但根据服务请求,它不工作

bluetooth = Bluetooth()
bluetooth.start_scan(5)
while bluetooth.isscanning():
adv = bluetooth.get_adv()
if adv:
if(str(binascii.hexlify(adv.mac).decode()) == '78a50454b267'):
conn = bluetooth.connect(adv.mac)
print(type(conn))
service = bluetooth.get_service()
print("got service", service)
该服务未打印。循环停止,没有响应

就连我也尝试过这么多的get服务方式

缺少任何导入功能? 有关贸总协定的连接问题吗?
如何导入.gatt及其服务,特性???

尝试使用睡眠时间,并按照下面的字典获取数据,事情会成功的。。。干杯

services = dict()
            time.sleep(0.050);
            services = conn.services()