# pinnacle 310i dvb-t card remote

## lennert

Hi,

I've been trying to get my remote to work with lirc but no go. I'm wondering if it's possible to get the remote (pinnacle hybrid pro pci) to work using the receiver of the card itself (a receiver connected though a stereo mini-jack plug) . If not can I modify the rc-recieve eye and cable to connect though the serial port so I only need the serial connector, a stereo mini-jack female and some cables to get the rc to work with lirc. The card works great though I only use DVB-t radio hasn't been working but i don't mind. The combination with Kaffeine is better than using the card on windoze with the pinnacle software (just for other readers pulling their hair trying to get DVB-T to work).

Some dmesg info to begin. I've got the feeling the card receives something but if its the rc I don't know. Next dmesg without lirc started:

```

saa7130/34: v4l2 driver version 0.2.14 loaded

ACPI: PCI Interrupt 0000:00:0c.0[A] -> GSI 16 (level, low) -> IRQ 21

saa7133[0]: found at 0000:00:0c.0, rev: 209, irq: 21, latency: 32, mmio: 0xfebff000

saa7133[0]: subsystem: 11bd:002f, board: Pinnacle PCTV 310i [card=101,autodetected]

saa7133[0]: board init: gpio is 600e000

input: Pinnacle PCTV as /class/input/input3

ir-kbd-i2c: Pinnacle PCTV detected at i2c-0/0-0047/ir0 [saa7133[0]]

saa7133[0]: i2c eeprom 00: bd 11 2f 00 54 20 1c 00 43 43 a9 1c 55 d2 b2 92

saa7133[0]: i2c eeprom 10: ff e0 60 06 ff 20 ff ff 00 30 8d 2e 0d a3 ff ff

saa7133[0]: i2c eeprom 20: 01 2c 01 23 23 01 04 30 98 ff 00 e7 ff 21 00 c2

saa7133[0]: i2c eeprom 30: 96 10 03 32 15 20 ff 15 0e 6c a3 eb 03 c4 7e 11

saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

saa7133[0]: i2c scan: found device @ 0x10  [???]

saa7133[0]: i2c scan: found device @ 0x8e  [???]

saa7133[0]: i2c scan: found device @ 0x96  [???]

saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]

tuner 0-004b: chip found @ 0x96 (saa7133[0])

tuner 0-004b: setting tuner address to 61

tuner 0-004b: type set to tda8290+75a

saa7133[0]: registered device video0 [v4l2]

saa7133[0]: registered device vbi0

saa7133[0]: registered device radio0

Pinnacle PCTV: unknown key: key=0x7a raw=0x7a down=1

Pinnacle PCTV: unknown key: key=0x7a raw=0x7a down=0

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

DVB: registering new adapter (saa7133[0]).

DVB: registering frontend 0 (Philips TDA10046H DVB-T)...

```

Note the part Pinnacle PCTV: unknown key: key=0x7a raw=0x7a down=1 whats that?

Now starting lirc with 

```
LIRCD_OPTS="--driver=pinsys -d /dev/ttyS0"

```

 in /etc/conf.d/lircd

The start is short during trying to get it to work it sometimes said * Caching service dependencies ... (two ok's) but now just one... is it ok?

```

# modprobe lirc_dev 

laika lennert # /etc/init.d/lircd start

 * Starting lircd ...                                                     [ ok ]

laika lennert #

```

Dmesg gives

```

lirc_dev: IR Remote Control driver registered, at major 61

```

Thats as far as i get...

irw does nothing, irrecord nothing.. What should I do? Should I use the PCTV driver? Or build a homebrew receiver Or can I get it to work..

Lennert

----------

## lennert

From the kernel changelog I understand the remote will work after version Linux v2.6.20-rc1. But gentoo-sources is still at version 2.6.19-r3 at the highest.... So there are two options wait for the kernel to get into portage or just compile it myself with all the risks that might bring...Hmm Lets check mercurial and V4L...

Question: Can I build a module into my kernel from another kernel source? How does it work with the V4L modules?

Ah: http://www.linuxtv.org/repo/

 *Quote:*   

> commit eb591af3a3703cb79e3efb5ad87b36dcd32b0712
> 
> Author: Hartmut Hackmann <hartmut.hackmann@t-online.de>
> 
> Date:   Thu Oct 12 19:46:16 2006 -0300
> ...

 

Right I don't need lirc I just need to configure X. /proc/bus/input/devices says:

```
I: Bus=0018 Vendor=0000 Product=0000 Version=0000

N: Name="Pinnacle PCTV"

P: Phys=i2c-0/0-0047/ir0

S: Sysfs=/class/input/input2

H: Handlers=kbd event2

B: EV=100003

B: KEY=108fc010 2100802 0 0 0 0 48000 2180 c0000801 9e1680 0 0 4ffc

```

So I have the input device loaded with the saa7133 module.

http://linux.bytesex.org/v4l2/faq.html#ir So I'll try that....  :Rolling Eyes: 

Update: 

```
cat /dev/input/event2
```

 does nothing what's wrong? I'm lost

----------

## lennert

Allright getting there.

I've pulled the latest V4L drivers and now I have input at cat /dev/input/event2.

So far I've installed mercurial http://linuxtv.org/wiki/index.php/How_to_install_DVB and put the stuff in a folder named my-dvb (that's not precisely like in the how-to). It didn't work at that time. Now I've updated the drivers by:

```
my-dvb # hg pull -u http://linuxtv.org/hg/v4l-dvb

my-dvb # make

my-dvb # make install
```

Rebooted to get the new kernel modules (I know there are other ways to do this but, oh well)

And then checked it by doing:

```
cat /dev/input/event2

r«EìJ

     r«EïJ

          r«Er«Ey«EU¯y«EW¯y«Ey«E«EV«EV«E±*«E³*«E«ü«E®ü«E]Ñ      «E^Ñ    «EX£

            
```

You can see it got input as I pressed the remote (the response is slow so I tried two different remotes). 

Now I'm going to try and get the remote to work with my programs but as you can see the ir works without the homebrew stuff. Maybe homebrew works better but I wanna trie the low budget way   :Wink: 

But I think I can use some help getting X and Kaffeine to recognize the buttons. Make keymaps or configuring X to use the remote as an input device.

----------

## kevinlux

hi,

hi have same card and the remote work in full mode

in /etc/make.conf

```
LIRC_DEVICES="devinput"
```

than look at the dmesg... my log tell me 

```

...

input: Pinnacle PCTV as /class/input/input3

....
```

and create / add this line in your /etc/conf.d/lircd.conf

```
LIRCD_OPTS="-H dev/input -d /dev/input/event3"
```

with kaffeine (doesn't not support lirc natively) you have to do  a call with irexec and docp ( RTFM )

for changing to channel 9 in lircrc.conf

```
begin

  prog = irexec

  remote = pctv310iremote

  button = 9

  config = dcop kaffeine KaffeineIface setNumber 9

end

```

for others apps you can use the lirc interface.

here my lircd.conf

```

begin remote

  name  pctv310iremote

  bits           16

  eps            30

  aeps          100

  one             0     0

  zero            0     0

  pre_data_bits   16

  pre_data       0x8001

  gap          201870

  toggle_bit      0

      begin codes

          mute                     0x0071

          text                     0x0184

          tv                       0x0179

          epg                      0x00D2

          power                    0x0074

          a                        0x018E

          b                        0x018F

          c                        0x0190

          blue                     0x0191

          volup                    0x0073

          voldown                  0x0072

          Pinnacle                 0x008B

          ch+                      0x0192

          ch-                      0x0193

          left                     0x0069

          up                       0x0067

          right                    0x006A

          down                     0x006C

          ok                       0x0161

          back                     0x009E

          swap                     0x00AD

          fullscreen               0x0174

          rec                      0x00A7

          rew                      0x00A8

          pause                    0x0077

          forw                     0x009F

          stop                     0x0080

          play                     0x00CF

          prev                     0x019C

          next                     0x0197

          1                        0x0002

          2                        0x0003

          3                        0x0004

          4                        0x0005

          5                        0x0006

          6                        0x0007

          7                        0x0008

          8                        0x0009

          9                        0x000A

          cn                       0x016B

          0                        0x000B

          del                      0x000E

      end codes

end remote
```

----------

