How to make remote work in mythtv - 0-9 numbers and volume keys already work

Asked by Aaron Whitehouse

Hello,

I have seen this question before but I can't find it by searching for it. My remote (a WinFast 200XP bttv card 34) has the numbers 0-9 working and volume control, but the none of the other keys (up, down, left, right etc. etc.) do not.

I have selected my card and "Generate Dynamic Key Mappings" in the "Infra red" section of Mythbuntu Control Centre, but it does not fix the problem.

Any help would be appreciated!

Question information

Language:
English Edit question
Status:
Solved
For:
Mythbuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Aaron Whitehouse
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
rhpot1991 (rhpot1991) said :
#2

Well you have a few different options here:

1. run irw from a terminal. Hit the buttons on the remote that do not work and see if anything shows up. If so then you need to go and modify ~/.lirc/mythtv to include them.

2. If the above doesn't work, then you have your choice of 2 steps from this point.
2a. Run mode2 (requires you to stop lirc first) from a terminal. Hit the buttons on the remote that do not work and save the output for them. Add these codes to /etc/lirc/lircd.conf
2b. Run irrecord and record all the buttons for your remote. Move the resulting file to /etc/lirc/lircd.conf

After completing either of the steps in 2, you may still need to include the buttons as mentioned in step 1. You may be able to rerun mythbuntu-lirc-generator and have it pick up some of them, but if you named anything oddly it may miss them still.

After all is said and done you should submit a bug report for mythbuntu with the resulting configs and information about your hardware.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#3

Thanks a lot, John, for your answer.

It seemed strange to me that my remote was listed in Mythbuntu Control Center, but MCC didn't seem to make it work.

I will try your suggestions this weekend - our house was burgled and our TV stolen!

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#4

I just tried following your directions.

$ irw
connect: No such file or directory
$ mode2
mode2: error opening /dev/lirc
mode2: No such file or directory
$ pkill lircd
$ killall -v lircd
lircd: no process killed
$ mode2
mode2: error opening /dev/lirc
mode2: No such file or directory
$ irrecord irrecord.txt

irrecord - application for recording IR-codes for usage with lirc

Copyright (C) 1998,1999 Christoph Bartelmus(<email address hidden>)

irrecord: could not get file information for /dev/lirc
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)

Any ideas what I am doing wrong?

Thanks again for your help!

Revision history for this message
rhpot1991 (rhpot1991) said :
#5

irw should work as long as something is working, you need to get your remote back to the point where the number keys work and start from there.

As far as mode2, you need to run it as sudo and supply -d <your device> (normally /dev/lirc0), and I believe -r or --raw. Before running this you must stop lirc (sudo /etc/init.d/lirc stop).

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#6

Hi John,

Thanks again for your help.

The number keys work, but irw doesn't.

$ 1234567890
bash: 1234567890: command not found
$ irw
connect: No such file or directory

$ sudo /etc/init.d/lirc stop
[sudo] password for mythbuntu:
 * Stopping remote control daemon(s): LIRC [fail]

$ sudo mode2 -d /dev/lirc0
mode2: error opening /dev/lirc0
mode2: No such file or directory

I couldn't see any "raw" option:
$ mode2 --help
Usage: mode2 [options]
  -h --help display usage summary
  -v --version display version
  -d --device=device read from given device
  -m --mode enable alternative display mode

$ sudo mode2 -d /dev/lirc0
mode2: error opening /dev/lirc0
mode2: No such file or directory

But I don't seem to have the device nodes:
$ ls /dev/li*
ls: cannot access /dev/li*: No such file or directory
$ ls /dev/l*
/dev/log /dev/loop0 /dev/lp0

Revision history for this message
rhpot1991 (rhpot1991) said :
#7

Check /etc/lirc/hardware.conf
to see what the REMOTE_DEVICE is.

Then you need to specify this device to irw/mode2/etc.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#8

Right - I think I know what half of my problem was. It seems that Hal was grabbing the remote and turning it into a keyboard before LIRC could get to it:
http://ubuntuforums.org/archive/index.php/t-1050558.html
This stops most LIRC applications from working. I have managed to stop Hal taking the device, but no /dev/lirc* node is created.

Now I am trying to work through some of the generic lirc guides to get this going, but they are often inconsistent and none seem to work.
Using the Mythbuntu Control Centre did not work.
http://www.mythtv.org/wiki/Ubuntu_Serial_Lirc_Install didn't seem to help.

Can anyone recommend a guide that should work with Mythbuntu 8.10 and my bttv Winfast card?

Thanks!

Revision history for this message
Launchpad Janitor (janitor) said :
#9

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#10

From: Stefan Nantz <stefan@na...> - 2009-03-26 14:30 on the LIRC list

Hello Aaron,

there are two ways to access the card through the driver lirc_gpio or
the devinput http://linux.bytesex.org/v4l2/faq.html#lircd

the iIR remote should be supported by the cx88 with recent kernel
driver for the TV card.

make sure the module is loaded
#lsmod |grep cx88

have a look in /proc/bus/input/devices and see if you can see your
input device.

in my case:
I: Bus=0001 Vendor=107d Product=665f Version=0001
N: Name="cx88 IR (WinFast DTV1000-T)"
P: Phys=pci-0000:06:00.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:1e.0/0000:06:00.0/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=100003
B: KEY=10afc336 2150a4800000000 0 40480010007 8000019000004801
1e000000004400 10000010000ffc

This tells you that the remote control is accessible on event5 -> /dev/
input/event5

you can run
#evtest /dev/input/event5
press some keys and to see if it is working.

after that you need to get the lircd.conf
http://linux.bytesex.org/v4l2/faq.html#lircd

now run

#/usr/sbin/lircd -H dev/input -d /dev/input/event5

#irw

see if you can see the key strokes.

from here you get one to configure the .lircc config files to bind the
keys to instructions you wish then to have.

if you find that your IR is a bit sluggish you may improve the
responsiveness by changing Processor type and features -> Timer
frequency (1000 HZ) in the xconfig and recompiling the kernel.

I found by setting the Timer frequency to 1000HZ the serial and the
tvcard ir responded much better.

I hope that helps.

Stefan

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#12

I have replaced my install with a fresh install of Jaunty. Now the remote does not do anything at all (not even the 0-9 buttons). I'll log everything that I have done as a "How To" for anyone who stumbles across this.

Here is what I have done:
$ lsmod | grep bttv
bttv 214100 0
ir_common 56068 1 bttv
compat_ioctl32 18304 2 bttv,ivtv
i2c_algo_bit 15364 2 bttv,ivtv
videobuf_dma_sg 22660 1 bttv
videobuf_core 29828 2 bttv,videobuf_dma_sg
btcx_risc 13960 1 bttv
v4l2_common 23296 6 wm8775,cx25840,tuner,bttv,ivtv,cx2341x
videodev 45184 4 tuner,bttv,ivtv,compat_ioctl32
tveeprom 23428 2 bttv,ivtv

$ nano /proc/bus/input/devices
I: Bus=0001 Vendor=107d Product=6606 Version=0001
N: Name="bttv IR (card=34)"
P: Phys=pci-0000:03:07.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:14.4/0000:03:07.0/input/input6
U: Uniq=
H: Handlers=kbd event6
B: EV=100003
B: KEY=10afc336 2150a4800000000 0 40480010007 8000019000004801 1e000000004400 10000010000ffc

Installed lineakd to get evtest ($ sudo apt-get install lineakd)

$ sudo evtest /dev/input/event6
Input driver version is 1.0.0
Input device ID: bus 0x1 vendor 0x107d product 0x6606 version 0x1
Input device name: "bttv IR (card=34)"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 2 (1)
    Event code 3 (2)
    Event code 4 (3)
    Event code 5 (4)
    Event code 6 (5)
    Event code 7 (6)
    Event code 8 (7)
    Event code 9 (8)
    Event code 10 (9)
    Event code 11 (0)
    Event code 28 (Enter)
    Event code 52 (Dot)
    Event code 74 (KPMinus)
    Event code 78 (KPPlus)
    Event code 113 (Mute)
    Event code 114 (VolumeDown)
    Event code 115 (VolumeUp)
    Event code 116 (Power)
    Event code 128 (Stop)
    Event code 139 (Menu)
    Event code 142 (Sleep)
    Event code 164 (PlayPause)
    Event code 167 (Record)
    Event code 168 (Rewind)
    Event code 191 (F21)
    Event code 192 (F22)
    Event code 193 (F23)
    Event code 194 (F24)
    Event code 208 (Fast Forward)
    Event code 223 (Cancel)
    Event code 226 (Media)
    Event code 234 (?)
    Event code 355 (Clear)
    Event code 358 (Info)
    Event code 361 (Archive)
    Event code 363 (Channel)
    Event code 368 (Language)
    Event code 370 (Subtitle)
    Event code 372 (Zoom)
    Event code 377 (TV)
    Event code 385 (Radio)
    Event code 386 (Tuner)
    Event code 388 (Text)
    Event code 389 (DVD)
    Event code 392 (Audio)
    Event code 393 (Video)
    Event code 398 (Red)
    Event code 399 (Green)
    Event code 400 (Yellow)
    Event code 401 (Blue)
    Event code 402 (ChannelUp)
    Event code 403 (ChannelDown)
    Event code 405 (Last)
    Event code 407 (Next)
    Event code 412 (Previous)
  Event type 20 (Repeat)
Testing ... (interrupt to exit)
Event: time 1241320365.247350, type 1 (Key), code 9 (8), value 1
Event: time 1241320365.247360, -------------- Report Sync ------------

[buttons correctly pop up]

Downloaded http://linux.bytesex.org/v4l2/linux-input-layer-lircd.conf and put it in /etc/lircd.conf

$ sudo /usr/sbin/lircd -H dev/input -d /dev/input/event6
mythbuntu@mythbuntu-server:~$ irw
0000000080010002 00 ONE Y04G0044
0000000080010003 00 TWO Y04G0044
0000000080010004 00 THREE Y04G0044
0000000080010006 00 FIVE Y04G0044
0000000080010005 00 FOUR Y04G0044

Then I generated a file with Mythbuntu Control Centre and it all just worked!

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#13

Note that, on restarting lircd, the remote didn't work again. This is because I last started lircd with the correct driver etc. In order to make it start correctly each time, you need to edit /etc/lirc/hardware.conf to read:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Winfast TV2000/XP (card"
REMOTE_MODULES="bttv"
REMOTE_DRIVER="dev/input"
REMOTE_DEVICE="/dev/input/event6"
REMOTE_LIRCD_CONF="leadtek/lircd.conf.RM-0010"
REMOTE_LIRCD_ARGS=""

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#14

For anybody who is trying to follow this as a guide, use:
http://www.linuxtv.org/wiki/index.php/Leadtek_WinFast_2000#Setting_up_the_remote
and
http://www.mythtv.org/wiki/Leadtek_WinFast#Remote
instead, as I have turned my problem into a step-by-step guide.