Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/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
Arduino 难以读取的树莓读取数据_Arduino_Raspberry Pi_Raspberry Pi2_Bluetooth Lowenergy - Fatal编程技术网

Arduino 难以读取的树莓读取数据

Arduino 难以读取的树莓读取数据,arduino,raspberry-pi,raspberry-pi2,bluetooth-lowenergy,Arduino,Raspberry Pi,Raspberry Pi2,Bluetooth Lowenergy,试图通过BLE将数据从红熊混合微型Arduino板发送到树莓Pi(Raspian),bluez 5.37 我在用电话 如果在Android上运行红熊BLE控制器应用程序,我可以收到“Hello World” 从RPI中,我可以使用gatttool并连接到混合微型 问题: 我怎样才能知道不同的句柄代表什么 我怎么读gatttool的“hello world” 我的最终目的是从dht11湿度传感器读取数据,并使用d3js在WebSocket上显示在仪表板上。我得到的链与串行usb工作良好,所以“只”

试图通过BLE将数据从红熊混合微型Arduino板发送到树莓Pi(Raspian),bluez 5.37

我在用电话

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

从RPI中,我可以使用gatttool并连接到混合微型

问题:

  • 我怎样才能知道不同的句柄代表什么
  • 我怎么读gatttool的“hello world”
  • 我的最终目的是从dht11湿度传感器读取数据,并使用d3js在WebSocket上显示在仪表板上。我得到的链与串行usb工作良好,所以“只”需要得到蓝牙去。对于Python代码,我正试图使用pexpect和Gattool尽可能简单

    提前谢谢

    
    pi@raspberrypi:~$sudo gatttool-b EC:EA:FA:D8:F9:77-t random-I
    [EC:EA:FA:D8:F9:77][LE]>连接
    正在尝试连接到EC:EA:FA:D8:F9:77
    连接成功
    [EC:EA:FA:D8:F9:77][LE]>小学
    属性句柄:0x0001,端部grp句柄:0x0007 uuid:00001800-0000-1000-8000-00805f9b34fb
    属性句柄:0x0008,端部grp句柄:0x000b uuid:00001801-0000-1000-8000-00805f9b34fb
    属性句柄:0x000c,端部grp句柄:0x0011 uuid:713d0000-503e-4c75-ba94-3148f18d941e
    属性句柄:0x0012,端部grp句柄:0xffff uuid:0000180a-0000-1000-8000-00805f9b34fb
    [EC:EA:FA:D8:F9:77][LE]>字符描述
    手柄:0x0001,uuid:00002800-0000-1000-8000-00805f9b34fb
    手柄:0x0002,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x0003,uuid:00002A000-0000-1000-8000-00805f9b34fb
    手柄:0x0004,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x0005,uuid:00002a01-0000-1000-8000-00805f9b34fb
    手柄:0x0006,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x0007,uuid:00002a04-0000-1000-8000-00805f9b34fb
    手柄:0x0008,uuid:00002800-0000-1000-8000-00805f9b34fb
    手柄:0x0009,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x000a,uuid:00002a05-0000-1000-8000-00805f9b34fb
    手柄:0x000b,uuid:00002902-0000-1000-8000-00805f9b34fb
    手柄:0x000c,uuid:00002800-0000-1000-8000-00805f9b34fb
    手柄:0x000d,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x000e,uuid:713d0003-503e-4c75-ba94-3148f18d941e
    手柄:0x000f,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x0010,uuid:713d0002-503e-4c75-ba94-3148f18d941e
    手柄:0x0011,uuid:00002902-0000-1000-8000-00805f9b34fb
    手柄:0x0012,uuid:00002800-0000-1000-8000-00805f9b34fb
    手柄:0x0013,uuid:00002803-0000-1000-8000-00805f9b34fb
    手柄:0x0014,uuid:00002a27-0000-1000-8000-00805f9b34fb
    

    能够通过读取句柄3来读取设备名称。 字符读取指针0x00003

    并从句柄11请求数据。 字符写入请求0x0011 0100

    仍在试图弄清楚所有句柄代表什么