Sample Header Ad - 728x90

Write firmware over /dev/ttyUSB0 to embedded device

1 vote
1 answer
1388 views
I'm using the last example in: this post . I keep getting wctx:file length=0 after the sz command. I'm actually opening the serial connection with minicom Minicom is botching the transfer. So, after I get to press enter to begin update in the minicom window, at which point the normal course is to go into the menu, select S for send, choose Xmodem, locate the firmware file and select it, at which point the transfer begins and fails almost immediately. I move to a different virtual terminal window, and run sz -X -k -b -vvv - /tmp/sz_fifo > /dev/ttyUSB0 < /dev/ttyUSB0 after which I receive sz 0.12.21rc mode:1 sending s20806.lsz 0 blocks: give your Xmodem receive command now and I move into the minicom window where it still says to begin update press enter I hit enter, and get this in the sz window Xmodem sectors/kbytes sent 0/ 0kretry Timeout on sector ACK the last part repeated several times, then retry count exceeded followed by mode:0. I don't know if the fifo is empty, if I need to select Xmodem protocol in minicom, or what! I'm about to try using Windows for this job. I am far from from expert on modem protocols and fifos. Although I started somewhere around Debian Woody. In response to the comment, "hit enter before you hit s", Using minicom, update works by accessing the serial interface of the embedded card. Two options provided by the embedded card, CRCXmodem and 1K-Xmodem. I select 1K-Xmodem, and the response, "detatch terminal, change speed to 115,600, and reconnect". The card changes its own speed. Minicom reconnects after the speed change in port settings, and the embedded card says, "press enter to begin firmware update". At this point the written instructions in the manual for the embedded card read, "send firmware update file". I hit CTRLA + z for the minicom menu, select 'S' for send, at which point I can choose a protocol. I choose Xmodem, and a file browser appears, which I use to select the firmware file. Upon hitting enter, the update begins, shortly to fail. If I hit enter before I select 'S' in the minicom menu, nothing is sent, and the update fails. If I hit enter before accessing the minicom menu, the timer on the embedded card expires and the update fails. I was trying sz, because it worked in the link I provided above, using a named pipe. Without minicom, I don't know how to prepare the embedded system to receive the firmware, but minicom fails after that point. I was attempting to remedy that specific problem, especially since minicom has no option specifically for 1K-Xmodem, only Xmodem. Whereas, sz has the -k switch for 1K-Xmodem, as is specified in the options the card offers.
Asked by Brian (168 rep)
Aug 23, 2021, 03:31 AM
Last activity: Aug 11, 2024, 08:35 AM