Troubleshooting Slow Data Transmission from RAK11720 Module to Gateway

I successfully send data from RAK11720 module to gateway using api.lorawan.send() function, but . this is too slow for me i want to send my data atleast 500ms but in reality i am sending 2-3 seconds after sending one data.
what’s the problem

Welcome to the forum @Zorkii

If you need to send data every 500 ms, then LoRaWAN is not the right choice.
LoRaWAN is not designed for such fast uploads.

The TX/RX cycle takes typically a few seconds.

Of course you can shorten the RX_Delay1 and ignore the second RX window, but then you are violating the protocol.

thanks for the reply @beegee

If I shorten RX_Delay1 and ignore RX2, what is my minimum data transfer interval?
and how do i do it? I am running program on loraWan_OTAA example.

You can change RX1 delay on the device with AT command AT+RX1DL or API call api.lorawan.rx1dl.set

But you have to change it on the Network server as well. How, depends on the LNS you are using.

Regarding RX2, I am not sure. It is fixed in the LoRaWAN protocol that there is a RX1 and RX2 window. RUI3 does not support ignoring RX2 window, and I don’t think you can disable it on the LoRaWAN server as well (sorry if I gave a wrong tip).

What you cannot change is the RX1 and RX2 window lengths (at least I found nothing).

The minimum value of api.lorawan.rx1dl.set is 1 second and the minimum value of api.lorawan.rx2dl.set is 2 seconds. For RAK11720 enddevice, are you checking whether the sent data has successfully arrived at the gateway?
When I think about it, I understand that the enddevice checks whether the transmission was successful, but it doesn’t know whether it went to the gateway.

The gateway is just a data forwarder. It has no functionality regarding checking if a packet has arrived or was sent.

On the end device, you can indeed only see if the TX was successful, but you do not know whether it was received by a gateway and (more important), if it was actually received by the LoRaWAN server.

If you want to know in the end device if the data packet has arrived at the LoRaWAN server, you can use confirmed packet mode or link check.

Both require working RX1 and RX2 windows, because the information if the packet was received by the LoRaWAN server is send in one of these windows.

hi @beegee ?
Using the RUI3 API, the data received serially on the arduino is sent to the gateway using the api.lorawan.send function.
How to transfer a large amount of data in this situation where the data being read serially is 20-60 bytes?


if (Serial.available()>0){
String data = Serial.readStringUntil(‘\n’);
int data_len = snprintf((char*)collected_data, MAX_PAYLOAD_SIZE, “%s”, data.c_str());
if (api.lorawan.send(data_len, collected_data, 2, false)){
Serial.println(“Sending is requested”);
} else {
Serial.println(“Sending failed”);

The max payload you can send with one transmission is depending on your LoRaWAN region and selected data rate.

You can find the max payload size per region and data rate in our Documentation Center Maximum Transmission Load by Region

Keep in mind, lower datarate usually means better range, so you have to balance range and payload size.
If your payload is very large you might need to split it into multiple packets, send them one by one and then put them together on your end point.

I’m running on AS923, so now if I set the data rate, this function api.lorawan.send(data_len, collected_data, 2, false)
Can it be understood that 30-50 bytes will transmission without problems?

Does not ensure that the packet is successfully sent. You set confirmed to false, so there is no ACK from the LoRaWAN server if it received the packet.

You can improve the probability of a successful transmission by enabling confirmed packets and set a retry count.

Check the documenation for [ ```
api.lorawan.send(length, payload, fport, confirm, retry);

But even with confirmed packets, there is _**NO**_ guarantee that the transmission succeeds.