Last active
November 24, 2019 12:33
Revisions
-
jdevoo revised this gist
Nov 24, 2019 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,5 +16,15 @@ handle 0x40 is the CCCD to get notifications from the motion service (0406 raw d by writing 0100 (msb first?) to the handle, we can subscribe to the values in hex # bash ``` IFS=$'\n' while true; do timeout 10s gatttool -b FD:19:AF:BA:73:C0 -t random --char-write-req --handle 0x40 --value 0100 --listen | cut -d ' ' -f 6-11 echo $(date +'%F %T') sleep 185s done ``` # node `sudo setcap cap_net_raw+eip $(eval readlink -f /opt/node-v8.16.2-linux-armv7l/bin/node)` -
jdevoo revised this gist
Nov 23, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,10 @@ obtain mac with `hcitool lescan` (here FD:19:AF:BA:73:C0) spot the following lines (see [source](https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial)) ``` handle = 0x003f, uuid = ef680406-9b35-4933-9b10-52ffa9740042 handle = 0x0040, uuid = 00002902-0000-1000-8000-00805f9b34fb ``` handle 0x40 is the CCCD to get notifications from the motion service (0406 raw data characteristic) -
jdevoo revised this gist
Nov 23, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # gatttool obtain mac with `hcitool lescan` (here FD:19:AF:BA:73:C0) `gatttool -b FD:19:AF:BA:73:C0 -t random --char-desc` spot the following lines (see [source](https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial)) @@ -10,9 +10,9 @@ handle = 0x0040, uuid = 00002902-0000-1000-8000-00805f9b34fb handle 0x40 is the CCCD to get notifications from the motion service (0406 raw data characteristic) `gatttool -b FD:19:AF:BA:73:C0 -t random --char-write-req --handle 0x40 --value 0100 --listen` by writing 0100 (msb first?) to the handle, we can subscribe to the values in hex # node `sudo setcap cap_net_raw+eip $(eval readlink -f /opt/node-v8.16.2-linux-armv7l/bin/node)` -
jdevoo created this gist
Nov 23, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # gatttool obtain mac with hcitool lescan (here FD:19:AF:BA:73:C0) gatttool -b FD:19:AF:BA:73:C0 -t random --char-desc spot the following lines (see [source](https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial)) handle = 0x003f, uuid = ef680406-9b35-4933-9b10-52ffa9740042 handle = 0x0040, uuid = 00002902-0000-1000-8000-00805f9b34fb handle 0x40 is the CCCD to get notifications from the motion service (0406 raw data characteristic) gatttool -b FD:19:AF:BA:73:C0 -t random --char-write-req --handle 0x40 --value 0100 --listen by writing 0100 (msb first?) to the handle, we can subscribe to the values in hex # node sudo setcap cap_net_raw+eip $(eval readlink -f /opt/node-v8.16.2-linux-armv7l/bin/node)