What version of the WisBlock Base Boards are you using?
What other modules do you use? What Sensor modules, what IO modules?
First finding:
With RAK19007 Ver.B and the RAK12037 CO2 sensor (draws a lot of current when not shut down)
After battery was down to 1.7V over night, I put the device into the sun.
It did not complete boot up. The green LED went on, the blue LED stayed off, the device did not try to join the network. This indicates the firmware started, but because of low voltage on the battery and insufficient current it got stuck, LoRaWAN transceiver could not be initialized, CO2 sensor could not be initialized.
Possible reason:
The power control (WB_IO2) of the RAK19007 Ver.B is an imperfect solution. Some tests I did showed that 3V3_S (powering the CO2 sensor) was on, even WB_IO2 is floating.
This might be the reason for the device not be able to boot properly, because the CO2 sensor was powered on and drawing more current than available.
Next test, switched the Base Board to RAK19007 Ver.C:
This new version (produced and sold now) has an improved control of the 3V3_S supply and even if WB_IO2 is floating, it shuts down the 3V3_S supply.
With this Base Board I drained the battery again until the device switched off.
Then I put the solar panel under the sun.
The device booted up, First green LED, then blue LED, then it connected to LoRaWAN.
CO2 sensor was not initialized tho, most likely to low battery voltage (measured 2.8V directly at the battery) and still insufficient current.
But I did not see a complete hanging of the device that would require a reset to start it.
That’s why I ask which modules you are using, so I can adjust the test better.
As a first idea:
First thing in setup(), measure the battery voltage. If below 3.7V, do not try to initialize any modules or to connect through LoRa/LoRaWAN. Instead put the LoRa transceiver into sleep mode, then send the MCU into sleep as well for a longer time, before measuring the battery voltage again.