BLE ADV Gateway, converts advertisement to proper JSON serial output
Dependencies: BLE_API mbed mbedtls nRF51822
Revision 14:0486f885b1b1, committed 2018-11-05
- Comitter:
- electronichamsters
- Date:
- Mon Nov 05 04:44:01 2018 +0000
- Parent:
- 13:e136665cf993
- Commit message:
- Reverting to mbed revision 126 as workaround to issue 8344, linker error on mbed compiler.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r e136665cf993 -r 0486f885b1b1 main.cpp --- a/main.cpp Sun Aug 27 05:48:02 2017 +0000 +++ b/main.cpp Mon Nov 05 04:44:01 2018 +0000 @@ -43,7 +43,7 @@ mbedtls_aes_context aes; unsigned char iv[16] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x1, 0x2}; //16-byte aes key - +//Serial device(p9, p11); //nRF51822 uart: TX=p9. RX=p11 Serial device(p9, p11); //nRF51822 uart: TX=p9. RX=p11 DigitalIn pinHandShake(p0); //handshake uart to prevent output before bridge MCU is ready. Flow control. @@ -415,7 +415,7 @@ // 4. Xmit Counter 0-255, incremented by Beacon with each new unique ADV event. // "tmr":xxxx, //--------------------------------------- - device.printf("\"xmit_cnt\":%d,", Received_Xmit_Cnt); + device.printf("\"xcnt\":%d,", Received_Xmit_Cnt); //--------------------------------------- // 5. rest of sensor payload as json @@ -430,7 +430,7 @@ device.printf("}"); device.printf("\r\n"); //gateway looking for cariage return to indicate end - wait_ms(60); //needed to give gateway time to assert flow control handshake pin + wait_ms(140); //needed to give gateway time to assert flow control handshake pin while (pinHandShake.read() == 1) //normally pulled down, so loop when gateway processing; { //uart flow control
diff -r e136665cf993 -r 0486f885b1b1 mbed.bld --- a/mbed.bld Sun Aug 27 05:48:02 2017 +0000 +++ b/mbed.bld Mon Nov 05 04:44:01 2018 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed/builds/e2bfab296f20 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/abea610beb85 \ No newline at end of file