Attempt no for the confirmation

When I get a confirmed packet, I want to know the attempt no.

When a device sends a confirmed data-up and it cannot get the confirmation, it sends the same packets again. In the application, it could be the first and original data sent by the device or it could be one of the retransmissions. I want to know the attempt no in the application.

Is there any way to get this info in the application?

Thank you…

That information literally does not exist. As you said yourself, it resends the same packet, which means that the uplink frame count is the same, too.

The LoRaWAN confirmed uplink scheme is a poor fit for many applictions.

In many cases, it would be better not to resend the old packet, but rather to send a new packet with potentially fresher data, and a new, unique frame count - then the skip in the framecount indicates the number of lost uplink attempts (if the node can send link level packets on port 0, make sure those and not just application port packets are being figuring into the calculation of what is a “skip”)

That could maybe be done by configuring/hacking the node firmware to only take one try at each confirmed uplink message, and on failure start putting together a wholly new packet (set the number of tries to 1 or the number of retries to 0, or change the actual code).

Often what’s actually better is to ignore the LoRaWAN confirmed uplink scheme, and instead have the data platform where you are ultimately sending things send back an application level confirmation that the data actually got to where it was needed. This also gives you some possibilities to implement a scheme where a node stores a few days worth of measurements, and instead of burning downlink airtime confirming everything, the data platform can wait some period of time then request resend of the specific pieces that didn’t get through.