Changes between Version 4 and Version 5 of wireless/bluetooth/ledcandlegatt


Ignore:
Timestamp:
12/13/2018 08:23:09 PM (5 years ago)
Author:
Ryan Erbstoesser
Comment:

add info for sending ble packets

Legend:

Unmodified
Added
Removed
Modified
  • wireless/bluetooth/ledcandlegatt

    v4 v5  
    3636
    3737== Sending BLE Packets over GATT ==
     38
     39Now that the packet structure and values are established, the candle can be controlled by the Gateworks SBC & GW16126 BLE card.
     40
     41The following was done with a Gateworks Ventana SBC using Ubuntu Bionic software.
     42
     431. Load the following modules
     44{{{
     45modprobe algif_hash; modprobe algif_skcipher; modprobe algif_rng; modprobe algif_aead; modprobe af_alg; modprobe hci_uart;
     46}}}
     471. Start the bluetooth daemon
     48{{{
     49bluetoothd -E &
     50}}}
     511. Find the device the bluetooth is connected to
     52{{{
     53dev=$(basename $(ls -d /sys/bus/usb/drivers/ftdi_sio/*/ttyUSB*))
     54}}}
     551. Attach bluetooth to inferface dev
     56{{{
     57btattach -B /dev/$dev -S 1000000 -P h4 &
     58}}}
     591. Now scan for BLE devices and confirm we have found the candle
     60{{{
     61hcitool -i hci0 lescan
     62}}}
     631. Change the color of the candle to red:
     64{{{
     65gatttool -i hci0 -b 3C:A3:08:10:51:FE --char-write-req -a 0x002e  -n 56ff000000f0aa
     66}}}
     671. Change the color to green:
     68{{{
     69gatttool -i hci0 -b 3C:A3:08:10:51:FE --char-write-req -a 0x002e  -n 5600ff0000f0aa
     70}}}
     71
     72== IoT and Beyond ==
     73
     74The LED Candle is only an example.
     75
     76BLE can be used for many industrial sensors, such as tags for location information.
     77
     78The CAT M1 modem on the GW16126 can then further enable internet connectivity, allowing sensor data to be pushed to the cloud.