The first code you showed is taken from the WisBlock-API, which right now works on RAK4631 and RAK11300 is still under testing.
The timer part of WisBlock API is not yet adapted for RAK11300.
I do not have an example to change the send frequency over downlink commands. But it is quite simple to implement it in the RX callback function. You just have to parse the downlink payload, read the new timer value and apply it.
and one more question
what max value for LORAWAN_APP_INTERVAL?
we want to set the interval to 2 hours or more,
but when we set 7 200 000 - there are no packets after 2 hours(
The time is defined as an uint32_t
That means 4294967295 milliseconds 4294967 seconds 7157 minutes 119 hours
I think there is a bug in the MBed timers that cause an overflow.
Problem is that I cannot debug the BSP, we just take the Arduino-MBed for RP2040 and put our device in it. We don’t maintain the BSP.
yes, the reason in timer var size
so, 71 min - all ok
when I set LORAWAN_APP_INTERVAL to 72 min - packets start to be sent every 25 seconds:
4 294,967 seconds - 72 * 60 = - 25.033 seconds
and when I set the LORAWAN_APP_INTERVAL to 73 minutes - the packets are sent after every 1min 25 seconds:
4 294,967 seconds - 72 * 60 = - 85.033 seconds
I cannot fix it, the guys who maintain the Arduino-MBed BSP should be able to fix it.
Every WisBlock Core has different MCU, which means different BSP.
I didn’t test on the RAK11200 (ESP32 BSP), But I had the RAK4631 set to 6 hours (soil moisture sensor) and it worked.
Yes, but how to how to pass my variable value to g_lorawan_settings?
For example, I have var relay_1 (it will it will change by downling command), and I need firstly add it to the g_lorawan_settings struct? and then apply by save_settings()? right? or I’m wrong?))
Hello beegee, I am using rak4631 to send data to the gateway through lora. I have a little doubt about Lora transmission interval. The default is #define LORAWAN_APP_INTERVAL 20000. But I want to know what is the minimum value that can be set?