Get the number of ACK attempts

Home Forums mDot/xDot Get the number of ACK attempts

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #32302
    kkhylchuk
    Participant

    Hi,

    For enabled ACKs dot->setAck(8); is there a way to get the number of attempts to receive an ACK?

    Thanks.

    #32303
    Jason Reiss
    Keymaster

    See getAck in the header file to retrieve the value that is set.
    https://github.com/MultiTechSystems/libxDot-dev/blob/master/mDot.h

    There 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.h

    #32304
    kkhylchuk
    Participant

    Thanks, 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?

    #32305
    Jason Reiss
    Keymaster

    MissedAck 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

    #32306
    kkhylchuk
    Participant

    Yes, 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).
    Calling dot->getAck() returns 8.

    Also, I should note that I’m using libmDot-dev v4.1.2.

    #32307
    Jason Reiss
    Keymaster

    What 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?

    #32308
    kkhylchuk
    Participant

    Channel Plan: US915
    ADR is enabled
    MultiTech’s Conduit, public network

    Indeed, 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.

    • This reply was modified 2 years, 3 months ago by kkhylchuk.
    • This reply was modified 2 years, 3 months ago by kkhylchuk.
    #32877
    SaSa
    Participant

    do you know please how I should put Rx Window = 1 in a downlink message ?

    #32878
    Jason Reiss
    Keymaster

    A 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/

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.