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

class-c downlink queue processing issue. NS sends mac-commands but never reach payload data. #543

Closed
2 tasks
fancar opened this issue Jul 19, 2021 · 2 comments

Comments

@fancar
Copy link
Contributor

fancar commented Jul 19, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

What happened?

ns keep constantly sending downlinks to class-c device, which is offline if a message in the device queue for the device is present. It happens because every iteration ns sends mac-commands in frame payload, not application data. So the task won't be removed from the queue during ACK.

What did you expect?

ns shell not send mac-commands at all.

Steps to reproduce this issue

Steps:

  1. add a new class-c device.
  2. Switch it off after it sends the first uplink.
  3. put a message in a queue.
  4. in case if ns will decide to send a >15 bunch commands in the frame payload, you will see the loop: ns sends downlinks every 2 seconds (lock time).

Could you share your log output?

Your Environment

Component Version
Application Server v3.13
Network Server
Gateway Bridge
Chirpstack API
Geolocation
Concentratord
@fancar
Copy link
Contributor Author

fancar commented Jul 19, 2021

The note I've found in TS001-1.0.4 LoRaWAN® L2 1.0.4 Specification

2285
A Class C downlink SHALL NOT transport any MAC command. If an end-device receives a
Class C downlink containing a MAC command, either in the FOpts field (if FPort is either
missing or > 0 ) or in the FRMPayload field (if FPort=0 ), it SHALL silently discard the entire
frame.

If it's still relevant, then the solution is just removing setMACCommandsSet from scheduleNextQueueItemTasks

@brocaar brocaar closed this as completed in ad1c90a Aug 9, 2021
@brocaar
Copy link
Owner

brocaar commented Aug 9, 2021

Thanks @fancar , the above commit fixes the issue.

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