In some scenarios the firmware returns the downlink after CMSGHEX is done and the current code will ignore that. It also returns it with the +MSG: prefix which seems to be undocumented behaviour. I have my E5 in ABP mode, I didnt notice it when it was in OTAA mode.
As we can see there were bytes waiting on the serial port with our missing downlink. The AT+PORT flushes these while looking for "+PORT: 1" and they never get processed.
The code now flushes serial even if we are not in command mode and will look for TX messages. Change processTx() to strip the start as it could be any of CMSGHEX/MSGHEX/MSG. Note that MSGHEX sending would never have worked before.
In some scenarios the firmware returns the downlink after CMSGHEX is done and the current code will ignore that. It also returns it with the +MSG: prefix which seems to be undocumented behaviour. I have my E5 in ABP mode, I didnt notice it when it was in OTAA mode.
<manual tx push #1>
<manual tx push #2>
As we can see there were bytes waiting on the serial port with our missing downlink. The AT+PORT flushes these while looking for "+PORT: 1" and they never get processed.
The code now flushes serial even if we are not in command mode and will look for TX messages. Change processTx() to strip the start as it could be any of CMSGHEX/MSGHEX/MSG. Note that MSGHEX sending would never have worked before.
Now the following is read and processed on a Tx.