RUI3 Documentation Error?

It is my understanding that in RUI3, api.lorawan.send() is asynchronous. Therefore, an api.lorawan.cfs.get() command immediately after an upload send would always indicate a failure to confirm the upload as the Tx would not yet be complete and the Gateway not yet ACK’d? The RUI CFS example in the RUI3 API LoRaWan documentation CFS documentation example(snippet shown below) may need a delay between the “send” and “cfs” commands?
void loop()
{
uint8_t payload = “example”;

if (api.lorawan.send(sizeof(payload), payload, 129, true, 1)) {
    Serial.println("Send Success");
    Serial.printf("Send confirm %s\r\n", api.lorawan.cfs.get() ? "Success" : "Fail");

} else {
    Serial.println("Send fail");

}

delay(5000);

}

Hi @jmeck ,

I did some test and you are correct.

If you are sending a confirmed payload load, you should have +EVT:SEND_CONFIRMED_OK. If api.lorawan.cfs.get is prematurely executed, you will always see a Fail.

I added a delay to wait for the RX delays before capturing cfs api and tested it. It should work as expected.

image

@carlrowan Carl, thanks for the prompt reply and the “sanity check” on my understanding of the RUI3 Tx asynchronous nature.

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