RAK2270 Sticker Tracker: Message Send Command Response

I am currently working with the RAK2270 Sticker Tracker using the Arduino IDE. I have successfully configured the tracker to send messages via the gateway and receive an acknowledgment with the status message +EVT:SEND_CONFIRMED_OK. However, I am having difficulty locating the specific portion of the code where this flag is checked to confirm a successful response from the server. Additionally, I would like to understand where this status message is being printed to the COM port.

In scenarios where the gateway is out of range or powered off, the tracker returns the message +EVT:SEND_CONFIRMED_FAILED. I am also trying to identify the corresponding code segment that handles this condition.

For reference, I am using the code provided in the following repository: RAK2270 Sticker Tracker GitHub Repository.

Welcome to RAK forum @hasifast ,

These replies you are pertaining to are built-in on the LoRaWAN stack of RUI3. This means it is under-the-hood of firmware framework and not on the application code (that’s why you do not see it).

I would like to know how to confirm whether a message I send has been successfully received by the server. Specifically, how can I monitor the acknowledgment (ACK) message in the code to verify that the message was sent successfully? If there are alternative methods to achieve this, please let me know.

In the void sendCallback(int32_t status) callback status will give you the result of the confirmed message. Unfortunately there is no status code for ACK received or no ACK received, the status is from the LoRaMAC stack.

Basically (if you are in confirmed packet mode) RAK_LORAMAC_STATUS_OK means TX success and ACK received. Everything else means that either TX failed or no ACK was received.

I am using the TX callback and the status in my Signal Tester app.
convert status to readable response

The possible values of status are

typedef enum RAKLoRaMacEventInfoStatus
{
    RAK_LORAMAC_STATUS_OK = 0,                          ///Service performed successfully
    RAK_LORAMAC_STATUS_ERROR,                           ///An error occurred during the execution of the service
    RAK_LORAMAC_STATUS_TX_TIMEOUT,                      ///A Tx timeout occurred
    RAK_LORAMAC_STATUS_RX1_TIMEOUT,                     ///An Rx timeout occurred on receive window 1
    RAK_LORAMAC_STATUS_RX2_TIMEOUT,                     ///An Rx timeout occurred on receive window 2
    RAK_LORAMAC_STATUS_RX1_ERROR,                       ///An Rx error occurred on receive window 1
    RAK_LORAMAC_STATUS_RX2_ERROR,                       ///An Rx error occurred on receive window 2
    RAK_LORAMAC_STATUS_JOIN_FAIL,                       ///An error occurred in the join procedure
    RAK_LORAMAC_STATUS_DOWNLINK_REPEATED,               ///A frame with an invalid downlink counter was received. The downlink counter of the frame was equal to the local copy of the downlink counter of the node.
    RAK_LORAMAC_STATUS_TX_DR_PAYLOAD_SIZE_ERROR,        ///The MAC could not retransmit a frame since the MAC decreased the datarate. The payload size is not applicable for the datarate.
    RAK_LORAMAC_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOSS,   ///The node has lost MAX_FCNT_GAP or more frames.
    RAK_LORAMAC_STATUS_ADDRESS_FAIL,                    ///An address error occurred
    RAK_LORAMAC_STATUS_MIC_FAIL,                        ///Message integrity check failure
    RAK_LORAMAC_STATUS_MULTICAST_FAIL,                  ///Multicast error occurred
    RAK_LORAMAC_STATUS_BEACON_LOCKED,                   ///Beacon locked
    RAK_LORAMAC_STATUS_BEACON_LOST,                     ///Beacon lost
    RAK_LORAMAC_STATUS_BEACON_NOT_FOUND,                ///Beacon not found
}RAKLoRaMacEventInfoStatus_t;
1 Like

Is there a way to read “+EVT:SEND_CONFIRMED_OK” message that comes from RUI3 in our application code?

No, this message is generated by a RAK_LORAMAC_STATUS_RX2_TIMEOUT + confirmed packet enabled.
The +EVT: messages are only sent over the serial port.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.