Get the number of ACK attempts
- This topic has 8 replies, 3 voices, and was last updated 1 year, 9 months ago by Jason Reiss.
-
AuthorPosts
-
January 13, 2022 at 4:12 am #32302kkhylchukParticipant
Hi,
For enabled ACKs
dot->setAck(8);
is there a way to get the number of attempts to receive an ACK?Thanks.
January 13, 2022 at 7:30 am #32303Jason ReissKeymasterSee getAck in the header file to retrieve the value that is set.
https://github.com/MultiTechSystems/libxDot-dev/blob/master/mDot.hThere are events for missed ACK that shows number of retries, and PacketRx gives the number of total retries when ACK is received.
https://github.com/MultiTechSystems/libxDot-dev/blob/master/mDotEvent.hJanuary 13, 2022 at 1:16 pm #32304kkhylchukParticipantThanks, Jason.
I implemented mDotEvent::MissedAck, but for some reason “retries” is always 0. I expected it to be equal to dot->getAck(). Or am I understanding this wrong?
January 14, 2022 at 8:07 am #32305Jason ReissKeymasterMissedAck retries should be the current number of retries attempted.
If you miss the first ACK is should be 0
If you miss the second ACK is should be 1
…January 14, 2022 at 8:50 am #32306kkhylchukParticipantYes, that’s what I expected to see, but instead, I see this:
... [INFO] Preparing frame [INFO] Adjust PowerMax to 21 [INFO] Configure radio for TX [INFO] Rx Window 1 [DEBUG] mDotEvent - MissedAck : retries 0 [INFO] Rx Window 2 [DEBUG] mDotEvent - MissedAck : retries 0 [ERROR] ACK not received [ERROR] failed to send data to gateway [-5][Operation Timed Out] [INFO] Preparing frame [INFO] Adjust PowerMax to 21 [INFO] Configure radio for TX [INFO] Rx Window 1 [DEBUG] mDotEvent - MissedAck : retries 0 [INFO] Rx Window 2 [DEBUG] mDotEvent - MissedAck : retries 0 [ERROR] ACK not received [ERROR] failed to send data to gateway [-5][Operation Timed Out] ...
I set the ACK retries to 8 like so
dot->setAck(8)
.
Callingdot->getAck()
returns 8.Also, I should note that I’m using libmDot-dev v4.1.2.
January 14, 2022 at 9:07 am #32307Jason ReissKeymasterWhat channel plan are you using?
Do you have ADR enabled?In LoRaWAN 1.0.4 the network controls the number of retries when ADR is enabled.
Perhaps the settings is being overridden by an ADR MAC Command?You could try to call setACK before each send.
What LoRaWAN network are you communicating with?
January 14, 2022 at 11:09 am #32308kkhylchukParticipantChannel Plan: US915
ADR is enabled
MultiTech’s Conduit, public networkIndeed, I see incoming ADR commands:
[DEBUG] ADR Set Redundancy 1 [DEBUG] ADR DR: 0 PWR: 0 Ctrl: 07 Mask: 0002 NbRep: 1 Stat: 07 [DEBUG] ADR Set Redundancy 1 [DEBUG] ADR DR: 0 PWR: 0 Ctrl: 00 Mask: ff00 NbRep: 1 Stat: 07
I tried calling setAck before each send, but no luck. The result is exactly the same.
July 21, 2022 at 7:00 am #32877SaSaParticipantdo you know please how I should put
Rx Window = 1
in a downlink message ?July 21, 2022 at 8:11 am #32878Jason ReissKeymasterA downlink can be queued through MQTT, rx_wnd is one of the parameters.
https://www.multitech.net/developer/software/lora/lora-network-server/mqtt-messages/
-
AuthorPosts
- You must be logged in to reply to this topic.