Solved

Raw ASCII file tranfer on a serial port

Posted on 1997-05-27
9
1,479 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS CLI - Instances, Volumes & Tagging 2 75
route 2 traffic streams on single NIC 6 36
forensics tools for file amendments/associations 2 64
mobile app idea 17 56
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

920 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

13 Experts available now in Live!

Get 1:1 Help Now