2016-03-07 85 views
0

尝试通过BLE从Redbear Blend Micro Arduino板发送数据到Raspberry Pi(Raspian),bluez 5.37。我正在使用nRF8001 HelloWorld.ino sketchArduino BLE树莓阅读数据

如果在Android上运行Redbear BLE控制器应用程序,我可以收到“Hello World”。

从RPI我可以使用gatttool并连接到Blend Micro。

问题:

  1. 我怎样才能找出不同的手柄代表着什么?
  2. 如何从gatttool中读取“hello world”?

我的最终目的是从我的dht11湿度传感器读取数据,并使用d3js通过websockets在仪表板上显示。我得到了链与USB串行工作正常,所以“只”需要让蓝牙去。对于Python代码,我试图用pexpect和gatttool尽可能地作为香草。

在此先感谢。

[email protected]:~ $ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I [EC:EA:FA:D8:F9:77][LE]> connect Attempting to connect to EC:EA:FA:D8:F9:77 Connection successful [EC:EA:FA:D8:F9:77][LE]> primary attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb attr handle: 0x000c, end grp handle: 0x0011 uuid: 713d0000-503e-4c75-ba94-3148f18d941e attr handle: 0x0012, end grp handle: 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb [EC:EA:FA:D8:F9:77][LE]> char-desc handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0004, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb handle: 0x0006, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb handle: 0x0008, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0009, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x000a, uuid: 00002a05-0000-1000-8000-00805f9b34fb handle: 0x000b, uuid: 00002902-0000-1000-8000-00805f9b34fb handle: 0x000c, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x000e, uuid: 713d0003-503e-4c75-ba94-3148f18d941e handle: 0x000f, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0010, uuid: 713d0002-503e-4c75-ba94-3148f18d941e handle: 0x0011, uuid: 00002902-0000-1000-8000-00805f9b34fb handle: 0x0012, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0013, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0014, uuid: 00002a27-0000-1000-8000-00805f9b34fb

回答

0

能够通过读取把手3 炭读手0x00003

读取设备名和还请求数据从把手11 炭 - 写-REQ 0×0011 0100

仍试图找出所有的手柄代表什么。