IoT kit da14583 bluetooth communication

5 posts / 0 new
Last post
misisnik
Offline
Last seen:3 years 11 months ago
加入: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...)用蓝牙le扔笔记本。在此笔记本上安装了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
char_write(“2ea78970-7D44-44BB-B097-26183F402409”,ByteArray([0x01])#send进入ControlPoint,我已经准备就绪
订阅('2ea78970-7D44-44BB-B097-26183F402401',回叫=加速度计)#set回调函数用于加速度计数据

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...
info:pygatt.backends.gatttool.gatttool:连接到80:ea:ea:00:00: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
debug:pygatt.backends.gatttool.gatttool:找到特征00002a01-0000-1000-8000-00805f9b34fb,值句柄:0x5
DEBUG:pygatt.backends.gatttool.gatttool:Found characteristic 00002a02-0000-1000-8000-00805f9b34fb, value handle: 0x7
debug:pygatt.backends.gatttool.gatttool:找到特征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
debug:pygatt.backends.gatttool.gatttool:找到特点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
debug:pygatt.Backends.gatttool.gatttool:发送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
调试:pygatt.device:查找特性手柄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
调试:pygatt.device:查找特性手柄2ea78970-7d44-44bb-b097-26183f402409
DEBUG:pygatt.device:Found
DEBUG:pygatt.backends.gatttool.gatttool:Sending cmd=char-write-req 0x29 01
info:pygatt.backends.gatttool.gatttool:发送cmd = char-write-req 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
info:pygatt.device:订阅uuid = 2ea78970-7d44-44bb-b097-26183f402401

APK log

Device:
MT_dialog
Offline
Last seen:2 months 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 years 11 months ago
加入: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 years 11 months ago
加入: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:2 months 2 weeks ago
Staff
加入:2015-06-08 11:34
Hi misisnik,

Hi misisnik,

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

Thanks MT_dialog