LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-17-2007, 05:24 AM   #1
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Rep: Reputation: 15
how to send and receive files(txt,zip,pdf,jpe format) b/w two pc using RS-232


Dear Sir,
i want to transfer files in the format of zip,pdf,txt,jpeg between two
PCs which are running on fedora core- 6 using RS-232.
i want to know complete details how to configure RS 232 port so that i can transfer files.
Best Regards,
Amit
 
Old 05-17-2007, 09:03 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
I suggest using Kermit. Kermit is a file transfer protocol that was intended for the specific purpose you mention. It is supported on most platforms (maybe less these days than in the past), and is pretty much operating-system independent. Besides being a file transfer protocol, it is also implementations of the protocol. On Linux, you would want C-Kermit. For Windows, there are a few packages that support Kermit file transfers, and last time I checked, there was Kermit-95 for Windows. Visit http://www.columbia.edu/kermit/index.html for details &documentation.

--- rod.
 
Old 05-17-2007, 09:17 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
In addition to kermit you can use minicom. This is a console application similar to Windows Hyperterminal. minicom should already be installed and it is not difficult to figure out. Use the zmodem protocol to transfer files and make sure you use a null modem serial cable.
 
Old 05-18-2007, 02:39 AM   #4
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Original Poster
Rep: Reputation: 15
how to send and receive files using Rs-232

Quote:
Originally Posted by amit_pansuria
Dear Sir,
i want to transfer files in the format of zip,pdf,txt,jpeg between two
PCs which are running on fedora core- 6 using RS-232.
i want to know complete details how to configure RS 232 port so that i can transfer files.
Best Regards,
Amit
Dear Sir,
actually my exact requiremnt is given below.
there is a one server pc which is running on fedora-core 6.
now there are 30 modems and each modem has RS-232 interface.
server pc is connected with these all 30 modems through RS-232 interface. for that there is a 32 port MOXA PCI card is pluggen into PCI SLOT of pc.
now what ever user send files(text files,pdf files etc)from out side, it directly comes to RS-232 port of modem.
now our server pc is responsible to read that files and messages from RS-232 port of modem and send it to another modem(RS-232 PORT of it). server is running continously and handling sending and receiving files automatically.
so now give me tips how i write software on server sides so that it can handing data and files transfer automatically.
Best Regards,
Amit
 
Old 05-18-2007, 09:45 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
So, to rephrase your requirements: You have a linux host with a 32-port serial interface, each serial port having a modem attached (I will call this the 'hub host'). The requirement is to receive incoming files on one of the serial ports, and send the file(s) out on one of the other ports. You have not stated any details about the outgoing connection, but the nature of this connection is probably dictated by the distant host that operates the answering modem. You have not stated whether the objective is to keep a copy of the file(s) on the hub host.

Okay, if this is correct, you have a number of issues to deal with.

1. You will probably require a linux driver for your multiport serial interface. Assuming you have that, I assume you then have a lot of device files like /dev/ttyS0, /dev/ttyS1 ... /dev/ttyS31.

2a. You can create custom software that simply listens to each of the serial modems, and implements the file transfer protocol of choice, as well as handling the details of the outgoing connections.

2b. Instead, you could implement a PPP server on your hub host. Incoming connections would get a login shell, and/or start an ftp or sftp server. Existing TCP/IP file transfer tools could be used by the distant hosts for transferring files. The outgoing connection & transfer must still be defined by the end host.

3. You could operate the hub host as simply a modem-connected TCP/IP router (using PPP), where the connection to the outgoing host is made transparently, and traditional TCP/IP file transfer tools are used at the originating distant host.

4. You may be able to accomplish some/all of this with 'uucp'. This system is well documented, and was heavily used before the advent of ubiquitous high speed networks. Finding someone who has experience with this system might be a challenge, but probably necessary.

In summary, the procedure that you use will be substantially dictated by the requirements of the originating an destination distant hosts. You need to provide details of what those hosts are and what capabilities they have.

--- rod.
 
Old 05-22-2007, 12:01 AM   #6
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by theNbomr
So, to rephrase your requirements: You have a linux host with a 32-port serial interface, each serial port having a modem attached (I will call this the 'hub host'). The requirement is to receive incoming files on one of the serial ports, and send the file(s) out on one of the other ports. You have not stated any details about the outgoing connection, but the nature of this connection is probably dictated by the distant host that operates the answering modem. You have not stated whether the objective is to keep a copy of the file(s) on the hub host.

Okay, if this is correct, you have a number of issues to deal with.

1. You will probably require a linux driver for your multiport serial interface. Assuming you have that, I assume you then have a lot of device files like /dev/ttyS0, /dev/ttyS1 ... /dev/ttyS31.

2a. You can create custom software that simply listens to each of the serial modems, and implements the file transfer protocol of choice, as well as handling the details of the outgoing connections.

2b. Instead, you could implement a PPP server on your hub host. Incoming connections would get a login shell, and/or start an ftp or sftp server. Existing TCP/IP file transfer tools could be used by the distant hosts for transferring files. The outgoing connection & transfer must still be defined by the end host.

3. You could operate the hub host as simply a modem-connected TCP/IP router (using PPP), where the connection to the outgoing host is made transparently, and traditional TCP/IP file transfer tools are used at the originating distant host.

4. You may be able to accomplish some/all of this with 'uucp'. This system is well documented, and was heavily used before the advent of ubiquitous high speed networks. Finding someone who has experience with this system might be a challenge, but probably necessary.

In summary, the procedure that you use will be substantially dictated by the requirements of the originating an destination distant hosts. You need to provide details of what those hosts are and what capabilities they have.

--- rod.
Dear Sir,
yes,i can appreciate with you.
now one more dought i have that how can i use FTP
protocol for file transfering using serial communication(using RS-232).
Best Regards,
Amit
 
Old 05-22-2007, 09:17 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
PPP
--- rod.
 
Old 05-25-2007, 02:09 AM   #8
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Original Poster
Rep: Reputation: 15
regarding files trasfer

Quote:
Originally Posted by theNbomr
PPP
--- rod.
Dear Sir,
we have only one PC which is running on Fedora core 6 and it has
multiport serial card which is pluged into PCI slot of pc.
and We have to receive files which is comming from modems(each modem
has RS-232 port only ,no other interface)and trasfer those files to particular modem.
so how can i use PPP concept in this scenario
Amit
 
Old 05-25-2007, 09:48 AM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
PPP can be used to turn the serial interface into an IP interface, which you treat more or less as if it were an ethernet interface. For FC6, use system-config-network to set it up, once you have a driver for your multi-port serial interface installed.
Until you provide the information I said you would need, I can't give any detailed answers. Go back to my reply in post #6, and read it in detail. You need to provide some answers about the nature of the incoming and outgoing distant hosts and the communication protocols they are expected to use.

--- rod.
 
Old 05-28-2007, 06:54 AM   #10
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Original Poster
Rep: Reputation: 15
how to send and receive files using serial interface.

Quote:
Originally Posted by theNbomr
PPP can be used to turn the serial interface into an IP interface, which you treat more or less as if it were an ethernet interface. For FC6, use system-config-network to set it up, once you have a driver for your multi-port serial interface installed.
Until you provide the information I said you would need, I can't give any detailed answers. Go back to my reply in post #6, and read it in detail. You need to provide some answers about the nature of the incoming and outgoing distant hosts and the communication protocols they are expected to use.

--- rod.


Sir,
Server Pc has MOXA multiport card and its running on fedora core -6.
There are 30 modems each has RS-232 interface. each RS-232 port of modem is connected with each Rs-232 port of Server PC(multiport serial card.)so there is one to one serial connection b/w modem and server.

suppose person 1 want to trasfer files to person 2.
what ever person 1 send files , it directly comes to Rs-232 port of
modem through satellite directly.
now server reads that files from Rs-232 port of modem and trasfer to another port of modem. once the server transfer that files to particular RS-232 port of modem then that files automatically send it to person 2 through satellite(this is RF communication).
so i think u understad scenario now.
now my scope is how to read files from RS-232 port of modem through server pc (i mean how to read files from com port of server pc) and how to send that files to Rs-232 port of modem. (how to write files to com port of server pc. )
We are going to use our own protocol for serial communication.
i want to know is it possible to transfer files and receives files
with serial port using read() and write() functions
plz help me to come out from this issue.
Best Regards,
Amit
 
Old 05-28-2007, 09:42 AM   #11
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Okay, then. You should use the information in these two places:
http://tldp.org/HOWTO/Serial-HOWTO.html
http://tldp.org/HOWTO/Serial-Program...WTO/index.html
--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to send/receive files using gaim izquierdista Linux - Software 13 07-24-2006 08:34 AM
Convert pdf to html or txt or remaster the pdf? jago25_98 Linux - Software 1 12-13-2005 01:11 AM
Can't send or receive files with KMess TazG Linux - Software 0 06-11-2004 08:44 AM
Cant send files with aMSN. . .but I can receive?? Seraph Linux - Software 1 12-23-2003 05:56 AM
converting files to pdf format? vendemmian Linux - General 2 05-23-2001 07:52 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration