RUI 3 resending data when not receiving ACK

Hello teams,

I have a query I have been using rui3 best practice repository.

I need to know if when the ACK mode from RUI3 is enabled, the device does not need any other configuration to save and forward data when it does not receive a true ACK from the Lorawan gateway or should this function be added with custom code?

Example: I have a temperature and humidity sensor, the gateway turned off due to power loss. It is possible that the data that it cannot send will be saved in its internal memory and then when it detects the gateway on again, it will begin to resend data every 1 min until the message queue ends. then continue with its normal operation.

I have practiced with these examples:

but I see that my gateway sends an ACK message. but I want to confirm if it works as I mentioned in the previous example.

You have to enable confirmed packets (obviously)

AT+CFM=1
api.lorawan.cfm.set(1);

You have to set the numbers of retry if no ACK is received (here I set 8 retries)

AT+RETY=8
api.lorawan.rety.set(8);

The packet is not saved in internal memory if the retries are exhausted and still no ACK from the server.
You have to handle this in your application and retry to send the packet again.

Thanks for your prompt response,

Do you have an example to save data or payload in the internal memory and then send it when it has coverage.

By verifying the examples, you have them applied, you just have to modify them here:

#include "inc/app.h"
#include "inc/wisblock_cayenne.h"

/** Packet is confirmed/unconfirmed (Set with AT commands) */
bool g_confirmed_mode = false;
/** If confirmed packet, number or retries (Set with AT commands) */
uint8_t g_confirmed_retry = 0;

I change the value to true and change the number to the number of attempts I need.

 Serial.begin(9600);
	// Setup for LoRaWAN
	if (api.lorawan.nwm.get() == 1)
	{
		g_confirmed_mode = api.lorawan.cfm.get();

		g_confirmed_retry = api.lorawan.rety.get();```


many thanks.

I do not have an example for saving the packet.
What you can do, the payload buffer is still available after you send the packet. You can re-use it for a new attempt to send it.

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