cancel
Showing results for 
Search instead for 
Did you mean: 

Lorawan end node - possible deveui bug?

jonnieh
Associate

I am trying to develop a small scale lorawan app on a nucleo-wl55jc using the application example in stm32cube_fw_wl_v1.5.0 and have spent several hours trying to trace my error/bug in the software. All join attempts fail because the deveui as it appears in the se-identity.h file is ignored and the mcu derived value applied. Tracing this value to the lora_app.c file shows the se-identity.h file is correctly read and the macro expansion appears to give the correct value in the set user credentials section (lines 617-620) but the join is attempted using what I believe to be the mcu derived value. The same credentials work as expected when used under stm32cude_fw_wl_1.4.0 At the outset, I must confess it's 25 years since I did any serious programming so I may of missed something obvious but I would be grateful for any pointers as to why it's failing!

 

1 ACCEPTED SOLUTION

Accepted Solutions
JHCarter
Associate III

Hello jonnieh,

I ran into this issue last week working with the same example on a B-WL5M-SUBG1 board.  What I found was that the new application code makes a call to the  GetUniqueId() function at line 605 of lora_app.c.  This function is implemented in sys_app.c and generates a unique deveui.  So you are correct that the application now generates its own deveui and ignores the one we enter in se-identity.h (and this is not documented anywhere I could find). 

For my setup it's actually better to have this unique ID generated for me, but if the se_identity.h approach works better for you then you could replace the call to GetUniqueId() with your own code that references the deveui in se-identity.h.

View solution in original post

2 REPLIES 2
JHCarter
Associate III

Hello jonnieh,

I ran into this issue last week working with the same example on a B-WL5M-SUBG1 board.  What I found was that the new application code makes a call to the  GetUniqueId() function at line 605 of lora_app.c.  This function is implemented in sys_app.c and generates a unique deveui.  So you are correct that the application now generates its own deveui and ignores the one we enter in se-identity.h (and this is not documented anywhere I could find). 

For my setup it's actually better to have this unique ID generated for me, but if the se_identity.h approach works better for you then you could replace the call to GetUniqueId() with your own code that references the deveui in se-identity.h.

jonnieh
Associate

Many thanks, I read through the code without realising the significance of that function and shall now change GetUniqueid to take the se-identity value as I have no control over what deveui's the server accepts,

 

Thanks again.