LoRa module - JOIN_ERROR resolution

Hello,

is there any way how to get some debug information in case when LoRa module returns JOIN_ERROR after sending AT$JOIN? Or it would help if JOIN_ERROR was followed with code of error and there was a list of possible reason i.e. “100=no LoRa wan signal in range” etc.
So, how can we quickly determine what we are doing wrong in case of JOIN_ERROR?

Regards
Oskar

Hello,

there are two ways how to get more info. Howvere the firmware from Murata really sends just JOIN ok and JOIN error. But you can check if there is not problem somwehere else.

image

Can you copy me complete list commands that you write after you do power reset? Can you check that you have set AT$MODE=1 (OTAA) because this parameter is always 0 after reset (ABP).

USB UART TTL converter

Connect to the P3 RXD1 pin and see the modem response after the JOIN command. Baudrate is 9600 baud.
https://developers.bigclown.com/hardware/header-pinout
The response should be +EVENT=1,1 in case of success and +EVENT=1,0 in case of JOIN_ERROR. This is related to the table above. First 1 means its a join reponse, and the 1 or 0 is the answer if the join was successful. In some case with bad settings it is possible that the modem could response with some other message.

SWD/JTAG debugger

You can put breakpoint to the line https://github.com/bigclownlabs/bcf-sdk/blob/master/bcl/src/bc_cmwx1zzabz.c#L666
and check what is the reponse self->_response. You can do that also without a debugger if you use bc_log_init in the application setup and bc_log_debug in the line where you would like to print response to the console.
More about uart debugging could be find https://developers.bigclown.com/firmware/debugging

Can you please give me more info:

  • Which firmware do you use - do you compile your own or one of ours? which one?
  • Which LoRaWAN network/provider do you use? (TTN, CRa or your own?)
  • Which frequency and modulation do you use? (EU868? are you from Czech Republic?)

We had experience that with our own Semtech gateway we had to set NWK parameter to private


It seems like LoRaWAN networks around are “public” but when you create your own, it is private and you have to configure that by NWK parameter.

I would recommend that you use sending of ABP packet first to confirm that communication works with your gateway, then move to the OTAA.

Martin

Hello Martin,

thank you for quick answer.

Here is additional info:

  • AT commands I have used to set the LoRa module (sure, before that I have set all Keys needed):

AT$BAND=5
AT$MODE=1 (yes I know, after reset it is 0 … not much convenient)
AT$JOIN

  • Firmware I use from Playground (latest)

  • LoRaWAN I use my own based on RAK2245 Pi HAT (Semtech based : SX1301, supports LoRaWan 1.0.2 protocol, EU868 …)

  • Frequency EU868 (yes, yes :slight_smile: )

I’ll try suggestions from your post and I’ll come back later. It seems that I’ll have to dive into the problem more deeply. In meantime additional questions regarding topic are welcome.
Oskar

Hello Martin,

JOIN_OK, trick was in NWK parameter you mentioned. Funny thing is that it was set to 0 and I dad to set it to 1.
Thank you for your hint, now I have to try to decode LoRa module message on server side.
Regards,
Oskar

1 Like

Perfect!
I never understood this private/public network thing, but it seems like it can be configured in the gateway.

I’m glad you got it working. Let me know if you will need any help.
Martin

Hello Martin,

I have got message parsed on server side with help of JavaScript source code:


So far so good.
No additional help is needed for now.
Thank you.
Regards,
Oskar

1 Like