You’re right ! The behavior is due to having same sequence number in the linkcheckReq and it comes from the fact that my end device reboots in the early boot sequence.
In detail, the failing case goes as follows:
0) The linkCheckReq is set so the linkcheckReq is set for every Tx.
1) My end device joins the network
2) The 1st packet it sends is a confirmed packet + linkcheckReq with a given {fcnt:”N”, seqn:N”}
3) Mac command is answered with {opts:”02xx01} (so far so good)
Then due to software issue the end device reboots and the above sequence repeats.
So MQTT gets mac_recv with {id:”2″} and the exact same fcnt and seqn.
So network server must think this is a repeat packet but since this happens to be an ACK one, it has to answer with {opts:”02xx02}
Thanks for detailed answer !