diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 63c3b8c..00d11a4 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1111,9 +1111,8 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams) } AppData.Port = 1; AppData.BufferSize = 16; - UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t *)"YUNHORN168", 10); - UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer+10, (uint8_t *)(uint8_t*)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING)); - AppData.BufferSize = sizeof(YUNHORN_STS_PRD_STRING)+10; + UTIL_MEM_cpy_8((uint8_t*)AppData.Buffer, (uint8_t*)YUNHORN_STS_PRD_STRING, sizeof(YUNHORN_STS_PRD_STRING)); + AppData.BufferSize = (sizeof(YUNHORN_STS_PRD_STRING)-1); LmHandlerParams.IsTxConfirmed = true; LmHandlerErrorStatus_t status = LmHandlerSend(&AppData, LmHandlerParams.IsTxConfirmed, false); if (status ==LORAMAC_HANDLER_SUCCESS ) LmHandlerParams.IsTxConfirmed = false; diff --git a/LoRaWAN/Target/lorawan_conf.h b/LoRaWAN/Target/lorawan_conf.h index 9ddccb0..31b262b 100644 --- a/LoRaWAN/Target/lorawan_conf.h +++ b/LoRaWAN/Target/lorawan_conf.h @@ -58,7 +58,7 @@ extern "C" { * - 0x01000400: Link Layer TS001-1.0.4 + Regional Parameters RP002-1.0.1 * - 0x01010100: soon available ... */ -#define LORAMAC_SPECIFICATION_VERSION 0x01000400 +#define LORAMAC_SPECIFICATION_VERSION 0x01010100 /*! * @brief Enable the additional LoRaWAN packages @@ -109,7 +109,7 @@ extern "C" { * - CHANNEL_PLAN_GROUP_AS923_4 (Freq offset = -5.90 MHz / Freq range = 917-920MHz) * - CHANNEL_PLAN_GROUP_AS923_1_JP (Freq offset = 0.0 MHz / Freq range = 920.6-923.4MHz) */ -#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1_JP +#define REGION_AS923_DEFAULT_CHANNEL_PLAN CHANNEL_PLAN_GROUP_AS923_1 /*! * @brief Limits the number usable channels by default for AU915, CN470 and US915 regions diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index 8d70c96..06c6d58 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -22,6 +22,7 @@