RAK4631 LoRaWAN TX error

Hello.
I am having a issue with the module in Malasia.
I have discovered that the library from Semtech for this country (AS923-1) is wrong, only two channels are correct and I needed to modify to allow the 8 channels that are usable in Malasia, I will “git push” and see if the accept or no.
The second issue I have is that when I send TX data over lorawan it returns sometimes -1, failed, after that I cannot send data anymore.
If I query the status I get the following:
LMH_ERROR_STATUS=0
LMH_JOIN_STATUS=1
Apparently it is all ok.
I tried to lmh_join() again but it hangs and the watchdog triggers (thanks dog).

I have been trying to manage this via software, maybe unjoining the network and joining again or like but I have not seen any function to do that.
Only solution for now is just reboot and start again.

Anyone knows what the issue could be??

AS923 (all variants) allow the LoRaWAN join only on the first two channels.
The other channels are added by the LoRaWAN server after successful join.

See LoRa Alliance issued LoRaWAN Regional Parameters

Thanks Beeggee, as you said, perfectly true.
However the library defined channels where wrong for AS923-1, I double checked and in the library by Semtech all the others channels were disabled.
I have allowed the two “join” as they were (correct) and corrected the others were wrong.
At right the corrected by me, at the left the original in the library.
I got the info from “the things network wiki” and from “milesight lora gateway manual”
The definitions in "The Things Network and the Milesight gateway are equal but not the one in the library.

Forum not allowing me to post more than one image.

The Things network definition:

Captura002

As long as the first two channels are correct, it doesn’t matter because the other 6 channel settings are overwritten with the channel settings received by the LoRaWAN server during the Join process.

I checked with a newer version of the Semtech LoRaMAC stack and there only the first two channels are defined. I could remove the other 6 channels from the library and it would work the same.

The problems that you have with the device hanging is not due to the channel settings.
What code are you using?

1 Like

Thanks.
No, the device is not hanging.
What happens is that suddently it stop been able to send data over lorawan and it keep failing after.
It happens after 3000 seconds or more.
suddently one TX return -1 and it keeps like that.
I just NVIC_reset() and it start working again but before reset i print the LMH_ERROR and STATUS and I get 0 for error and 1 for status, that mean it is all ok but still I cannot TX.

I would like to be able to manage via software, try to rejoin the network or solving the issue but I am not getting more details.
The Lora gateway is not even receiving that TX.

Are you using one of our example codes?
What is the send interval you are using to send packets?

Hello Beegee, sorry for delayed replay, I have been on holidays.
I was using the example and it failed the same.
Curiously, when I moved from AS923-1 to EU868 it is not failing anymore.
Indeed, in AS923 when I was getting a send error I needed to restart device to get it back to normal but in EU868 it can fail some sends and after works well the following ones.
Really extrange.
Maybe it was the LoraWan Gateway, Milesight with included packet processor layer, now I am in Europe and connected to TTN.