End-device fails to send the data packets after a while

Hey all,
I have been trying to send the data to the gateway using 5005 wisblock with rak4631 core. When I upload the code it joins the network and sends 4/5 packets of data and then suddenly stops sending the data and shoes the message “lmh_send fail count 1”. This happens when I was trying to send the gps coordinates. See the picture of Arduino serial port;

It also happens when I tried to use 1906 Environmental sensor too.
Any Ideas why this is happening? Any possible solution?

Hello Hiren,

What examples are you using? The one from the BSP or the one from our WisBlock Repo ?

What network server are you using?

Three things to check:
Disable ADR

static lmh_param_t g_lora_param_init = {LORAWAN_ADR_ON, LORAWAN_DATERATE, LORAWAN_PUBLIC_NETWORK, JOINREQ_NBTRIALS, LORAWAN_TX_POWER, LORAWAN_DUTYCYCLE_OFF};

to

static lmh_param_t g_lora_param_init = {LORAWAN_ADR_OFF, LORAWAN_DATERATE, LORAWAN_PUBLIC_NETWORK, JOINREQ_NBTRIALS, LORAWAN_TX_POWER, LORAWAN_DUTYCYCLE_OFF};

Change the send frequency to a longer interval

#define LORAWAN_APP_INTERVAL 20000

to

#define LORAWAN_APP_INTERVAL 30000

Change the datarate

#define LORAWAN_DATERATE DR_0	

to

#define LORAWAN_DATERATE DR_3	

ADR
Adaptive datarate was reported several times to create problems. Proposal is to keep it off.
Send Interval
20s is quite short since network servers changed the RX times to up to 6 seconds. It could be the packets are transfered to often which causes a problem that the LoRa transceiver is still busy when the next packet is transferred.
Datarate
The examples use DR0, which is the smallest packet size (19 bytes in US915). That should be sufficient for the data packets, but it is on the limit and can cause problems.

1 Like

Thanks a lot beegee. I am using the example from Wisblock Repo. GPS_Tracker (See picture).
I am using TTn V3 as network server. I am using Rak7249 as a gateway.

I have changed the codes as you suggested. But same thing is happening. Same thing is happening with the Rak1906 Sensor. For Rak1906, I changed the code as your configuration. I am using the Example codes for 1906 too.

One more thing, The gateway is 1-1.25km away and signal strength I can see in ttn is in range of -110 to -120 (RSSI). Could this be the reason? I Why it keeps failing to send the data once it starts to fail?

Let me know.
Thanks in advance.

The signal strength looks quite bad, but it should not influence the sending. The error message indicates a problem within the LoRaMAC library. I saw this before, but the changes I suggested fixed it. If sending too often, the library get’s stuck in a busy status and reports the send failure.

Looking on your log output, it seems that the code tries to send every 10 seconds, which seems strange, as it should be 20 seconds or more (if you did the change I suggested). That is definitely too often.

image