serial port communication

serial port communication

Post by Pilatu » Tue, 11 Nov 2003 17:14:24



Hey everyone,

I have to create a communication between 2 PC. Where can I find functions to
manage the communication protocol like XMODEM or ZMODEM
thanks for your help

 
 
 

serial port communication

Post by Michael Heimin » Tue, 11 Nov 2003 17:29:34



> Hey everyone,
> I have to create a communication between 2 PC. Where can I find functions to
> manage the communication protocol like XMODEM or ZMODEM

'minicom' does what you want, it comes with almost any distro.

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM

 
 
 

serial port communication

Post by Floyd Davidso » Tue, 11 Nov 2003 17:26:21



>Hey everyone,

>I have to create a communication between 2 PC. Where can I find functions to
>manage the communication protocol like XMODEM or ZMODEM
>thanks for your help

Zmodem protocol is directly available, and is probably included
with almost any Linux distribution.  See if sz and rz are on you
machines.  Almost any modem program, such as seyon under X or
minicom either in an xterm or on a virtual terminal will run
sz/rz, plus several variations on the xmodem protocol.  Kermit
is also commonly available.

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>

 
 
 

serial port communication

Post by Rob Ristro » Tue, 11 Nov 2003 18:06:35


Quote:>>>>> "radio" == radio mnt <Pilatus> writes:

radio>
radio> Hey everyone,
radio> I have to create a communication between 2 PC. Where can I find
radio> functions to manage the communication protocol like XMODEM or
radio> ZMODEM thanks for your help

If you connect a null modem cable between you two PCs, you have
several options.

One is to make a slip or ppp connection between them, and then use the
normal tools such as telnet and ftp to go back and forth.

Another way is to run a getty on one machine, and minicom on the
other.  This method would use the xmodem and zmodem commands.  For a
one time transfer, this is probably the easiest.  Some versions of
linux have a command called agetty which you should use instead of
getty, and you have to make sure the other computer has minicom.

You can also use kermit.  Kermit may be better than minicom if you
wish to make a scripted transfer happen automatically.

Which versions of linux are you using ?  Do you have no other options
than a serial cable ?  A parallel port cable would be faster, and a
network best of all.

I made a floppy version of linux that allows you to connect two
machines with a parallel port cable, and brings up midnight commander
with the local files in one panel and the remote ones in the other.
It could be modified to use the serial ports.

http://rgr.freeshell.org/flinux/mc-link/

--Rob

 
 
 

serial port communication

Post by Grant Edward » Wed, 12 Nov 2003 00:44:46



> I have to create a communication between 2 PC. Where can I find functions to
> manage the communication protocol like XMODEM or ZMODEM

I'd use PPP.

$ man pppd

--
Grant Edwards                   grante             Yow!  Where's th' DAFFY
                                  at               DUCK EXHIBIT??
                               visi.com            

 
 
 

1. Linux serial port communication - Need help!!!!!!!!!

I am currently writing a program under Linux which needs to
communicate to
the serial port. All the program needs to do is send a string of 0's
and
1's. I'd like for these values to represent a low and a high when
being
outputted to the serial port, instead of the ascii integer value of
'0'
and  '1'. It appears that my simple program outputs the ascii integer
value of the string being passed out, but that is not what I want it
to
do. All I want it to do is pass out a high when it sees a 1, and a low
it sees
a 0.

I was hoping someone has had experience with this in the past and will
be willing to help me out on this.

My simple program is below:

#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>

int main()
{
  int fd;

  // Open the port
  fd = open("/dev/ttyS0",  O_WRONLY);

  // Set the speed and other if req
  system("stty 2400 </dev/ttyS0");

  // There is a better way than this
  if(fd == -1)
  {
    perror("open");
    exit(1);
  }

  // Send a message
  if(write(fd, "0", 10) == 10)
  {
    perror("write");
    exit(1);
  }

  close(fd);

Any help would be appreciated. Thank you.

2. SOLARIS performance question ???

3. Serial Port Communication

4. DOSEMU: Compiling 60.3 with Slackware 3.0 (ELF)

5. Linux serial port communication

6. How to stop rs-sz ?

7. Serial port communication - Need help!!!

8. Dr PC needs technicians

9. Simple Serial Port Communications?

10. Help with Serial port Communications on DSR/DTR lines

11. Newbie Q: Serial port communication with 'cu'

12. Serial port communication - Need help!!!