Skip to content

Commit 2b57402

Browse files
committed
Working version (no OTA)
1 parent ec7bdf7 commit 2b57402

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/Comissioning.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ Maintainer: Miguel Luis and Gregory Cristian
4747
/*!
4848
* AES encryption/decryption cipher application key
4949
*/
50-
#define LORAWAN_APPLICATION_KEY { 0x2F, 0x12, 0x04, 0xBA, 0x76, 0xB8, 0xB9, 0x8F, 0xDF, 0x45, 0x7F, 0x3E, 0xF7, 0x05, 0xC8, 0x0F }
51-
50+
//#define LORAWAN_APPLICATION_KEY { 0x6C, 0x66, 0xB4, 0x29, 0x31, 0x42, 0xCA, 0x74, 0x3E, 0x72, 0xEF, 0xD4, 0xC6, 0x14, 0x12, 0x90 }
5251
/*!
5352
* Current network ID
5453
*/
@@ -61,16 +60,18 @@ Maintainer: Miguel Luis and Gregory Cristian
6160
* a pseudo random generator seeded with a value derived from
6261
* BoardUniqueId value if LORAWAN_DEVICE_ADDRESS is set to 0
6362
*/
64-
#define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x2601E3E
63+
#define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x26011415
6564

6665
/*!
6766
* AES encryption/decryption cipher network session key
6867
*/
69-
#define LORAWAN_NWKSKEY { 0x00, 0x31, 0x40, 0xBE, 0x96, 0x33, 0xB3, 0xCF, 0x7C, 0x8B, 0xDD, 0xAB, 0x57, 0xAE, 0xCC, 0x08 }
68+
#define LORAWAN_NWKSKEY { 0x43, 0x43, 0x9A, 0x33, 0x4C, 0x89, 0xDB, 0x6A, 0x19, 0x4D, 0x6B, 0x35, 0xAF, 0x07, 0xB9, 0x34 }
7069

7170
/*!
7271
* AES encryption/decryption cipher application session key
7372
*/
74-
#define LORAWAN_APPSKEY { 0x2F, 0x12, 0x04, 0xBA, 0x76, 0xB8, 0xB9, 0x8F, 0xDF, 0x45, 0x7F, 0x3E, 0xF7, 0x05, 0xC8, 0x0F }
73+
#define LORAWAN_APPSKEY { 0xB6, 0x64, 0x3D, 0x93, 0x86, 0xFE, 0xB4, 0xAB, 0x52, 0x50, 0x49, 0x90, 0x55, 0x5B, 0x81, 0x26 }
74+
75+
7576

7677
#endif // __LORA_COMMISSIONING_H__

src/main.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
#define APP_ADR_ON 1 // Whether we use Adaptive Data Rate or not
1717
#define APP_CONFIRMED_MSG_ON 0 // Whether this example will transmit confirmed or unconfirmed packets
1818

19-
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
20-
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
21-
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
22-
2319
#if (OVER_THE_AIR_ACTIVATION == 0)
2420
static uint8_t NwkSKey[] = LORAWAN_NWKSKEY;
2521
static uint8_t AppSKey[] = LORAWAN_APPSKEY;
2622
static uint32_t DevAddr = LORAWAN_DEVICE_ADDRESS;
23+
#else
24+
static uint8_t DevEui[] = LORAWAN_DEVICE_EUI;
25+
static uint8_t AppEui[] = LORAWAN_APPLICATION_EUI;
26+
static uint8_t AppKey[] = LORAWAN_APPLICATION_KEY;
2727
#endif
2828

2929

@@ -108,6 +108,7 @@ static void OnTxNextPacketTimerEvent(void)
108108
else // We need to join before we can send data
109109
DeviceState = DEVICE_STATE_JOIN;
110110
}
111+
GpioToggle(&Led1);
111112
}
112113

113114

@@ -204,7 +205,7 @@ int main( void )
204205
MlmeReq_t mlmeReq;
205206

206207
// Initialize LoRaMac device unique ID
207-
BoardGetUniqueId(DevEui);
208+
//BoardGetUniqueId(DevEui);
208209

209210
mlmeReq.Type = MLME_JOIN;
210211
mlmeReq.Req.Join.DevEui = DevEui;

0 commit comments

Comments
 (0)