Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the JOIN procedure #15

Open
mjunior-fitec opened this issue May 7, 2019 · 9 comments
Open

Problem with the JOIN procedure #15

mjunior-fitec opened this issue May 7, 2019 · 9 comments

Comments

@mjunior-fitec
Copy link

@facchinm I've been experiencing some troubles with the JOIN procedure using the MKRWAN.h library. To confirm I used a sketch that enables me to send AT commands directly to the modem.
On those tests I realized that the modem doesn't answer the AT+JOIN command. It only returns something when it receives the JoinAccept message from the Network Server. The MKRWAN.h implements a 1 minute timeout, waiting for the "EVENT=1,1" message. When everything runs fine it works, but it's quite common that the JoinAccept message takes 2 or 3 minutes to arrive. Also, when something is wrong (no gateway reachable, wrong keys...) it looks like the modem keeps sending JoinRequest indefinitely! On my tests I saw it runnig for about 2 hours. When it occurs, the device may went in a loop, trying to establish a join .
It might be a big problem, since the JoinAccept message can be already sent, the radio received it correctly, the keys were set and the "EVENT=1,1" message sent but never received by the Arduino processor. In this situation, when the new "AT+JOIN" message is sent, the modem doesn't answer and, the worst, the radio sent nothing! I believe that the modem must answer all the commands, everytime an "AT+JOIN" message is received by the modem it should answer, for example with a "+OK", and when the join was already done and the Join State is JOINED it should answer informing this situation (Already joined?).
Checking the Murata documentation, they say that on their modem implementation this is the behaviour. Also, there are many other usefull AT commands like the Multi Cast configuration, wich would be very usefull on the MKRWAN1300.
Does the current ST implementation have some improvement related to it?
Are you planning to correct this on the modem and in the MKRWAN.h lib?

Thanks.

@facchinm
Copy link
Member

facchinm commented May 8, 2019

Hi @mjunior-fitec ,
while we tried to make the ST stack as similar as possible to the murata one, it was probably not a great idea 🙂
Currently we are working on a fw and a library that will supersede the actual ones, solving most of the reliability problems and giving access to the most recent LoRa specifications.

@mjunior-fitec
Copy link
Author

mjunior-fitec commented May 8, 2019

Ok @facchinm .
On the current version of FW and lib, is there any work arround suggested to get the JoinAccept when it takes more than one minute? Also, is there a safe way to try a new Join OTAA, knowing that the modem may not answer the "AT+JOIN"? Maybe checking with modem.getJoinStatus (which is currently private!), and then a modem.restart ?
Thanks.

@mjunior-fitec
Copy link
Author

@facchinm can you tell me what is the expectation to have a Multicast implementation on MKRWAN1300, just like AT+MCAST that exists on the Murata firmware?

@terryzar
Copy link

terryzar commented Feb 5, 2021

Hello Facchinm, I am having same issue where I need to ad MCAST or CHMASK to tthe code. Do you have the Murata AT command documentation for these commands? Much appreciated!

@facchinm
Copy link
Member

👋
We added support for channle masks in the lates firmware (1.2.3) and in this PR arduino-libraries/MKRWAN#90 . Would you mind testing it and reporting if it works? Thanks!

@terryzar
Copy link

terryzar commented Mar 30, 2021 via email

@flhofer
Copy link

flhofer commented Apr 22, 2021

👋
We added support for channle masks in the lates firmware (1.2.3) and in this PR arduino-libraries/MKRWAN#90 . Would you mind testing it and reporting if it works? Thanks!

Hi! I will have the opportunity to fully test the channel mask in the next few days. My gateway just gave up and I hope to get a new one by tomorrow afternoon. If I remember right, when writing the code I already adjusted something in the arduino library. Will post it here as soon as I get some results.

@flhofer
Copy link

flhofer commented May 2, 2021

@facchinm @terryzar
HI, the channel mask works with my pull request version arduino-libraries/MKRWAN#93
The thing I noticed is:
If you use ABP, the modem does not know anything but the default frequencies. You might need to compile with USE_SEMTECH_DEFAULT_CHANNEL_LINEUP 1 to use all 8 standard channels.
Using OTAA it learns from the Network server, as expected. BUT You can not disable the default channels (1-3)

@mjunior-fitec
Also, with my latest library and firmware version, the modem responds with +ERR_BUSY if the join goes in timeout and you try to send. So, if it takes longer you can just poll the join status and then continue.
Also, the firmware is implemented as described. If the modem has joined, it should actually return immediately after a join. In my test setup I join the network multiple times in a few minutes over OTAA and the modem typically answers within a 3-5 second span. Try the version in my pull request. If it still doesn't work, it could be that you have problems with your network server (had something similar)

Best,
Florian

@terryzar
Copy link

terryzar commented May 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants