Solved

Raw ASCII file tranfer on a serial port

Posted on 1997-05-27
9
1,474 Views
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.
0
Comment
Question by:rfedane
9 Comments
 
LVL 1

Expert Comment

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

Author Comment

by:rfedane
ID: 1626320
Your solution does is not raw ASCII.
0
 
LVL 1

Expert Comment

by:sherwood
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.
0
 
LVL 1

Author Comment

by:rfedane
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.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Expert Comment

by:fagrspf
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

http://202.44.235.2/~supat

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

Regards,
supat
0
 
LVL 1

Expert Comment

by:bcook
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)


0
 
LVL 1

Author Comment

by:rfedane
ID: 1626325

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

Accepted Solution

by:
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.

Regards,
supat
0
 

Assisted Solution

by:beacker
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.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now