2019-02-10 18:35:12 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
Credentials file
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Only one of these settings must be defined
|
2020-08-20 20:39:13 +00:00
|
|
|
#define USE_ABP
|
|
|
|
//#define USE_OTAA
|
2019-02-10 18:35:12 +00:00
|
|
|
|
|
|
|
#ifdef USE_ABP
|
|
|
|
|
|
|
|
// LoRaWAN NwkSKey, network session key
|
2020-08-20 20:42:23 +00:00
|
|
|
static const u1_t PROGMEM NWKSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2019-02-10 18:35:12 +00:00
|
|
|
// LoRaWAN AppSKey, application session key
|
2020-08-20 20:42:23 +00:00
|
|
|
static const u1_t PROGMEM APPSKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2019-02-10 18:35:12 +00:00
|
|
|
// LoRaWAN end-device address (DevAddr)
|
|
|
|
// This has to be unique for every node
|
2020-08-20 20:42:23 +00:00
|
|
|
static const u4_t DEVADDR = 0x00000000;
|
2019-02-10 18:35:12 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_OTAA
|
|
|
|
|
|
|
|
// This EUI must be in little-endian format, so least-significant-byte
|
|
|
|
// first. When copying an EUI from ttnctl output, this means to reverse
|
|
|
|
// the bytes. For TTN issued EUIs the last bytes should be 0x00, 0x00,
|
|
|
|
// 0x00.
|
2020-08-20 20:42:23 +00:00
|
|
|
static const u1_t PROGMEM APPEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2019-02-10 18:35:12 +00:00
|
|
|
|
|
|
|
// This should also be in little endian format, see above.
|
2020-01-18 22:11:00 +00:00
|
|
|
// Note: You do not need to set this field, if unset it will be generated automatically based on the device macaddr
|
2020-08-20 20:42:23 +00:00
|
|
|
static u1_t DEVEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2019-02-10 18:35:12 +00:00
|
|
|
|
|
|
|
// This key should be in big endian format (or, since it is not really a
|
|
|
|
// number but a block of memory, endianness does not really apply). In
|
|
|
|
// practice, a key taken from ttnctl can be copied as-is.
|
|
|
|
// The key shown here is the semtech default key.
|
2020-08-20 20:42:23 +00:00
|
|
|
static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
2019-02-10 18:35:12 +00:00
|
|
|
|
|
|
|
#endif
|