Larry W. Irwin Sr. wrote: > > ------------------------------------------------------------------- > #!/usr/bin/perl > select((select(STDOUT), $| = 1)[$[]); > select((select(STDIN), $| = 1)[$[]); > exec 'cu -s 115200 -l /dev/ttyS0'; > die '$0: Cant exec cu: $!\n'; > ------------------------------------------------------------------- > I cannot locate the cu program. Can someone point me in the right > direction?
I did not look but I recall the cu program being part of the uucp package. You could install uucp and get it. But oh that will be a hard row to hoe. The installation is involved. It is not for the new person to work with. The HOWTO probably mentions it since years and years ago uucp was the normal networking for all systems. Therefore all of them had a cu command installed and that was the defacto method to talk to the serial port and modem. It also did the proper file locking so that while you were talking to the serial port another application such as mail did not come along and try to use it at the same time. I used uucp for years and years and the later versions like Taylor were awesome. But I can't recommend that you try to set it up today. Therefore read that HOWTO with a grain of salt and know that it is very old. At the least I would use kermit instead of cu since the configuration can be all on the command line. Probably what I would do is to open the serial port directly with perl. Then run 'stty' commands upon it to set up the speed and other parameters. Then you can just read and write to the serial port directly. You don't need other programs to get in the way. Unfortunately I don't have a canned example of that to share and without an example something like that takes a while to tinker into shape. So I will turn this around as another question to the list. What are people's favorite methods of using the serial port such as from a perl program? And do you have any examples to share that would jumpstart the original poster along? Bob
msg27205/pgp00000.pgp
Description: PGP signature