![](/media/cache/profiles/2dd26bee3d25f4e22c3db125e415203a.jpg.50x50_q85.jpg)
This program connects to the The Things Network backend in OTAA Mode. It logs sensor values from a BME 280 to the backend. Tried adding support for Grove GPS using SerialGPS library but it is not working - conflicting with mbed-rtos, so it commented. Deep Sleep for mDot implemented BUT avoiding reprogramming of the mDot config is NOT working.
Dependencies: BME280 SerialGPS libmDot mbed-rtos mbed
LoRa.h@13:22e11a02c7a3, 2016-07-13 (annotated)
- Committer:
- AshuJoshi
- Date:
- Wed Jul 13 21:13:51 2016 +0000
- Revision:
- 13:22e11a02c7a3
- Parent:
- 12:d603cbb3597c
Stable release -onnect to the The Things Network in OTAA mode.Make sure to program your specific keys into LoRa.h - from TTN Accnt Dashboard; The program also supports reading a BME280 sensor and logging.; Serial GPS is NOT working.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AshuJoshi | 10:8071e1ae92ac | 1 | // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
AshuJoshi | 12:d603cbb3597c | 2 | static std::string config_network_name = ""; |
AshuJoshi | 12:d603cbb3597c | 3 | static std::string config_network_pass = ""; |
AshuJoshi | 10:8071e1ae92ac | 4 | |
AshuJoshi | 10:8071e1ae92ac | 5 | // Application session key |
AshuJoshi | 10:8071e1ae92ac | 6 | uint8_t AppSKey[16]= { 0x91, 0x5F, 0xCD, 0x2A, 0xED, 0x8E, 0x0C, 0x2B, 0x30, 0xEF, 0x35, 0x8D, 0xF7, 0xE7, 0x89, 0x0A }; |
AshuJoshi | 10:8071e1ae92ac | 7 | // Network session key |
AshuJoshi | 10:8071e1ae92ac | 8 | uint8_t NwkSKey[16]= { 0x60, 0xBF, 0x44, 0xA9, 0x56, 0x0A, 0x4C, 0xB4, 0xF2, 0xEB, 0xB1, 0x6B, 0x9A, 0x2C, 0x57, 0x32 }; |
AshuJoshi | 10:8071e1ae92ac | 9 | |
AshuJoshi | 12:d603cbb3597c | 10 | // Get your key, and set it up here. |
AshuJoshi | 12:d603cbb3597c | 11 | uint8_t AppKey[16] = {0xD0, 0xB0, 0x10, 0x70, 0x40, 0x80, 0xAA, 0xCC, 0xDD, 0xBB, 0x18, 0x55, 0x32, 0x4F, 0x58, 0x91}; |
AshuJoshi | 10:8071e1ae92ac | 12 | // App EUI 70B3D57ED00005D5 |
AshuJoshi | 10:8071e1ae92ac | 13 | uint8_t AppEUI[8] = {0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x00, 0x05, 0xD5}; |
AshuJoshi | 10:8071e1ae92ac | 14 | |
AshuJoshi | 12:d603cbb3597c | 15 | |
AshuJoshi | 10:8071e1ae92ac | 16 | // Network Address - Get your own address range at http://thethingsnetwork.org/wiki/AddressSpace |
AshuJoshi | 12:d603cbb3597c | 17 | uint8_t NetworkAddr[4] = { 0xAA, 0xBB, 0xCC, 0xDD }; |
AshuJoshi | 12:d603cbb3597c | 18 | |
AshuJoshi | 10:8071e1ae92ac | 19 | // Some defines for the LoRa configuration |
AshuJoshi | 10:8071e1ae92ac | 20 | #define LORA_ACK 0 |
AshuJoshi | 10:8071e1ae92ac | 21 | #define LORA_TXPOWER 20 |
AshuJoshi | 12:d603cbb3597c | 22 | |
AshuJoshi | 10:8071e1ae92ac | 23 | //Ignoring sub band for EU modules. |
AshuJoshi | 10:8071e1ae92ac | 24 | static uint8_t config_frequency_sub_band = 7; |
AshuJoshi | 10:8071e1ae92ac | 25 | |
AshuJoshi | 12:d603cbb3597c | 26 | // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |