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
- Committer:
- AshuJoshi
- Date:
- 2016-07-13
- Revision:
- 11:3481e24747e2
- Parent:
- 10:8071e1ae92ac
- Child:
- 12:d603cbb3597c
File content as of revision 11:3481e24747e2:
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> static std::string config_network_name = "ATLANTA_TTN"; static std::string config_network_pass = "ATLANTA_TTN"; // Values as used by The Things Network // Application session key uint8_t AppSKey[16]= { 0x91, 0x5F, 0xCD, 0x2A, 0xED, 0x8E, 0x0C, 0x2B, 0x30, 0xEF, 0x35, 0x8D, 0xF7, 0xE7, 0x89, 0x0A }; // Network session key uint8_t NwkSKey[16]= { 0x60, 0xBF, 0x44, 0xA9, 0x56, 0x0A, 0x4C, 0xB4, 0xF2, 0xEB, 0xB1, 0x6B, 0x9A, 0x2C, 0x57, 0x32 }; // App Key 1DD7BB3D3E43ED13029996BEC25BF190 //uint8_t AppKey[16] = {0x1D, 0xD7, 0xBB, 0x3D, 0x3E, 0x43, 0xED, 0x13, 0x02, 0x99, 0x96, 0xBE, 0xC2, 0x5B, 0xF1, 0x90}; uint8_t AppKey[16] = {0xDF, 0xB4, 0x17, 0x78, 0x4A, 0x89, 0xC6, 0xB7, 0xD3, 0xBE, 0x18, 0x55, 0x32, 0x4F, 0x58, 0x91}; // App EUI 70B3D57ED00005D5 uint8_t AppEUI[8] = {0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x00, 0x05, 0xD5}; // Network Address - Get your own address range at http://thethingsnetwork.org/wiki/AddressSpace //uint8_t NetworkAddr[4]= {0x02,0x01,0x6C,0x02}; // Our Network address or Node ID uint8_t NetworkAddr[4] = { 0x08, 0xBE, 0xAB, 0x8A }; // Some defines for the LoRa configuration #define LORA_ACK 0 #define LORA_TXPOWER 20 //Ignoring sub band for EU modules. static uint8_t config_frequency_sub_band = 7; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<