please, what is the secret to operate the UART1 in RAK_CUSTOM_MODE ?
Hardware: RAK3172
Latest firmware: RUI_4.2.1
UART2 works perfectly in Default mode.
For UART1 it is very unstable. Normally the reception works but transmission not, or sometimes works for some bytes and stops again.
Is there any restriction for the baudrate? Seems it is a bit more stable when in 9600bps, and very unstable in 115200bps.
I already tried the Serial1.flush() command and does not solve the issue.
Also tried some tips from the forum, like Begin and End the serial twice, also not working.
If you set the low power mode and level, it will always go to sleep if the MCU doesn’t have any other pending process.
When activating low power mode, there is no need for api.system.sleep.all.
I am still evaluating this topic. It is working now, I had to add a delay between the transmissions (write to serial port)…
Is there a best practice to help in the system robustness?
Should I use the Serial1.flush() after the transmission?
Serial1.flush() might help as it is forcing to send any bytes left in the TX buffer.
9600 baud is quite slow. You might need to calculate the delay required to send all bytes of a transmission at that speed before sending the next packet.