Set a variable on received unconfirmed downlink

How can I set a variable when I received an unconfirmed downlink in Arduino?
I use the downlink example but the downLinkDataHandle function is not called when I received this message
void downLinkDataHandle(McpsIndication_t *mcpsIndication)

Hello @retofricker,
downLinkDataHandle only gets triggered when there is an actual downlink with data from the server… and not for Ack…

if you wan to get ACK you will need to add the following: downLinkAckHandle

void downLinkAckHandle()
   printf("Downlink Ack");

btw this gets triggered after the uplink is sent so i’m not sure what you are trying to achieve by setting setConfirmed = true; in there, maybe you could explain what you are trying to achieve so i can help you better.

Hi thanks for the reply, I like to achieve that I send the lora message as long, that I get the feedback from the server. On the console I received the message, but I need it in a function to set the variable setConfirmed=true

the add the above function to your sketch. it should trigger when you receive a message.