Periodically change to confirmed uplink

Hi All,

I’d like to use the wisblock API on Arduino to have a sensor node periodically check if it is actually in sight of a gateway or not, but would like to not exclusively use confirmed uplinks to play nice with Fair Use Policies.

Is there a way that I can switch from unconfirmed to confirmed messages, and back again without having to hard/soft reset the node?

There is no need to reset to switch between confirmed and unconfirmed messages, you can switch by changing g_lorawan_settings.confirmed_msg_enabled between true (confirmed) and false (unconfirmed) just before you call send_lora_packet(g_solution_data.getBuffer(), g_solution_data.getSize());)

if (want_confirmed)
   g_lorawan_settings.confirmed_msg_enabled = true;
   g_lorawan_settings.confirmed_msg_enabled = false;
send_lora_packet(g_solution_data.getBuffer(), g_solution_data.getSize());

Actually it is a good idea to create an API call for it or ti add it to the send_lora_packet() function call.

To stay backward compatible the API call looks like the better solution.

Excellent, yes it would be good to have an API call option for it, but your code snippet should work for my purposes just fine for now. Thank you again for your help!