|
| 1 | +/*! |
| 2 | + * \file Commissioning.h |
| 3 | + * |
| 4 | + * \brief End device commissioning parameters |
| 5 | + * |
| 6 | + * \copyright Revised BSD License, see section \ref LICENSE. |
| 7 | + * |
| 8 | + * \code |
| 9 | + * ______ _ |
| 10 | + * / _____) _ | | |
| 11 | + * ( (____ _____ ____ _| |_ _____ ____| |__ |
| 12 | + * \____ \| ___ | (_ _) ___ |/ ___) _ \ |
| 13 | + * _____) ) ____| | | || |_| ____( (___| | | | |
| 14 | + * (______/|_____)_|_|_| \__)_____)\____)_| |_| |
| 15 | + * (C)2013-2017 Semtech |
| 16 | + * |
| 17 | + * \endcode |
| 18 | + * |
| 19 | + * \author Miguel Luis ( Semtech ) |
| 20 | + * |
| 21 | + * \author Gregory Cristian ( Semtech ) |
| 22 | + */ |
| 23 | +#ifndef __LORA_COMMISSIONING_H__ |
| 24 | +#define __LORA_COMMISSIONING_H__ |
| 25 | + |
| 26 | +/*! |
| 27 | + ****************************************************************************** |
| 28 | + ********************************** WARNING *********************************** |
| 29 | + ****************************************************************************** |
| 30 | + The crypto-element implementation supports both 1.0.x and 1.1.x LoRaWAN |
| 31 | + versions of the specification. |
| 32 | + Thus it has been decided to use the 1.1.x keys and EUI name definitions. |
| 33 | + The below table shows the names equivalence between versions: |
| 34 | + +-------------------+-------------------------+ |
| 35 | + | 1.0.x | 1.1.x | |
| 36 | + +===================+=========================+ |
| 37 | + | LORAWAN_DEVICE_EUI| LORAWAN_DEVICE_EUI | |
| 38 | + +-------------------+-------------------------+ |
| 39 | + | LORAWAN_APP_EUI | LORAWAN_JOIN_EUI | |
| 40 | + +-------------------+-------------------------+ |
| 41 | + | N/A | LORAWAN_APP_KEY | |
| 42 | + +-------------------+-------------------------+ |
| 43 | + | LORAWAN_APP_KEY | LORAWAN_NWK_KEY | |
| 44 | + +-------------------+-------------------------+ |
| 45 | + | LORAWAN_NWK_S_KEY | LORAWAN_F_NWK_S_INT_KEY | |
| 46 | + +-------------------+-------------------------+ |
| 47 | + | LORAWAN_NWK_S_KEY | LORAWAN_S_NWK_S_INT_KEY | |
| 48 | + +-------------------+-------------------------+ |
| 49 | + | LORAWAN_NWK_S_KEY | LORAWAN_NWK_S_ENC_KEY | |
| 50 | + +-------------------+-------------------------+ |
| 51 | + | LORAWAN_APP_S_KEY | LORAWAN_APP_S_KEY | |
| 52 | + +-------------------+-------------------------+ |
| 53 | + ****************************************************************************** |
| 54 | + ****************************************************************************** |
| 55 | + ****************************************************************************** |
| 56 | + */ |
| 57 | + |
| 58 | +/*! |
| 59 | + * When set to 1 the application uses the Over-the-Air activation procedure |
| 60 | + * When set to 0 the application uses the Personalization activation procedure |
| 61 | + */ |
| 62 | +#define OVER_THE_AIR_ACTIVATION 0 |
| 63 | + |
| 64 | +/*! |
| 65 | + * When using ABP activation the MAC layer must know in advance to which server |
| 66 | + * version it will be connected. |
| 67 | + */ |
| 68 | +#define ABP_ACTIVATION_LRWAN_VERSION_V10x 0x01000300 // 1.0.3.0 |
| 69 | + |
| 70 | +#define ABP_ACTIVATION_LRWAN_VERSION ABP_ACTIVATION_LRWAN_VERSION_V10x |
| 71 | + |
| 72 | +/*! |
| 73 | + * Indicates if the end-device is to be connected to a private or public network |
| 74 | + */ |
| 75 | +#define LORAWAN_PUBLIC_NETWORK true |
| 76 | + |
| 77 | +/*! |
| 78 | + * IEEE Organizationally Unique Identifier ( OUI ) (big endian) |
| 79 | + * \remark This is unique to a company or organization |
| 80 | + */ |
| 81 | +#define IEEE_OUI 0x00, 0x00, 0x00 |
| 82 | + |
| 83 | +/*! |
| 84 | + * Mote device IEEE EUI (big endian) |
| 85 | + * |
| 86 | + * \remark In this application the value is automatically generated by calling |
| 87 | + * BoardGetUniqueId function |
| 88 | + */ |
| 89 | +#define LORAWAN_DEVICE_EUI { IEEE_OUI, 0x00, 0x00, 0x00, 0x00, 0x00 } |
| 90 | + |
| 91 | +/*! |
| 92 | + * App/Join server IEEE EUI (big endian) |
| 93 | + */ |
| 94 | +#define LORAWAN_JOIN_EUI { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } |
| 95 | + |
| 96 | +/*! |
| 97 | + * Application root key |
| 98 | + * WARNING: NOT USED FOR 1.0.x DEVICES |
| 99 | + */ |
| 100 | +#define LORAWAN_APP_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 101 | + |
| 102 | +/*! |
| 103 | + * Network root key |
| 104 | + * WARNING: FOR 1.0.x DEVICES IT IS THE \ref LORAWAN_APP_KEY |
| 105 | + */ |
| 106 | +#define LORAWAN_NWK_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 107 | + |
| 108 | +/*! |
| 109 | + * Current network ID |
| 110 | + */ |
| 111 | +#define LORAWAN_NETWORK_ID ( uint32_t )0 |
| 112 | + |
| 113 | +/*! |
| 114 | + * Device address on the network (big endian) |
| 115 | + * |
| 116 | + * \remark In this application the value is automatically generated using |
| 117 | + * a pseudo random generator seeded with a value derived from |
| 118 | + * BoardUniqueId value if LORAWAN_DEVICE_ADDRESS is set to 0 |
| 119 | + */ |
| 120 | +#define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x00000000 |
| 121 | + |
| 122 | +/*! |
| 123 | + * Forwarding Network session integrity key |
| 124 | + * WARNING: NWK_S_KEY FOR 1.0.x DEVICES |
| 125 | + */ |
| 126 | +#define LORAWAN_F_NWK_S_INT_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 127 | + |
| 128 | +/*! |
| 129 | + * Serving Network session integrity key |
| 130 | + * WARNING: NOT USED FOR 1.0.x DEVICES. MUST BE THE SAME AS \ref LORAWAN_F_NWK_S_INT_KEY |
| 131 | + */ |
| 132 | +#define LORAWAN_S_NWK_S_INT_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 133 | + |
| 134 | +/*! |
| 135 | + * Network session encryption key |
| 136 | + * WARNING: NOT USED FOR 1.0.x DEVICES. MUST BE THE SAME AS \ref LORAWAN_F_NWK_S_INT_KEY |
| 137 | + */ |
| 138 | +#define LORAWAN_NWK_S_ENC_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 139 | + |
| 140 | +/*! |
| 141 | + * Application session key |
| 142 | + */ |
| 143 | +#define LORAWAN_APP_S_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
| 144 | + |
| 145 | +#endif // __LORA_COMMISSIONING_H__ |
0 commit comments