IOT套件DA14583蓝牙通信

5个帖子/ 0新
最后一篇
米斯尼克
离线
最后一次露面:4年1天前
加入:2016-09-09 10:40
IOT套件DA14583蓝牙通信

你好

我试图沟通机智IOT DA14583传感器(https://support.dialog-semicondiondiondum/connectivity/reference-design/d ...)用蓝牙耳机扔笔记本。在这个笔记本上安装了Ubuntu系统。

我在用pygatt(https://github.com/peplin/pygatt.)Python3用于通信库。
我的沟通顺序是:
Adapter.Connect('80:EA:CA:00:D2:9D')
- 已成功连接
- 我可以使用uuid 00002a00-0000-1000-8000-00805F9B34FB读取设备名称

订阅('2ea78970-7D44-44BB-B097-26183F40240A',回叫=命令次数)#set回调函数用于命令回复
Char_Write(“2EA78970-7D44-44BB-B097-26183F402409”,ByteArray([0x0B]))#send进入ControlPoint 0x0B - 自动
字符写入(“2ea78970-7d44-44bb-b097-26183f402409”,bytearray([0x01])发送到我准备好的控制点
subscribe('2ea78970-7d44-44bb-b097-26183f402401',callback=accelerator)#设置加速计数据的回调函数

一切都可以,但没有收到数据。
我在做这个uuid序列吗?

谢谢迈克

还有PyGatt日志:
调试:pygatt.backends.gatttool.gatttool:gatttool_cmd = gatttool -i hci0 -i
info:pygatt.Backends.gatttool.gatttool:运行...
信息:pygatt.backends.gattool。gatttool:Connecting to 80:EA:CA:00:D2:9D超时=5.0
调试:pygatt。device:Looking up 特性手柄2ea78970-7d44-44bb-b097-26183f40240a
debug:pygatt.Backends.gatttool.gatttool:找到特征00002a00-0000-1000-8000-00805f9b34fb,值句柄:0x3
调试:pygatt.backends.gattool。gatttool:Found characteristic 00002a01-0000-1000-8000-00805f9b34fb,值句柄:0x5
debug:pygatt.backends.gatttool.gatttool:找到特征00002a02-0000-1000-8000-00805f9b34fb,值句柄:0x7
调试:pygatt.backends.gattool。gatttool:Found characteristic 00002a04-0000-1000-8000-00805f9b34fb,值句柄:0x9
debug:pygatt.Backends.gatttool.gatttool:找到特征00002A05-0000-1000-8000-00805F9B34FB,价值句柄:0xe
debug:pygatt.backends.gatttool.gatttool:发现特点2ea78970-7D44-44BB-B097-26183F402401,价值手柄:0x12
debug:pygatt.Backends.gatttool.gatttool:发现特点2eA78970-7D44-44BB-B097-26183F402402,价值手柄:0x15
Debug:Pygatt.Backends.gatttool.gatttool:发现特点2EA78970-7D44-44BB-B097-26183F402403,价值手柄:0x18
调试:pygatt.backends.gattool。gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402404,值句柄:0x1b
Debug:Pygatt.Backends.gatttool.gatttool:找到特点2eA78970-7D44-44BB-B097-26183F402405,价值手柄:0x1E
调试:Pygatt.Backends.gatttool.gatttool:发现特点2ea78970-7D44-44BB-B097-26183F402406,价值手柄:0x21
debug:pygatt.backends.gatttool.gatttool:找到特点2ea78970-7D44-44BB-B097-26183F402407,价值手柄:0x24
debug:pygatt.Backends.gatttool.gatttool:找到特点2ea78970-7D44-44BB-B097-26183F402408,价值手柄:0x27
Debug:Pygatt.Backends.gatttool.gatttool:找到特点2eA78970-7D44-44BB-B097-26183F402409,价值手柄:0x29
Debug:Pygatt.Backends.gatttool.gatttool:发现特点2eA78970-7D44-44BB-B097-26183F40240A,价值手柄:0x2B
调试:pygatt.device:找到
调试:pygatt.backends.gattool。gatttool:Sending cmd=char-write-cmd 0x2c 0200
info:pygatt.backends.gatttool.gatttool:发送cmd = char-write-cmd 0x2c 0200
info:pygatt.device:订阅uuid = 2ea78970-7d44-44bb-b097-26183f40240a
调试:pygatt。device:Looking up 特性手柄2ea78970-7d44-44bb-b097-26183f402409
调试:pygatt.device:找到
debug:pygatt.Backends.gatttool.gatttool:发送cmd = char-write-req 0x29 0b
info:pygatt.backends.gatttool.gatttool:发送cmd = char-write-req 0x29 0b
调试:pygatt。device:Looking up 特性手柄2ea78970-7d44-44bb-b097-26183f402409
调试:pygatt.device:找到
debug:pygatt.Backends.gatttool.gatttool:发送cmd = char-write-req 0x29 01
信息:pygatt.backends.gattool。gatttool:Sent cmd=char-write-req 0x29 01
调试:pygatt.device:查找句柄特性2ea78970-7d44-44bb-b097-26183f402401
调试:pygatt.device:找到
debug:pygatt.Backends.gatttool.gatttool:发送cmd = char-write-cmd 0x13 0200
info:pygatt.backends.gatttool.gatttool:发送cmd = char-write-cmd 0x13 0200
信息:皮格特。device:Subscribed to uuid=2ea78970-7d44-44bb-b097-26183f402401

APK日志

设备:
mt_dialog.
离线
最后一次露面:3个月5小时前
职员
加入:2015-06-08 11:34
嗨Missinik,

嗨Missinik,

为了使设备开始发送数据,您应该启用设备启动通知您想要通知的特性,有一系列应该发送的命令,也应该启用通知Central,请检查UM-B-063-DA14583_IOT_SENSOR_DEVELOPMENT_KIT.pdf,用于应用程序实现的可用特性和控制点。

谢谢mt_dialog.

米斯尼克
离线
最后一次露面:4年1天前
加入:2016-09-09 10:40
谢谢你的回答。

谢谢你的回答。

实际上我已经为您写的文件进行了红色(它是捕获6)。
我的序列是:
1.订阅控制回复特征.... 240a
2.将命令0x0b(加载配置)写入控制char。
3.将命令0x01(start命令)写入控制char。
4.订阅加速度计数据chagacteristics .... 2401

之后我认为数据应该发送,但没有任何事情发生。

米斯尼克
离线
最后一次露面:4年1天前
加入:2016-09-09 10:40
最后,这是蓝兹的错误

最后它是Bluez中的一个错误(官方蓝牙lib。在Ubuntu)和我写的序列是对的!
谢谢迈克

PS:我还创建了通过Linux分发和BLE控制对话框的包装器。https://github.com/misisnik/foshwrapper.希望有人可以帮助......

mt_dialog.
离线
最后一次露面:3个月5小时前
职员
加入:2015-06-08 11:34
米斯尼克,

米斯尼克,

感谢您的指示,请将您的答案标记为已接受。

谢谢mt_dialog.