2022-07-22 08:18 AM
Hi,
I have build a custom application from end_node project example on LoRa-E5 board.
All works fine with comissioning from CubeMX.
But now I want to use values loaded from flash.
So I added 3 variables :
uint8_t device_eui[8];
uint8_t app_eui[8];
uint8_t app_key[16];
I can read/write values from flash.
But now : how to use this values for LoRa-Wan OTAA joining ???!!!!
How could this be sooooo hard to do ???!!!!!
Thanks for help.
2022-07-22 08:30 AM
The software does OTAA as-is - no changes needed. 😁
See this series of videos:
https://www.youtube.com/watch?v=vuc6914B0KM - Part 1; parts 2 & 3 follow
2022-07-22 08:58 AM
Hi,
I know OTAA is well done ... that's not my answer.
The question was : how to change End device commissioning parameters without rebuibind firmware for each device ?
( I already have read this parameters in variables from flash )
thanks.
2022-07-22 09:06 AM
I have look the 4 video ... not what I'm lokoing for ... he just edit identity.h to change commissioning parameters ...
2022-07-22 09:30 AM
As it tells you in those videos, the Device EUI is taken from the STM32's unique ID.
To change the other parameters, just look at where those values get used - use your IDE's browsing facilities - and supply your own instead.
2022-07-22 10:17 AM
2022-07-22 04:16 PM
So how far did you get with that? Where are you stuck?
2022-07-23 12:56 AM
The problem is to find where set parameters in the end_node example project.
Of course this must be in USER CODE BEGIN / USER CODE END section for not beiing overwrite by CubeMX on next code generation ...
2022-07-23 12:58 AM
In anycase : thanks for your answers 😉
2022-07-23 01:10 AM
Where am I ?
I have found in "se-identity.h" all the MX's #define :
#define LORAWAN_DEVICE_EUI { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define LORAWAN_JOIN_EUI { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define LORAWAN_APP_KEY 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
And also found where they are used :
[ soft-sec.c :: 527 ]
SecureElementStatus_t SecureElementInit( SecureElementNvmData_t *nvm, SecureElementGetUniqueId seGetUniqueId )
But this section is not user-allowed.
I also see some tools functions :
SecureElementStatus_t SecureElementSetKey( KeyIdentifier_t keyID, uint8_t* key )
SecureElementStatus_t SecureElementSetDevEui( uint8_t* devEui )
SecureElementStatus_t SecureElementSetJoinEui( uint8_t* joinEui )
But I don't found how (from where) I can use this ...