I'm trying to upload a firmware file over serial connection to a device that requires YMODEM protocol, from a raspberry pi. After a lot of digging, I keep finding that the sz --ymodem [file]
command is the tool to do this. I've already managed to just communicate with the device using this example, but I'm having no luck with sz
.
I've read through the sz
documentation and it leaves me with a question. How do I determine if it is sending to the device? It is plugged in via USB and has port /dev/ttyACM0
. Other examples talk about sending from a remote host to a local host via sz
by default, but that's as deep as any explanation goes.
The device has a command which tells it to anticipate a file transfer; I believe this takes the place of rz
, but the device documentation says it "Prepares the device for YMODEM transfer via HyperTerminal." I've sent it the files via HyperTerminal and a proprietary program successfully, but I need to be able to do it on linux command line.
I'm sure this is a case of inexperience and I'm missing something obvious, but how can I fully execute this file transfer from start to finish / what am I doing wrong?
putty
, now getting this error:(putty:732) Gtk-WARNING **: cannot open display:
– Jack Mason Mar 30 '16 at 19:06minicom
– infixed Mar 30 '16 at 19:45minicom
as well. After establishing the right port settings, it says the port is "offline". Sending through the ymodem upload option ofminicom
then, does one attempt and showsRetry 0: Timeout on pathname
– Jack Mason Mar 30 '16 at 19:47stty clocal > /dev/ttyACM0
. turn off all flow control – infixed Mar 30 '16 at 19:52AT$FWDL
command is supposed to prepare it to receive the file. I tried this on HyperTerminal and it worked. – Jack Mason Mar 30 '16 at 20:00AT
followed by a enter should sayOK
. Does that work? That's typical for inside smartphones these days – infixed Mar 30 '16 at 20:02AT&K0
command on minicom to turn off flow control on the device side. When you were using hyperterm to a real serial port, you may have had RTS nad CTS lines, and now you're on a 3 wire connection. By the way, are you sure you don't need a null modem type serial cable on this port? – infixed Mar 30 '16 at 20:05AT
with$ERROR=102
(its standard error message for incorrect command arguments) once, then stopped responding to it altogether. It is replying correctly to all the otherAT
commands it is supposed to receive. For clarification, it is a telematics device with GPS and mobile antenna, like a smartphone. – Jack Mason Mar 30 '16 at 20:06AT$DWDL
(then enter key) are you seeing the C characters that YMODEM is supposed to be handshaking with? likeCCCCC
if you wait a while. That indicates the device side is ready for the Ymodem. I'm looking at a random manual at http://fccid.io/pdf.php?id=2010408 – infixed Mar 30 '16 at 20:16sz --ymodem filename
andminicom
ymodem send while this is happening. Both show timeouts after one try. – Jack Mason Mar 30 '16 at 20:19AT
should let you establish a speed. Maybe one side is too fast. Try something slower like 19.2K. That manual is using 57600. make sure you are using 8 bits no parity too. I need to go. Sorry – infixed Mar 30 '16 at 20:21