Ottawa Bootcamp Publish
Dependencies: SX127x lorawan1v1
Commissioning.h@8:efe6002910df, 2018-07-23 (annotated)
- Committer:
- Wayne Roberts
- Date:
- Mon Jul 23 13:19:35 2018 -0700
- Revision:
- 8:efe6002910df
- Parent:
- 0:62e456e60083
- Child:
- 12:94b7971c7146
add application without VT100. Use latest lorawan library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wayne Roberts |
0:62e456e60083 | 1 | /* |
Wayne Roberts |
0:62e456e60083 | 2 | / _____) _ | | |
Wayne Roberts |
0:62e456e60083 | 3 | ( (____ _____ ____ _| |_ _____ ____| |__ |
Wayne Roberts |
0:62e456e60083 | 4 | \____ \| ___ | (_ _) ___ |/ ___) _ \ |
Wayne Roberts |
0:62e456e60083 | 5 | _____) ) ____| | | || |_| ____( (___| | | | |
Wayne Roberts |
0:62e456e60083 | 6 | (______/|_____)_|_|_| \__)_____)\____)_| |_| |
Wayne Roberts |
0:62e456e60083 | 7 | (C)2018 Semtech |
Wayne Roberts |
0:62e456e60083 | 8 | |
Wayne Roberts |
0:62e456e60083 | 9 | Description: End device commissioning parameters |
Wayne Roberts |
0:62e456e60083 | 10 | |
Wayne Roberts |
0:62e456e60083 | 11 | License: Revised BSD License, see LICENSE.TXT file include in the project |
Wayne Roberts |
0:62e456e60083 | 12 | |
Wayne Roberts |
0:62e456e60083 | 13 | */ |
Wayne Roberts |
0:62e456e60083 | 14 | #ifndef __LORA_COMMISSIONING_H__ |
Wayne Roberts |
0:62e456e60083 | 15 | #define __LORA_COMMISSIONING_H__ |
Wayne Roberts |
0:62e456e60083 | 16 | |
Wayne Roberts |
8:efe6002910df | 17 | #define SENETCO |
Wayne Roberts |
8:efe6002910df | 18 | |
Wayne Roberts |
0:62e456e60083 | 19 | #define USE_BAND_915_HYBRID |
Wayne Roberts |
0:62e456e60083 | 20 | //#define USE_BAND_915 |
Wayne Roberts |
0:62e456e60083 | 21 | //#define USE_BAND_ARIB_8CH |
Wayne Roberts |
0:62e456e60083 | 22 | //#define USE_BAND_868 |
Wayne Roberts |
0:62e456e60083 | 23 | //#define USE_BAND_433 |
Wayne Roberts |
0:62e456e60083 | 24 | //#define USE_BAND_470 |
Wayne Roberts |
0:62e456e60083 | 25 | //#define USE_BAND_780 |
Wayne Roberts |
0:62e456e60083 | 26 | |
Wayne Roberts |
0:62e456e60083 | 27 | |
Wayne Roberts |
0:62e456e60083 | 28 | #define ENABLE_VT100 |
Wayne Roberts |
0:62e456e60083 | 29 | |
Wayne Roberts |
0:62e456e60083 | 30 | #ifdef ENABLE_VT100 |
Wayne Roberts |
0:62e456e60083 | 31 | #define ROW_MLME_IND (ROW_END+1) |
Wayne Roberts |
0:62e456e60083 | 32 | #define ROW_MLME_CONF (ROW_END+2) |
Wayne Roberts |
0:62e456e60083 | 33 | #define ROW_MCPS_IND (ROW_END+3) |
Wayne Roberts |
0:62e456e60083 | 34 | #define ROW_MCPS_CONF (ROW_END+4) |
Wayne Roberts |
0:62e456e60083 | 35 | #define ROW_MIC (ROW_END+5) |
Wayne Roberts |
0:62e456e60083 | 36 | #else |
Wayne Roberts |
0:62e456e60083 | 37 | #define ROW_MIC 0 |
Wayne Roberts |
0:62e456e60083 | 38 | #endif |
Wayne Roberts |
0:62e456e60083 | 39 | |
Wayne Roberts |
0:62e456e60083 | 40 | /*! |
Wayne Roberts |
0:62e456e60083 | 41 | * Indicates if the end-device is to be connected to a private or public network |
Wayne Roberts |
0:62e456e60083 | 42 | */ |
Wayne Roberts |
0:62e456e60083 | 43 | #define LORAWAN_PUBLIC_NETWORK true |
Wayne Roberts |
0:62e456e60083 | 44 | |
Wayne Roberts |
8:efe6002910df | 45 | #ifdef SENETCO |
Wayne Roberts |
8:efe6002910df | 46 | #define LORAWAN_DEVICE_EUI {0x00,0x25,0x0C,0x01,0x00,0x00,0x00,0x08} |
Wayne Roberts |
8:efe6002910df | 47 | #define LORAWAN_JOIN_EUI {0x00,0x25,0x0C,0x00,0x00,0x01,0x00,0x01} |
Wayne Roberts |
8:efe6002910df | 48 | #define LORAWAN_ROOT_NWKKEY {0x3D,0xFD,0xF3,0x80,0x45,0x0E,0x8B,0x8D,0x3E,0xD5,0x89,0x25,0xAA,0xD4,0x23,0x53} |
Wayne Roberts |
8:efe6002910df | 49 | #else |
Wayne Roberts |
0:62e456e60083 | 50 | /*! |
Wayne Roberts |
0:62e456e60083 | 51 | * Mote device IEEE EUI (big endian) |
Wayne Roberts |
0:62e456e60083 | 52 | * |
Wayne Roberts |
0:62e456e60083 | 53 | * \remark In this application the value is automatically generated by calling |
Wayne Roberts |
0:62e456e60083 | 54 | * BoardGetUniqueId function |
Wayne Roberts |
0:62e456e60083 | 55 | */ |
Wayne Roberts |
0:62e456e60083 | 56 | |
Wayne Roberts |
0:62e456e60083 | 57 | #define LORAWAN_DEVICE_EUI { 0x19,0x51,0x34,0x30,0x9E,0x30,0x6A,0x37 } // home net 000001 |
Wayne Roberts |
0:62e456e60083 | 58 | //#define LORAWAN_DEVICE_EUI { 0x3e,0xbe,0x24,0xb1,0x6b,0x7b,0x9c,0xfc } // home net 6000ff |
Wayne Roberts |
0:62e456e60083 | 59 | /*! |
Wayne Roberts |
0:62e456e60083 | 60 | * Join IEEE EUI (big endian): undefine for ABP |
Wayne Roberts |
0:62e456e60083 | 61 | */ |
Wayne Roberts |
0:62e456e60083 | 62 | #define LORAWAN_JOIN_EUI { 0x64,0x7F,0xDA,0x80,0x00,0x00,0x01,0x2E } |
Wayne Roberts |
0:62e456e60083 | 63 | |
Wayne Roberts |
0:62e456e60083 | 64 | /*! |
Wayne Roberts |
0:62e456e60083 | 65 | * AES encryption/decryption cipher application key |
Wayne Roberts |
0:62e456e60083 | 66 | * 00112233445566778899aabbccddeeff */ |
Wayne Roberts |
0:62e456e60083 | 67 | #define LORAWAN_ROOT_NWKKEY { 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff } |
Wayne Roberts |
8:efe6002910df | 68 | #endif /* !SENETCO */ |
Wayne Roberts |
0:62e456e60083 | 69 | |
Wayne Roberts |
0:62e456e60083 | 70 | // d2fc83ea58cf0fbc973dbd07a7115486 lorawan-1.1 OTA only |
Wayne Roberts |
0:62e456e60083 | 71 | //#define LORAWAN_ROOT_APPKEY { 0xd2,0xfc,0x83,0xea,0x58,0xcf,0x0f,0xbc,0x97,0x3d,0xbd,0x07,0xa7,0x11,0x54,0x86 } // uncomment for lorawan1v1, or comment for lorawan1v0 |
Wayne Roberts |
0:62e456e60083 | 72 | |
Wayne Roberts |
0:62e456e60083 | 73 | |
Wayne Roberts |
0:62e456e60083 | 74 | #ifndef LORAWAN_JOIN_EUI /* ABP mote: */ |
Wayne Roberts |
0:62e456e60083 | 75 | /* |
Wayne Roberts |
0:62e456e60083 | 76 | * AppSkey: 09763a2d1c29831ea073b24d5d12f084 |
Wayne Roberts |
0:62e456e60083 | 77 | * FNwkSIntKey: 15aed1b53c90518e1c6170c12a315429 |
Wayne Roberts |
0:62e456e60083 | 78 | * SNwkSintKey: 37fe10c4c31a26f9d027180bc192567f 1v1 ABP |
Wayne Roberts |
0:62e456e60083 | 79 | * NwkSEncKey: f765291c0b18720d9f62a13c4c01ef73 1v1 ABP |
Wayne Roberts |
0:62e456e60083 | 80 | */ |
Wayne Roberts |
0:62e456e60083 | 81 | #define LORAWAN_FNwkSIntKey {0x15, 0xae, 0xd1, 0xb5, 0x3c, 0x90, 0x51, 0x8e, 0x1c, 0x61, 0x70, 0xc1, 0x2a, 0x31, 0x54, 0x29} |
Wayne Roberts |
0:62e456e60083 | 82 | #define LORAWAN_APPSKEY {0x09, 0x76, 0x3a, 0x2d, 0x1c, 0x29, 0x83, 0x1e, 0xa0, 0x73, 0xb2, 0x4d, 0x5d, 0x12, 0xf0, 0x84} |
Wayne Roberts |
0:62e456e60083 | 83 | //#define LORAWAN_SNwkSIntKey {0x37, 0xfe, 0x10, 0xc4, 0xc3, 0x1a, 0x26, 0xf9, 0xd0, 0x27, 0x18, 0x0b, 0xc1, 0x92, 0x56, 0x7f} // 1v1 |
Wayne Roberts |
0:62e456e60083 | 84 | //#define LORAWAN_NwkSEncKey {0xf7, 0x65, 0x29, 0x1c, 0x0b, 0x18, 0x72, 0x0d, 0x9f, 0x62, 0xa1, 0x3c, 0x4c, 0x01, 0xef, 0x73} // 1v1 |
Wayne Roberts |
0:62e456e60083 | 85 | #if defined(LORAWAN_SNwkSIntKey) && defined(LORAWAN_NwkSEncKey) |
Wayne Roberts |
0:62e456e60083 | 86 | #define OPTNEG |
Wayne Roberts |
0:62e456e60083 | 87 | #define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x02000555 // 1v1 provisioned netid 000001 |
Wayne Roberts |
0:62e456e60083 | 88 | //#define LORAWAN_DEVICE_ADDRESS ( uint32_t )0xe3fc0555 // 1v1 provisioned netid 6000ff |
Wayne Roberts |
0:62e456e60083 | 89 | #else |
Wayne Roberts |
0:62e456e60083 | 90 | #undef OPTNEG |
Wayne Roberts |
0:62e456e60083 | 91 | #define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x02000aaa // 1v0 provisioned |
Wayne Roberts |
0:62e456e60083 | 92 | #endif |
Wayne Roberts |
0:62e456e60083 | 93 | #else |
Wayne Roberts |
0:62e456e60083 | 94 | #ifdef LORAWAN_ROOT_APPKEY |
Wayne Roberts |
0:62e456e60083 | 95 | #define OPTNEG |
Wayne Roberts |
0:62e456e60083 | 96 | #else |
Wayne Roberts |
0:62e456e60083 | 97 | #undef OPTNEG |
Wayne Roberts |
0:62e456e60083 | 98 | #endif |
Wayne Roberts |
0:62e456e60083 | 99 | #endif |
Wayne Roberts |
0:62e456e60083 | 100 | |
Wayne Roberts |
0:62e456e60083 | 101 | #endif // __LORA_COMMISSIONING_H__ |
Wayne Roberts |
0:62e456e60083 | 102 |