I have a question on using confirmed uplink mode in RUI3 (V4.2.1) on a RAK3172.
Can my code send all the normal data uplink in confirmed mode, but also on occasion (e.g. some non-critical uplinks) send data without confirmation? I am having issues switching to “non-confirmed mode” via the send api.
I am normally sending my RAK3172 data via:
if (api.lorawan.send(data_len, (uint8_t *) & collected_data, LoRa_fport, true, 6))
{
tx_active = true;
}
else
{
tx_active = false;
Serial.println(“Sending Data Start failed”);
}
// The above works, giving serial output of:
+EVT:SEND_CONFIRMED_OK,
sendCallback
But when my program on occasion does a “non-confirm” send as follows:
api.lorawan.send(data_len, (uint8_t *) & collected_data, LoRa_fport, false);
if(LoRaDebug){Serial.println(“Sending STATUS without Confirmation”);}
// The above works, giving serial output of:
sendCallback
+EVT:TX_DONE
However, the next attempt and subsequent attempts to send data via the confirmed uplink mode fails (serial printout of “Sending Data Start failed”) from the next occurrence of:
if (api.lorawan.send(data_len, (uint8_t *) & collected_data, LoRa_fport, true, 6))
{
tx_active = true;
}
else
{
tx_active = false;
Serial.println(“Sending Data Start failed”);
}