IoT kit da14583 bluetooth communication

5 posts / 0 new
Last post
misisnik
Offline
Last seen:3年7个月前
加入:2016-09-09 10:40
IoT kit da14583 bluetooth communication

Hello

I have tried to communicate wit IoT da14583 sensor (https://support.dialog-semiconductor.com/connectivity/reference-design/d...)用蓝牙耳机扔笔记本。在这个笔记本上安装了Ubuntu系统。

我在用pygatt(https://github.com/peplin/pygatt) python3 library for communication.
My sequence for communicate is:
adapter.connect('80:EA:CA:00:D2:9D')
-- is connected successfully
-- i could read device name with uuid 00002a00-0000-1000-8000-00805f9b34fb

subscribe('2ea78970-7d44-44bb-b097-26183f40240a',callback = commandReply) #set callback function for command reply
char_write("2ea78970-7d44-44bb-b097-26183f402409", bytearray([0x0B])) #send into controlPoint 0x0B - automatic
字符写入(“2ea78970-7d44-44bb-b097-26183f402409”,bytearray([0x01])发送到我准备好的控制点
subscribe('2ea78970-7d44-44bb-b097-26183f402401',callback=accelerator)#设置加速计数据的回调函数

Everything is ok but data is not received.
Am I doing this uuid sequence right?

谢谢你迈克

Also pygatt log:
DEBUG:pygatt.backends.gatttool.gatttool:gatttool_cmd=gatttool -i hci0 -I
INFO:pygatt.backends.gatttool.gatttool:Running...
信息:pygatt.backends.gattool.gattool:连接到80:EA:CA:00:D2:9D,超时=5.0
调试:pygatt.device:查找特征2ea78970-7d44-44bb-b097-26183f40240a的手柄
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 00002a00-0000-1000-8000-00805f9b34fb, value handle: 0x3
调试:pygatt.backends.gattool.gattool:00002a01-0000-1000-8000-00805f9b34fb,值句柄:0x5
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 00002a02-0000-1000-8000-00805f9b34fb, value handle: 0x7
调试:pygatt.backends.gattool.gattool:00002a04-0000-1000-8000-00805f9b34fb,值句柄:0x9
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 00002a05-0000-1000-8000-00805f9b34fb, value handle: 0xe
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402401, value handle: 0x12
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402402, value handle: 0x15
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402403, value handle: 0x18
调试:pygatt.backends.gattool.gattool:找到特征2ea78970-7d44-44bb-b097-26183f402404,值句柄:0x1b
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402405, value handle: 0x1e
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402406, value handle: 0x21
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402407, value handle: 0x24
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402408, value handle: 0x27
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f402409, value handle: 0x29
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 2ea78970-7d44-44bb-b097-26183f40240a, value handle: 0x2b
DEBUG:pygatt.device:Found
调试:pygatt.backends.gattool.gattool:Sending cmd=char write cmd 0x2c 0200
INFO:pygatt.backends.gatttool.gatttool:Sent cmd=char-write-cmd 0x2c 0200
INFO:pygatt.device:Subscribed to uuid=2ea78970-7d44-44bb-b097-26183f40240a
DEBUG:pygatt.device:Looking up handle for characteristic 2ea78970-7d44-44bb-b097-26183f402409
DEBUG:pygatt.device:Found
DEBUG:pygatt.backends.gatttool.gatttool:Sending cmd=char-write-req 0x29 0b
INFO:pygatt.backends.gatttool.gatttool:Sent cmd=char-write-req 0x29 0b
DEBUG:pygatt.device:Looking up handle for characteristic 2ea78970-7d44-44bb-b097-26183f402409
DEBUG:pygatt.device:Found
DEBUG:pygatt.backends.gatttool.gatttool:Sending cmd=char-write-req 0x29 01
信息:pygatt.backends.gattool.gattool:Sent cmd=字符写入请求0x29 01
DEBUG:pygatt.device:Looking up handle for characteristic 2ea78970-7d44-44bb-b097-26183f402401
DEBUG:pygatt.device:Found
DEBUG:pygatt.backends.gatttool.gatttool:Sending cmd=char-write-cmd 0x13 0200
INFO:pygatt.backends.gatttool.gatttool:Sent cmd=char-write-cmd 0x13 0200
信息:pygatt.device:订阅uuid=2ea78970-7d44-44bb-b097-26183f402401

APK log

Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi missinik,

Hi missinik,

In order for the device to start sending data you should enable the device to start notify your central for the characteristics that you would like to be notified, there is a series of commands that should be send and the notifications should be enabled as well from the central, please check the UM-B-063-DA14583_IoT_Sensor_Development_Kit.pdf for the available characteristics and control point that the application implements.

Thanks MT_dialog

misisnik
Offline
Last seen:3年7个月前
加入:2016-09-09 10:40
谢谢你的回答。

谢谢你的回答。

Actualy I have already red the document which you wrote about (it is capture 6).
我的顺序是:
1. subscribe control reply characteristics ....240A
2. write command 0x0B (to load configuration) into control char.
3. write command 0x01 (start command) into control char.
4. subscribe accelerometer data chaacteristics ....2401

after that i think that data should be send, but nothing happend.

misisnik
Offline
Last seen:3年7个月前
加入:2016-09-09 10:40
Finally it was a bug in bluez

Finally it was a bug in bluez (official bluetooth lib. in Ubuntu) and that sequence as I wrote is right!
谢谢你迈克

ps: Also I have created wrapper for controlling Dialog IoT via linux distribution and BLE.https://github.com/misisnik/FoshWrapperHope it could be helpfull for someone...

MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi misisnik,

Hi misisnik,

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

Thanks MT_dialog