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

Link check requests are being retransmitted #115

Closed
jefrin-dev opened this issue Oct 26, 2022 · 2 comments
Closed

Link check requests are being retransmitted #115

jefrin-dev opened this issue Oct 26, 2022 · 2 comments
Assignees

Comments

@jefrin-dev
Copy link

jefrin-dev commented Oct 26, 2022

I am working on handling the behaviour of the abz module in the mkrwan 1310 board for cases where the device is not properly connected to the network due to issues like gateway down, out of range etc.

I made the device join the lora network and turned off the gateway after it sent few uplinks. When I send an link check command it fails but it is retransmitting the link check requests about 8 times. In the wiki here it is mentioned that the link check requests are not retransmitted and will be sent only once per request.

Screenshot_20221026_115918

Screenshot_20221026_142946

  1. Is this link check behaviour normal or did I misunderstood something?

  2. This is not related to the above issue but do you have any idea on how often should (or when) the modem be made to re join the network?

@janakj
Copy link
Collaborator

janakj commented Oct 26, 2022

Thank you for the report! Link check requests transmitted without application payload should not be retransmitted indeed. From your logs it seems that I made a mistake here. The modem should ignore the AT+REP value in this case which does not appear to be the case. I will check this.

It's hard to say how often the modem should rejoin in general. That depends on many factors, e.g., physical parameters of your network, the number of devices, intended application, security requirements, etc. The main benefit of rejoining periodically is that your session keys get reset. That limits the total number of bytes encrypted with the same session key which is good from a security perspective.

On the other hand, it may be difficult to execute a Join automatically and reliably by devices deployed in the field. An OTAA Join is a fairly disruptive operation from the device perspective. It resets many MAC parameters, including the parameters negotiated with ADR. In addition, this implementation transmits OTAA Joins with DR0 by default (for reliability), which can drain the battery if performed too often.

@janakj janakj self-assigned this Oct 26, 2022
@janakj
Copy link
Collaborator

janakj commented Nov 12, 2022

Hi @jefrin-altrosyn, I am not able to reproduce the link check retransmissions. Are you still able to reproduce the behavior? Also, what values do you have in AT+REP and AT+RTYNUM?

Update 1: Also, the LoRaWAN spec does not seem to say anything about link check retransmissions. I am not sure why I put the note into the documentation. It might have been an error on my part. In the modem firmware, uplink retransmissions are internally handled by LoRaMac-node which, at least in my case, does not seem to retransmit link check requests with an empty payload (which is what AT+LNCHECK=0 sends).

Update 2: Never mind! I found the bug. Your original report was correct.

@janakj janakj closed this as completed in 4582047 Nov 12, 2022
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

2 participants