-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice_config.h
31 lines (22 loc) · 1.63 KB
/
device_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
// uncomment to use OTAA instead of ABP
#define USE_OTAA 1
// UPDATE WITH YOUR DEVICE TTN SECRETS
#ifdef USE_OTAA
//static PROGMEM u1_t DEVEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // Device EUI, hex, lsb
//static PROGMEM u1_t APPEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // Application EUI, hex, lsb
//static PROGMEM u1_t APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // App Key, hex, msb
// Settings from OTAA device
// Device ER2-O, letop DEVEUI C aan het einde ipv B
static PROGMEM u1_t DEVEUI[8]={ 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } ; // Device EUI, hex, lsb
static PROGMEM u1_t APPEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0003, 0x00 } ; // Application EUI, hex, lsb
static PROGMEM u1_t APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78 };
static String DEVADDR_str = "00 00 00 00 00 00 00 7C"; // om device te identificeren in de log
#else
static PROGMEM u1_t NWKSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // LoRaWAN NwkSKey, network session key, hex, msb
static PROGMEM u1_t APPSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // LoRaWAN AppSKey, application session key, hex, msb
static PROGMEM u4_t DEVADDR = 0x00000000 ; // LoRaWAN end-device address (DevAddr), hex, msb
static String DEVADDR_str = "00000000"; // om device te identificeren in de log
#endif
#define LMIC_VERSION_MAJOR 1
#define LMIC_VERSION_MINOR 6