[mythtv-users] Mandrake 9.1 -- Serial port problems

John Klimek jmk396 at psu.edu
Thu Jun 12 23:31:24 EDT 2003


Believe it or not, I went out and bought a DE9F connector (from RadioShack)
and a new RJ22 cable.  The DE9F connector was the solder-kind, so I soldered
the new RJ22 cable to the DE9F connector (using the regular pinouts... the
same ones that I tried the very first time) and it worked FIRST TRY.

Apparantly I had a bad RJ22 cable or my DE9F connector was bad.  Either way,
I was thrilled when I finally saw it working correctly.

I'm going to write-up a detailed HOW-TO and put it online to help out new
people trying to make cables.  You were a HUGE help and I thank you very,
very much.

My new problem however, seems complicated (like everything for me).

I'm somewhat familar with unix/linux/perl, etc.  /dev/cua1 is a symlink for
/dev/cua/1 which is a character device.  Setserial tells me that everything
is fine  (setserial /dev/cua1):

[root at linux sofakng]# setserial /dev/cua1
/dev/cua1, UART: 16550A, Port: 0x2f8, IRQ:3

2f8 and IRQ3 are the correct settings as well (I verified in BIOS and Win
XP).

Also, /dev/ttyS1 exists, but is not a character file.  setserial also tells
me that device is fine.

I'm using a modified RCA.pl script (its modified to support the new rca
command set), and when I run it from the command line I get this:

[root at linux sofakng]# ./new_rca.pl 354
354 SEND:  0xFA [u] 0x46 [F] 0x1 [] 0x62 [b]
   RECV: 0xF1[ERR 1]

Like I said, my cable works PERFECT under XP (DTVCON), so I know that
everybody is setup correctly.  Linux obviously does not like me however...



----- Original Message ----- 
From: "Ray Olszewski" <ray at comarre.com>
To: "Discussion about mythtv" <mythtv-users at snowman.net>
Sent: Thursday, June 12, 2003 9:45 PM
Subject: Re: [mythtv-users] Mandrake 9.1 -- Serial port problems


> 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.)
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>



More information about the mythtv-users mailing list