Api.lorawan.send() always returning zero

I am using RAK4631 RUI version. The modules manages to join the LoRaWAN network successfully without any problem but when executing api.lorawan.send() it returns zero al the time. Why would this happen?

There can be many reasons.
Can you show your code, what is your payload size, what is the datarate you use, what LoRaWAN region do you use.

Thank you for the fast reply.

Here is the function I am using for data uplink. It has been working without a problem before.

The region is EU868MHz. The data size is around 10 Bytes being sent once every 5 minutes.

bool lorawan_uplink(uint8_t* loraPacket, uint8_t packetSize)
    /** Payload of Uplink */
    static uint8_t data_len = 0;
    //stay awake for amount of time to get downlink packet
    scheduler.sleepTimer = systemTick;

    memcpy(collected_data, loraPacket, packetSize);
    data_len = packetSize;

    if(false == api.lorawan.send(data_len, (uint8_t *) collected_data, 2, true, 1))


    return true;

What RUI3 version are you using?

How is collected_data declared?
How is scheduler declared and what is the value of systemTick?
What library do you use for scheduler? That is not an RUI3 function.


Sorry for the late replay

The problem was due to using very large payload data to send over LoRaWAN.

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