LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   how to send and receive files(txt,zip,pdf,jpe format) b/w two pc using RS-232 (http://www.linuxquestions.org/questions/programming-9/how-to-send-and-receive-files-txt-zip-pdf-jpe-format-b-w-two-pc-using-rs-232-a-554586/)

amit_pansuria 05-17-2007 05:24 AM

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

theNbomr 05-17-2007 09:03 AM

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.

michaelk 05-17-2007 09:17 AM

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.

amit_pansuria 05-18-2007 02:39 AM

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

theNbomr 05-18-2007 09:45 AM

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.

amit_pansuria 05-22-2007 12:01 AM

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

theNbomr 05-22-2007 09:17 AM

PPP
--- rod.

amit_pansuria 05-25-2007 02:09 AM

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

theNbomr 05-25-2007 09:48 AM

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.

amit_pansuria 05-28-2007 06:54 AM

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

theNbomr 05-28-2007 09:42 AM

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.


All times are GMT -5. The time now is 04:41 PM.