-
Notifications
You must be signed in to change notification settings - Fork 212
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
Optionally disable downlinks to save power (Caution: renders device non-compliant) #312
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution. Unfortunatley, this would violate the spec. In order to pass compliance testing, class A devices must accept MAC downlinks. That means this change is not a good candidate for library. Any change must be able to pass compliance testing, otherwise it will be too confusing and will make for a big support load.... Best regards, |
I'm not sure about the LoRaWAN spec but current settings will ruin batteries on most low-power devices unless they transmit a few packets per day. Anyway, people reaching this pull request can learn about how to do this hack. Thanks for your work, Daniel. |
I have reviewed the spec and the operation of the network. I caution all users NOT to use this patch on The Things Network or other public networks. The network depends on class A devices accepting downlink for MAC commands. This is not optional. Also, bear in mind that this will silently break ADR, Link Integrity checking, and other important features. This pull request will not be merged. |
Well, downlinks do not need to be disabled forever. With my last addition, they can be turned off and on dynamically by the user application. Let's assume that ADR and ACK's are disabled on the device. Then, there is IMO no downlink that might result of interest for the device. If the LoRaWAN specs forbid this behavior then I really don't understand the specs. |
Sorry, the spec is quite clear. A device SHALL open an RX window one second after each uplink (and a second one a second later, if nothing was received in the first window). The network is allowed to rely on this for MAC downlinks. Won't merge any changes that defeat this required behavior. Sorry. |
Understood. From LoRaWAN™ Specification v1.1:
It's only that imposing this requirement just from a timing perspective and not so strictly would open a lot of possibilities to low power applications. |
I think you misunderstood this requirement a little bit. It says that the device is not allowed to transmit anything while the RX windows are nominally open, just during this time. It can freely transmit after the RX2 window closes any time, taking duty cycle regulations into account of course. As for the other matters of this post, the power economy of this request will be next to nothing at the price of violating the spec compliance. Most importantly, adherence to the network's ADR control is vital in managing device's TX power and spread factor - this provides real power economy. |
The specs insist on network's control over device's TX power, datarate/spread factor and radio channel used - these are resources "owned" by the network. Devices that violate this ownership break network's performance and integrity. This is usual Regulation and radio networks even more so. LoRaWAN devices should never behave in ham-radio mode - that will never do good anyone. |
Giving this thread a bit more attention, I can see where the original misconception comes from. |
I added a LMIC_DISABLE_DOWNLINK definition in lmic/config.h in order to remove DNW2_SAFETY_ZONE + LMICcore_rndDelay(2) in processRx2DnData and then save around 5 seconds between transmission and reception of EV_TXCOMPLETE.
Low-power nodes which do not need downlinks can take advantage of this feature in order to save a lot of current.
I'm still looking around how to remove the 1.5-2 second delay still happening before EV_TXCOMPLETE