Firmware upload protocol fails with 0x1A

Im using the V1.1 upload protocol, and it works okay up to the point where the transfer is initiated (see log, skipping the weird string and connect parts).

UART1 RX: “comok 1,67-0,NX4827T043_011R,162,61488,E4605836471D4531,16777216<\xFF><\xFF><\xFF>”
INFO,DISPLAY,Display confirmed firmware update. Continue process.<\r><\n>
UART1 TX: “whmi-wri 828488,115200,0<\xFF><\xFF><\xFF>”
UART1 RX:"<\x1A><\xFF><\xFF><\xFF>"

Here, the document indicates that 0x05 should be returned, but the error codes indictes and invalid variable. I’ve checked the file size (ok) and the baud raute obviously work because the “comok…” string is correctly transmitted. Is the size too big? The file contents are not much changed from the version that is currently running though, and its far from the capacity indicated by the comok string if that is worth anything.

Couldn’t find any further info googling, but I hope someone here has some insight.

Im a bit lazy, but if neccessary I could create a standalone minimum application but since the thing is built into some kind of device I’m currently trying to avoid that.

It’s very likely the 0x1A variable error is the response to the protocol reparse escape sequence.
When you send the “weird string and connect part” as one string it gets messed up and the answers (and the execution of the commands) are delayed.

In this example the commands are splitted (only 1 connect command as there is an answer already) and the answers fit to the commands.

Hey Marc, thanks for the response. I’ve since managed to get it working, and I believe that your explanation is correct. After I introduced a piece of code that awaits the responses to the earlier two parts of the connection procedure, it now works flawlessly. As to why, I am unsure, because I had sufficient delays inbetween (500ms). Maybe that was too much after all.

So if anyone else has the same problem, make sure to await all responses and dont rely on delays. Only the response to the last part is explicitly documented, but they all give some kind of acknowledge back, and I believe we are supposed to wait for that, and then continue more or less immediately.

1 Like