LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-29-2007, 03:33 AM   #1
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Rep: Reputation: 15
sample example of how to read files


can any one give me sample program which reads files from serial port(Rs-232) and write it into another serial port. i m using fedora core -6
Best Regards,
Amit
 
Old 05-29-2007, 04:29 AM   #2
tread
LQ Newbie
 
Registered: Feb 2007
Posts: 29

Rep: Reputation: 15
See minicom source code.
 
Old 05-29-2007, 10:30 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You can keep asking the same question, hoping to get an answer that satisfies you, but the correct answers have already been supplied. Serial ports do not embrace any concept of files. They are merely conveyors of bits and bytes. To understand the mechanics of passing streams of bytes through a serial interface, see the two HOWTO's regarding serial IO programming on tldp.org: http://tldp.org/HOWTO/Serial-HOWTO.html, and http://tldp.org/HOWTO/Serial-Program...WTO/index.html There are several examples in the HOWTO's. It will be up to you to contrive a method of transferring the file-related data, plus any error checking, however this is simply a re-invention of a solution that has been done many times already. You could implement an already existing protocol, and the suggestions of Zmodem and Kermit protocols have been made. There are others, if you do just a little bit of research.
--- rod.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read only files Gins Linux - General 14 01-08-2007 04:30 AM
I need sample Makfile for 2.6 kernel to compile C & ASM files someshwar Linux - Kernel 1 10-15-2006 02:10 PM
mozzla problems-can not read files online, can not read attachments sarajevo Linux - Software 1 09-20-2005 06:58 PM
How to read files on cd Jack Techno Linux - Newbie 4 05-27-2005 10:41 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration