# Problem with lirc and Pinnacle PCTVPro

## mani001

I compiled lirc 0.7.0-r1 but I can't get my remote control to work.

I gave support for serial (my infrared sensor is connected to com1) in kernel as a module, then I start the lircd daemon, but when I run irw it does nothing. If I run irw one second time, I get a "Connection refused" message,  and after that If I try to stop the lircd daemo, I get two red "!".

My /etc/conf.d/lircd looks like this:

LIRCD_OPTS="-d /dev/lirc/0"

am I missing something? Does Pinnacle PCTVPro remote control works with lirc?

Any idea welcome. Thanks.

----------

## alkan

It works indeed.

```

LIRC_OPTS="--with-driver=pctv" emerge lirc

```

----------

## mani001

Can you describe briefly the steps you follow please?

----------

## alkan

First compile lirc with pctv remote support,  pctv dongle is connected to the serial port but works differently than home brew remote receivers. So  You have to  emerge lirc with pctv driver.

```

LIRC_OPTS="--with-driver=pctv" emerge lirc

```

Then, If you want to run lirc at boot time:

```

echo "lirc_serial" >> /etc/modules.autoload.d/kernel-2.6

rc-update add lircd default

```

And make sure (after loading lirc_serial kernel module, modprobe lirc_serial or reboot) the device in /etc/conf.d/lircd exists in /dev folder. Mine wasn't /dev/lirc/0 but /dev/lirc0. So I had to  change /etc/conf.d/lircd accordingly.

From now on, it is usual lirc configiration. You need to  generate a /etc/lircd.conf using irrecord. Otherwise lirc won't recognize your remote's codes. Then write a $HOME/.lircrc to   control your applications. lircd.conf and .lircrc are documented in detail at http://www.lirc.org.

Note: I was once using pctv dongle, But it only works with pctv remote control while a home-brew receiver works almost    with any remote control (and it is easy and cheap to make under $5). So I don't really remember if the module name was lirc_serial or something else,   please sheck out /lib/modules/your-kernel/misc/ for  the exact module name

----------

## kmare

hi,

I need some help here... my tv control is the only hardware not working in my computer and it's driving me crazy... here's my prob:

I have a pctv (not pro) tv card. The remote control is connected to the serial port. I managed to build the module:

```

lirc_serial            11360  0

lirc_dev               11340  1 lirc_serial

```

then I copied the lircd.conf.pctv file from the site to /etc/lircd.conf.

After that I run lircd. But that's it. How can I tell if it is working? I tried to set up a sample configuration for mplayer, but it seems to not working.. of course I might did something wrong.. so, is there a program that will tell me if it really working? I tried mode2 but there was no output.

any help is highly appreciated..

----------

## mani001

I got it to work. The program that tells you wether lircd is working is irw (for example). When you run irw, it has to keep waiting for you to press buttons in your remote control, something like this

```

bash-2.05b$ irw

0000000000000035 00 5 PinnacleSysPCTVRemote

0000000000000034 00 4 PinnacleSysPCTVRemote

000000000000000d 00 Play PinnacleSysPCTVRemote

```

until you press control-c.

I don't understand how it works but I don't need even to modprobe the module that is built with lirc (lirc_serial). I have suppor in the kernel for the serial port as a module. So I did: 

- modprobe 8250 (then, it appears /dev/ttyS0)

- modify /etc/conf.d/lircd

```
# Options to pass to the lircd process

# LIRCD_OPTS="-d /dev/lirc/0"

LIRCD_OPTS="-d /dev/ttyS0"

```

- uncomment in /etc/serial.conf (I guess it requires setserial installed)

```

/dev/ttyS0 uart 16450 port 0x3F8 irq 4

```

this last step I am not sure wether it's needed or not.

And that worked for me.

Hope it have helped you.

----------

## kmare

thanx but it didn't work. when I run irw the lircd demon exits with the following error:

```
yoda linux-2.6.10-gentoo-r2 # lircd -d /dev/lirc/0 -n

lircd 0.7.0[12462]: lircd(pctv) ready

lircd 0.7.0[12462]: accepted new client on /dev/lircd

lircd 0.7.0[12462]: could not reset tty

lircd 0.7.0[12462]: caught signal

Terminated
```

of course irw exits immediately...

I did a google search but I couldn't find a solution. Is anyone seeing this problem?

EDIT: I found that with the pctv driver I don't have to modprobe lirc_serial. So just using the kernel default serial driver for lirc the lircd server will run just fine. Now the problem is that running irw I get no output (but at least it won't exit as before).

thanx for any help

----------

## mani001

are you using

```

lircd -d /dev/ttyS0

```

after modprobe 8250?

and uncomment the line in /etc/serial.conf to enable that serial port?

----------

## kmare

yes... but I don't need to modprobe 8250 because I didn't build it as module but it's built in the kernel... I'll try to recompile the kernel with the serial port as module...

EDIT: using irrecord it seems like it recives the irda signals, I can even (supposely) configure the remote control. But with irw there is still no output...  :Sad:  at least I'm getting closer than ever  :Smile: 

thanx again...

----------

## kmare

IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I was using the wrong lircd.conf file... I can't believe it!!!   :Laughing: 

thanx again for the help everybody...

----------

## RealNitro

WHOOOHOOOO

Mine is working too now. (pctv remote)

Thank you sooooo much mani001 (i did it 'your' way, with the modprobe 8250 and so).

 :Cool: 

----------

## aqua26

well i have done 

```

LIRC_OPTS="--with-driver=pctv" emerge lirc 
```

&

```
echo "lirc_serial" >> /etc/modules.autoload.d/kernel-2.6

rc-update add lircd default 
```

too

but i am not able to find /dev/lirc dir anywhere.

i don't know what to do.

----------

## alkan

did you 'modprobe lirc_dev' ?. It should appear under /dev

----------

## aqua26

 *alkan wrote:*   

> did you 'modprobe lirc_dev' ?. It should appear under /dev

 

it is not showing anything

i did that

```
bash-2.05b# modprobe lirc_dev

bash-2.05b#

```

----------

## cadu

 *kmare wrote:*   

> IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
> I was using the wrong lircd.conf file... I can't believe it!!!  
> 
> thanx again for the help everybody...

 

Could you post the right lircd.conf, please?

----------

