I had been soak testing Seeed LoRa-E5 equipped TinyCLR and netNF devices for the last couple of weeks and after approximately two days they would stop sending data.
After a pointer to the LowPower section of the Seeed LoRa-E5 manual I realised my code could send the next command within 5ms.
I added a 5msec Sleep after the wakeup command had been sent
public Result Wakeup()
{
// Wakeup the E5 Module
#if DIAGNOSTICS
Debug.WriteLine($" {DateTime.UtcNow:hh:mm:ss} AT+LOWPOWER: WAKEUP");
#endif
Result result = SendCommand("+LOWPOWER: WAKEUP", $"A", CommandTimeoutDefault);
if (result != Result.Success)
{
#if DIAGNOSTICS
Debug.WriteLine($" {DateTime.UtcNow:hh:mm:ss} AT+LOWPOWER: WAKEUP failed {result}");
#endif
return result;
}
// Thanks AndrewL for pointing out delay required in section 4.30 LOWPOWER
Thread.Sleep(5);
return Result.Success;
}
The updated code is has been reliably running on TinyCLR and netNF devices connected to The Things Industries for the last 4 days.