LMIC-node/keyfiles/lorawan-keys_example.h
Leonel Lopes Parente b0c3e2194c Fix comment
2021-04-23 14:15:42 +02:00

67 lines
2.8 KiB
C

/*******************************************************************************
*
* File: lorawan-keys_example.h
*
* Function: Example for lorawan-keys.h required by LMIC-node.
*
* Copyright: Copyright (c) 2021 Leonel Lopes Parente
*
* Important ██ DO NOT EDIT THIS EXAMPLE FILE (see instructions below) ██
*
* Decription: lorawan-keys.h defines LoRaWAN keys needed by the LMIC library.
* It can contain keys for both OTAA and for ABP activation.
* Only the keys for the used activation type need to be specified.
*
* It is essential that each key is specified in the correct format.
* lsb: least-significant-byte first, msb: most-significant-byte first.
*
* For security reasons all files in the keyfiles folder (except file
* lorawan-keys_example.h) are excluded from the Git(Hub) repository.
* Also excluded are all files matching the pattern *lorawan-keys.h.
* This way they cannot be accidentally committed to a public repository.
*
* Instructions: 1. Copy this file lorawan-keys_example.h to file lorawan-keys.h
* in the same folder (keyfiles).
* 2. Place/edit required LoRaWAN keys in the new lorawan-keys.h file.
*
******************************************************************************/
#pragma once
#ifndef LORAWAN_KEYS_H_
#define LORAWAN_KEYS_H_
// Optional: If DEVICEID is defined it will be used instead of the default defined in the BSF.
// #define DEVICEID "<deviceid>"
// Keys required for OTAA activation:
// End-device Identifier (u1_t[8]) in lsb format
#define OTAA_DEVEUI 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
// Application Identifier (u1_t[8]) in lsb format
#define OTAA_APPEUI 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
// Application Key (u1_t[16]) in msb format
#define OTAA_APPKEY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
// -----------------------------------------------------------------------------
// Optional: If ABP_DEVICEID is defined it will be used for ABP instead of the default defined in the BSF.
// #define ABP_DEVICEID "<deviceid>"
// Keys required for ABP activation:
// End-device Address (u4_t) in uint32_t format.
// Note: The value must start with 0x (current version of TTN Console does not provide this).
#define ABP_DEVADDR 0x00000000
// Network Session Key (u1_t[16]) in msb format
#define ABP_NWKSKEY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
// Application Session K (u1_t[16]) in msb format
#define ABP_APPSKEY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
#endif // LORAWAN_KEYS_H_