[WLUG] Re: [Yaaarc] Binary serial upload?

Rick Green rtg at aapsc.com
Tue Jun 5 07:38:20 EDT 2007


On Mon, 4 Jun 2007, Paul Haas wrote:

> On 6/4/07, Rick Green <rtg at aapsc.com> wrote:
>> Dear lazyweb:
>>    Is there a terminal program for Linux which allows for the uploading of
>> binary files directly, with no molesting or modification by a 'protocol'?
>> Essentially, I'd like it to dd a file to the serial port upon command.
>> 
>> Minicom has several upload protocols available, and its setup script seems
>> to allow for the addition of others, but I've so far been unsuccessful in
>> trying to declare 'cat' or 'dd' as the helper app...
>
> My serial port is /dev/ttyUSB0.  While minicom was running, I used
> another window
> and typed
>  cat /home/paulh/junk > /dev/ttyUSB0
> and the contents of /home/paulh/junk came out unmolested from the serial 
> port.
> minicom's own "ASCII" transfer adds a <CR> after every <LF>, and I
> haven't figured out how to turn that off.  I hate it when software
> does me favors.
>
Thanks!  That's ugly, but it works.  It never occurred to me that I could 
write to a serial port from two processes without lock problems.
   I'm still baffled why it doesn't work when I declare /bin/cat as a 
'binary' option in minicom's config.
   The manpage for ascii-xfr, which minicom uses for its dumb 'ASCII' 
transfers, has an option to suppress that CR-stuffing, but even when I 
define a 'binary' transfer as 'ascii-xfr' without cr-stuffing and 
EOF-appending, it somehow still scrambles it.
   Anybody have a datascope?  Or know of a datascope application that will 
give me a 'hex dump' display of whatever is coming in the serial port?

-- 
Rick Green

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."
                                   -Benjamin Franklin



More information about the Yaaarc mailing list