-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Directly revert back to MAX_TX_POWER on AdrAckCounter >= ADR_ACK_LIMIT? #723
Comments
Your understanding of the specification is correct. The network server has just to perform a downlink to the end-device to confirm that the server and the end-device are seeing each other. Setting the From the description on referenced 389 issue I think that this will have a small influence on the end-device power consumption.
In LoRaWAN specification 1.1.0 the increase of the Please note that the LoRaWAN 1.1.0 ADRACKReq bit behavior is being back ported to the future LoRaWAN 1.0.4 specification. As of today I don't see the necessity to change the current implementation. But, if there is a strong demand to do so I think that your proposition looks to be a good compromise. We just need to verify if this doesn't break the LoRaWAN certification. |
This line can actually be quite problematic if the network server assumes (as it should) that end devices follow the specification.
Nothing is said here about stepping up the transmit power here, so this behavior is not compliant with the specification. What is specified is that the device must step up the transmit power after ADR_ACK_LIMIT + ADR_ACK_DELAY uplinks:
So perhaps the line @brocaar pointed out is just in the wrong place and should be moved to below The reason that this is problematic is that the ADR algorithm in @TheThingsNetwork's stack (and hopefully other stacks) expects that end devices to follow the behavior described in the specification above, and therefore assumes that the end device did not immediately change the transmit power to MAX when an uplink with AdrAckReq=1 is received by the network server. Therefore, the ADR optimization algorithm is performed with the known parameters of the end device (i.e. the TxPower before the device decided to set it to MAX). This will result in an incorrect optimization, as the measured link margin was not achieved with the expected/known TxPower, but with the MAX TxPower. The network server doesn't know that, and may optimize the TxPower of the end device relative to the known TxPower, possibly sending it to a too low TxPower. This may break the connectivity of the device, and is obviously not what we want. |
@htdvisser Thanks for the feedback. Generally, I agree with your remarks. but, in 1.0.x LoRaWAN specifications the transmit power is not mentioned at all. As said on my previous comment the addition of the transmit power control was a request from some LNS providers. If we want to exactly follow the 1.0.3 specification actually we should completely remove the transmit power control. But, there is the risk to have end-devices not being able to reach the LNS in some conditions. We didn't want to make the @brocaar proposed change because we were afraid to break the current LoRaWAN certification process. As a side note, the text that you reference doesn't look to correspond to LoRaWAN 1.0.3 specification. The 1.0.3 specification doesn't mention the transmit power at all. Neither when the LNS performs a downlink or when it doesn't. The text that you reference looks more to the one in LoRaWAN 1.1.x specifications. In plus these specifications provide an example on how it should work. |
Since 1.0.4 is still under NDA, I couldn't quote its text directly. However, as you already wrote, this part is backported from 1.1, so I quoted the 1.1 text. Since neither the current implementation (switching to max tx power after ADR_ACK_LIMIT) nor the proposed change (switching to max tx power after ADR_ACK_LIMIT + ADR_ACK_DELAY) is explicitly described in pre-1.0.4 specifications, the most correct solution (from a certification perspective) would be to completely remove the line for pre-1.0.4 certification and move the line (as proposed) for 1.0.4+ certification. |
The reported issue here was on master branch which implements 1.0.2 specification. I think that the proposed change shouldn't have an impact on the certification and it avoids loosing devices at a small cost. I only see advantages by implementing the transmission power control, that's why this has been included in recent versions of the specification. The feature/5.0.0 branch implements already the 1.1.x behavior when connected to a 1.1.x LNS. If connected to a 1.0.x LNS the used behavior is the 1.0.x. We will start working on 1.0.4 specification in the coming weeks. This new version has the same exact implementation as the 1.1.x versions of the specification. |
…>= ( adrNext->AdrAckLimit + adrNext->AdrAckDelay ) )` The Tx power control is not specified into LoRaWAN specifications 1.0.3 and below. Although its control is advisable in order to avoid loosing connection in some conditions. This addition shouldn't have any impact on ADR algorithms nor on the certification process.
LoRaMac-node/src/mac/region/RegionEU868.c
Line 504 in 83b6086
Shouldn't this happen only when the device is decreasing the data-rate?
How I understand the ADRAckReq is that it is there to force the NS to send a downlink, even when it doesn't have any downlink data in its queue / mac-commands to send so that the device can confirm it is still connected. I don't believe reverting the TX power to its max is the correct behavior at this step.
It would make sense within
if( adrNext->AdrAckCounter >= ( EU868_ADR_ACK_LIMIT + EU868_ADR_ACK_DELAY ) )
I believe as this is where the device starts lowering its data-rate.The text was updated successfully, but these errors were encountered: