Raw ASCII file tranfer on a serial port

Posted on 1997-05-27
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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.
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.


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 200 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 200 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

If your app took Google’s lash recently, here are the 5 most likely reasons.
Fine Tune your automatic Updates for Ubuntu / Debian
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

730 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