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 11-03-2005, 09:20 AM   #1
colin59
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
Writing files to serial port...in C


How do i write files (like a .jpg) to the serial port and have a pretty reliable stream of data that will go to another serial port? I'm looking to transfer about 1MB of data with no restrictions on time, however data has to be accurate. I'm thinking that it would be easy to have hardware flow control (i'm thinking that this will get handled automatically by the OS if it is enabled in the code) as a means of data integrity and making sure there are no buffer problems. Please help me with what direction i should take this.

I have read many articles on the internet which led me to libcurl and ftplib. I was thinking of using the libraries, but when it came down to it, i would probably have to write my own serial driver. Basically, all i want is data to be passed from one terminal to another through a serial port.
 
Old 11-03-2005, 11:06 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"How do i write files (like a .jpg) to the serial port and have a pretty reliable stream of data that will go to another serial port? I'm looking to transfer about 1MB of data with no restrictions on time, however data has to be accurate. I'm thinking that it would be easy to have hardware flow control (i'm thinking that this will get handled automatically by the OS if it is enabled in the code) as a means of data integrity and making sure there are no buffer problems. Please help me with what direction i should take this."

You might be able to do it with minicom. See:
man minicom

If you can do it with minicom then take a look at the minicom source to see how to do it in C.

----------------------------
Steve Stites

Last edited by jailbait; 11-03-2005 at 11:08 AM.
 
  


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
writing to serial port, /dev/ttyS0 togunter Programming 2 06-08-2008 09:27 AM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM
reading and writing to a serial device (modem) Xanadu Linux - Laptop and Netbook 0 01-04-2005 10:05 AM

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

All times are GMT -5. The time now is 08:20 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