stuff working !!

master
Ondřej Hruška 7 years ago
parent 65dea2223a
commit b212eba318
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      Inc/Commissioning.h
  2. 14
      Src/main.c

@ -99,12 +99,12 @@ Maintainer: Miguel Luis and Gregory Cristian
/*! /*!
* Application IEEE EUI (big endian) * 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 * 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 ) #if( OVER_THE_AIR_ACTIVATION == 0 )

@ -88,7 +88,8 @@ Maintainer: Miguel Luis, Gregory Cristian and Wael Guibene
* LoRaWAN application port * LoRaWAN application port
* @note do not use 224. It is reserved for certification * @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. * Number of trials for the join request.
*/ */
@ -187,16 +188,15 @@ int main(void)
static void LoraTxData(lora_AppData_t *AppData, FunctionalState *IsTxConfirmed) static void LoraTxData(lora_AppData_t *AppData, FunctionalState *IsTxConfirmed)
{ {
static uint8_t counter = 0;
/* USER CODE BEGIN 3 */ /* USER CODE BEGIN 3 */
PRINTF("Lora TX"); PRINTF("Lora TX\r\n");
AppData->Port = LORAWAN_APP_PORT; AppData->Port = LORAWAN_APP_PORT;
//TODO
*IsTxConfirmed = LORAWAN_CONFIRMED_MSG; *IsTxConfirmed = LORAWAN_CONFIRMED_MSG;
AppData->BuffSize = 0; sprintf((char*)AppData->Buff, "HELLO-%02d", counter++);
AppData->BuffSize = 8;
/* USER CODE END 3 */ /* USER CODE END 3 */
} }
@ -204,7 +204,7 @@ static void LoraTxData(lora_AppData_t *AppData, FunctionalState *IsTxConfirmed)
static void LoraRxData(lora_AppData_t *AppData) static void LoraRxData(lora_AppData_t *AppData)
{ {
/* USER CODE BEGIN 4 */ /* USER CODE BEGIN 4 */
PRINTF("Lora RX"); PRINTF("Lora RX\r\n");
switch (AppData->Port) { switch (AppData->Port) {
case LORAWAN_APP_PORT: case LORAWAN_APP_PORT:

Loading…
Cancel
Save