diff --git a/Inc/Commissioning.h b/Inc/Commissioning.h index c68a599..08f1aac 100755 --- a/Inc/Commissioning.h +++ b/Inc/Commissioning.h @@ -99,12 +99,12 @@ Maintainer: Miguel Luis and Gregory Cristian /*! * Application IEEE EUI (big endian) */ -#define LORAWAN_APPLICATION_EUI { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 } +#define LORAWAN_APPLICATION_EUI { 0x70, 0xB3, 0xD5, 0x7E, 0xD0, 0x00, 0x7C, 0x04 } /*! * AES encryption/decryption cipher application key */ -#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } +#define LORAWAN_APPLICATION_KEY { 0x4F, 0x13, 0xEF, 0xE5, 0xD9, 0xA9, 0x44, 0x93, 0x99, 0x25, 0xD2, 0xD9, 0x79, 0x77, 0x91, 0xDC } #if( OVER_THE_AIR_ACTIVATION == 0 ) diff --git a/Src/main.c b/Src/main.c index 6921724..8a3e5c3 100755 --- a/Src/main.c +++ b/Src/main.c @@ -88,7 +88,8 @@ Maintainer: Miguel Luis, Gregory Cristian and Wael Guibene * LoRaWAN application port * @note do not use 224. It is reserved for certification */ -#define LORAWAN_APP_PORT 2 +#define LORAWAN_APP_PORT 42 +//2 /*! * Number of trials for the join request. */ @@ -187,16 +188,15 @@ int main(void) static void LoraTxData(lora_AppData_t *AppData, FunctionalState *IsTxConfirmed) { + static uint8_t counter = 0; /* USER CODE BEGIN 3 */ - PRINTF("Lora TX"); + PRINTF("Lora TX\r\n"); AppData->Port = LORAWAN_APP_PORT; - - //TODO - *IsTxConfirmed = LORAWAN_CONFIRMED_MSG; - AppData->BuffSize = 0; + sprintf((char*)AppData->Buff, "HELLO-%02d", counter++); + AppData->BuffSize = 8; /* USER CODE END 3 */ } @@ -204,7 +204,7 @@ static void LoraTxData(lora_AppData_t *AppData, FunctionalState *IsTxConfirmed) static void LoraRxData(lora_AppData_t *AppData) { /* USER CODE BEGIN 4 */ - PRINTF("Lora RX"); + PRINTF("Lora RX\r\n"); switch (AppData->Port) { case LORAWAN_APP_PORT: