Api.lorawan.send() return value with confirmed uplink

We setup a RUI3 lorawan RAK3172 node and use api.lorawan.send() successfully. This api call returns true if the node is setup with a confirmed message and the message is not confirmed (lora router turned off). Is this api call supposed to return false in this case as the uplink message was not successfull?

Alternately, we could check the status in the TX callback. Is there any documentation for the status value that is passed into the TX callback? It seems to return a 4 for confirmed uplink failure.

api.lorawan.send() returns true if the LoRaMAC state machine was not busy and accepted the send request. It has nothing to do whether the packet was actually sent.

Only way to know if a confirmed uplink was successful is indeed to implement the TX callback.

Regarding the returned value, the documentation for it is still work in progress and everything beside of 0 means that sending failed.

I still have to confirm, but a value of 4 means RX2 timeout (no ACK received from LNS).
If the LNS acknowledge the confirmed packet, you get a RX callback with fPort 0 like this on the debug output:

20:35:45.195 --> [TX-CB] TX status 0
20:35:45.195 --> [RX-CB] RX, port 0, DR 3, RSSI -80, SNR 11
20:35:45.296 --> +EVT:SEND_CONFIRMED_OK

If the ACK is missing it looks like this:

20:36:48.078 --> [TX-CB] TX status 4

ok, thank you for the details, we will test for 0=success in our TX callback.