Link to home
Start Free TrialLog in
Avatar of rfedane
rfedane

asked on

Raw ASCII file tranfer on a serial port

I am looking for a utility for linux that will allow me
to transfer file to and fram a serial port in raw ASCII format. Preferably, I would like to call it from Minicom.
Please post the where I can get such a utility and
instructions to use it, if it is not straight forward.
Avatar of ggeens
ggeens

cat file > /dev/ttyS0
I don't know how to call it from minicom.
Avatar of rfedane

ASKER

Your solution does is not raw ASCII.
Could you give more detail about what and why you want to do
this?  E.g. are you trying to automate transfers, or are
you trying to have some kind of dialog with a not very bright
serial device, such as a printer, or terminal.
Avatar of rfedane

ASKER

I am trying to send a software image to upgrade a router
that requires raw ascii uploads. Since this is a binary file
it has to be raw ascii.
It has several ways to solve your problem.

1. I have my own code that can translate binary into hex
    e.g. A become 65
2. So, the binary will turn to be stream of 00 to FF
3. If you want to upload from linux to DOS I prefer using dip
   at linux side and telix on DOS side
4. on linux side you cp hex_files to ttySx

The complete solution on this mattter is by using IILC
Then you can directly ftp binary files from both sides.

IILC is available at

http://202.44.235.2/~supat

There are still abundant of method to transfer files via
serial ports.

Regards,
supat
What do you mean by "raw ascii", ascii is by definition a set of printable and control characters.

Are you actually trying to send binary. I.e. have no translation of the data being transmitted performed as it goes out ?

Or do you need to convert it into some ascii format (Maybe hex) to send it (Don't think so, otherwise it would have been supplied that way)

I think the first answer you had was correct, except that the serial port was in the wrong mode.   Do an stty -a </dev/ttyS0
(Or whatever serial port you're using) and post that, so we can see what the serial port is doing (Probably Xon/Xoff flow control)


Avatar of rfedane

ASKER


I screwed up. If ggeens resubmits his answer, I can award him the points.
ASKER CERTIFIED SOLUTION
Avatar of fagrspf
fagrspf

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial