[mythtv-users] Mandrake 9.1 -- Serial port problems
Ray Olszewski
ray at comarre.com
Thu Jun 12 19:45:22 EDT 2003
At 08:07 PM 6/12/2003 -0400, John Klimek wrote:
>After much heart-ache and MANY problems, I've finally been able to build my
>DirecTV cable.
>
>Under Windows (using DTVCON [DirecTV Serial Control Utility]) it works
>PERFECTLY. Absolutely flawless.
>
>However, under Linux (Mandrake 9.1), the script (rca.pl) does not work at
>all. It says that it sends the command to the serial port, however it
>dispalys ERR for the response and it doesn't actually change the satellite
>receiver's channel.
>
>I know the script uses COM2 built-in, and I have my cable plugged into COM2.
>
>Is there something in Mandrake that I must configure differently? or am I
>doing something wrong?
Well ... maybe. I'm guessing here that you are not a Perl programmer. If
you are, I apologize for what will seem like some elementary explanations.
Also, I'm assuming that you are referring to the script available at URL
http://tarek.2y.net/myth/RCA.pl .
If so, you may be having problems because this script does not actually use
"COM2" ... because the COM* devices are Windows devices, not Linux devices.
It does attempt to use the serial port traditionally associated with COM2
in Windows, but it may not do it the right way for Mandrake. As written, it
would not work on my Debian systems, and I would not be surprised if
Mandrake were similar.
The relevant line is:
my $serial=init_serial("/dev/cua1","9600");
Mandrake may well not use the cua* devices (I know Debian does not), since
they were deprecated some time ago, in favor of ttyS* devices. Check if you
have a device /dev/cua1 ... not a file with that name, but a character
device. If you enter "ls -l /dev/cua1", you should get a line similar to
this one for /dev/ttyS1:
autovcr at kuryakin:~$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Mar 14 2002 /dev/ttyS1
The important part of this is the initial "c" character, which indicates it
is a character device.
If the device is present, make sure the userid that is running rca.pl
(probably mythtv) has permission to read from and write to the device. In
the example of ttyS1, you'd make mythtv a member of the dialout group to
accomplish this.
If the device is not present, change the lie in rca.pl to read ...
my $serial=init_serial("/dev/ttyS1","9600");
... and take care of any permissions issues once again.
Finally, whichever device you use, you might want to verify that it points
to a working serial port. Do that with the command "setserial". If you
enter "setserial /dev/ttyS1", you should get a response similar to this one:
maryann:~# setserial /dev/ttyS1
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
If you get this instead ...
maryann:~# setserial /dev/ttyS1
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
... it means that either you do not have a serial port at that Port/IRQ
combination, or your kernel is not set up to support serial-port access to
that port.
Hope this helps. BTW, what pinouts did you finally use that worked? (It
feels like I was reading a detective novel and found the last chapter missing.)
More information about the mythtv-users
mailing list