[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Raw ASCII file tranfer on a serial port

Posted on 1997-05-27
Medium Priority
Last Modified: 2013-11-15
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.
Question by:rfedane

Expert Comment

ID: 1626318
cat file > /dev/ttyS0
I don't know how to call it from minicom.

Author Comment

ID: 1626320
Your solution does is not raw ASCII.

Expert Comment

ID: 1626321
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.
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.


Author Comment

ID: 1626322
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.

Expert Comment

ID: 1626323
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

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


Expert Comment

ID: 1626324
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)


Author Comment

ID: 1626325

I screwed up. If ggeens resubmits his answer, I can award him the points.

Accepted Solution

fagrspf earned 400 total points
ID: 1626326
I agree that binary is not ASCII. But if you send control chr
then on some modem it will cause serious problem because it
actually send 7 bit not 8 bit.

From original require he want something I solve for him.

cp and cat is not much different.

I don't know exactly what his problem is.  But I am sure my IILC
is the complete solution. To whatever he want to do with
serial ports.


Assisted Solution

beacker earned 400 total points
ID: 1626319
Using minicom type '<ctl-a>s' then choose 'cat filename' for the program to be used, along with IO-Red set so that the output of the cat program will be set to the tty port.  If you wish to receive a file, use '<ctl-a>r' and 'tee filename' as the mechanism, setting IO-Red.

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are like me and like multiple layers of protection, read on!
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question