Hi all,
After about 9 months of playing around with VDR I've decided to install a knoppmyth again, the features are simply better imho
But I've seem to be stuck on getting my remote to work.. (ok so this feature is supported better on VDR, but just this one
)
I am working with a Technotrend Premium S2300 but the card is identical to a Hauppauge Nexus S, so I mention this so others could benefit from this info. I am working though with an original Hauppauge '
silver remote' that came with a Hauppauge Nexus S card (I have both cards it's in another system now)
Some additional info:
Code:
root@mythtv:~# dmesg |grep DVB
DVB: registering new adapter (Technotrend/Hauppauge WinTV Nexus-S rev2.3)
DVB: registering frontend 0 (ST STV0299 DVB-S)...
input: DVB on-card IR receiver as /class/input/input2
root@mythtv:~# lspci |grep Philips
00:0f.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
root@mythtv:~# cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7
I: Bus=0011 Vendor=0002 Product=0006 Version=0030
N: Name="ImExPS/2 Logitech Explorer Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=143
I: Bus=0001 Vendor=13c2 Product=000e Version=0002
N: Name="DVB on-card IR receiver"
P: Phys=pci-0000:00:0f.0/ir0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=100013
B: KEY=c0002 2800102 0 0 0 0 0 0 4000000 e0000 0 0 ffc
B: MSC=18
the name of the remote (inside of battery clip):
A415
OH/S 1-3
I've tried setting up lirc throug lirc-reconfig, and I chose the 'silver remote' but it gives me a PVR-350 remote
Code:
root@mythtv:~# head -n 5 /etc/lirc/lircd.conf
# /etc/lircd.conf
#
#
# brand: Hauppauge lirc.conf
# model no. of remote control: PVR-350
root@mythtv:~#
through some googling I have found following interesting sites:
http://gentoo-wiki.com/HOWTO_Setup_LIRC_for_MythTV#Specially_for_av7110_.28Hauppauge_Nexus-s.29_cardshttp://readlist.com/lists/mythtv.org/mythtv-users/0/3050.htmlwhich lead me to
av7110_loadkeyshttp://www.vdr-wiki.de/wiki/index.php/Dvb-apps_av7110_loadkeys So after issuing following command:
Code:
av7110_loadkeys /usr/share/doc/dvb-utils/examples/hauppauge.rc5 > /proc/av7110_ir
I am able to view remote keypresses (the 'Event: time' entries on the bottom)
Code:
root@mythtv:~# evtest /dev/input/event2
Input driver version is 1.0.0
Input device ID: bus 0x1 vendor 0x13c2 product 0xe version 0x2
Input device name: "DVB on-card IR receiver"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event code 4 (?)
Event code 20 (Repeat)
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 113 (Mute)
Event code 114 (VolumeDown)
Event code 115 (VolumeUp)
Event code 154 (CycleWindows)
Event code 353 (Select)
Event code 360 (Vendor)
Event code 375 (Screen)
Event code 377 (TV)
Event code 385 (Radio)
Event code 402 (ChannelUp)
Event code 403 (ChannelDown)
Event type 4 (?)
Event code 3 (?)
Event code 4 (?)
Event type 20 (Repeat)
Testing ... (interrupt to exit)
Event: time 1200664313.503427, type 4 (?), code 3 (?), value 1966081
Event: time 1200664313.503429, type 4 (?), code 4 (?), value 1
Event: time 1200664313.503435, type 1 (Key), code 2 (1), value 1
Event: time 1200664313.503436, type 0 (Reset), code 0 (Reset), value 0
Event: time 1200664313.617905, type 4 (?), code 3 (?), value 1966081
Event: time 1200664313.617908, type 4 (?), code 4 (?), value 1
Event: time 1200664313.897456, type 1 (Key), code 2 (1), value 0
Event: time 1200664313.897459, type 0 (Reset), code 0 (Reset), value 0
so this works, but now I'm not sure on how to get this working in myth.
Since it's an input device, should I load it like a keyboard? I've tried disabling lirc too, and used av7110_loadkeys '-d' (default keymap) as well, but I can't seem to make it work
any help greatly appreciated
EDIT: ok after some reasoning, I think the last missing piece might be to ad the inputdevice in xorg.conf (since it acts like a keyboard) but can't seem to find any immediate info on that..
EDIT 2: Adding it to xorg.conf would be a perfect solution, but one needs to write an xkb driver for that (out of my league)
found this though:
http://www.linuxtv.org/v4lwiki/index.php/Remote_controllersso the modules loaded by lirc are wrong. I'll start testing this now and report back.
EDIT 3: so i followed the guide in the link above, and was able to perform an irrecord.
I thought 'sweet, nearly there' but the generated lircd.conf is not really what it should look like (check the codes)
Code:
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.2-CVS-pvr150(dev/input) on Fri Jan 18 16:27:48 2008
#
# contributed by
#
# brand: /tmp/my-remote
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name /tmp/my-remote
bits 0
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 32
pre_data 0x80040003
gap 213684
toggle_bit_mask 0x7
begin codes
go 0x0
tv 0x0
videos 0x0
music 0x0
pictures 0x0
guide 0x0
radio 0x0
ok 0x0
up 0x0
down 0x0
left 0x0
right 0x0
back 0x0
menu 0x0
prev-chan 0x0
mute 0x0
vol+ 0x0
vol- 0x0
chan+ 0x0
chan- 0x0
record 0x0
stop 0x0
play 0x0
rewind 0x0
ffwind 0x0
pause 0x0
previous 0x0
next 0x0
1 0x0
2 0x0
3 0x0
4 0x0
5 0x0
6 0x0
7 0x0
8 0x0
9 0x0
0 0x0
* 0x0
# 0x0
yellow 0x0
red 0x0
green 0x0
blue 0x0
end codes
end remote
Ok, now what?? Ah, at least /var/log/messages is giving me some output now..
Code:
Jan 18 16:46:59 mythtv kernel: av7110_emit_key: code 00001795 -> addr 30 data 0x15 -> unknown key!
Jan 18 16:46:59 mythtv kernel: av7110_emit_key: code 00001795 -> addr 30 data 0x15 -> unknown key!
Jan 18 16:47:00 mythtv kernel: av7110_emit_key: code 00001f95 -> addr 30 data 0x15 -> unknown key!
Jan 18 16:47:00 mythtv kernel: av7110_emit_key: code 00001f95 -> addr 30 data 0x15 -> unknown key!
Jan 18 16:47:08 mythtv kernel: av7110_emit_key: code 00001794 -> addr 30 data 0x14 -> unknown key!
the latest 'input' tool found on
http://dl.bytesex.org/cvs-snapshots/ give good output too:
Code:
root@mythtv:~# lsinput
/dev/input/event0
bustype : BUS_I8042
vendor : 0x1
product : 0x1
version : 43841
name : "AT Translated Set 2 keyboard"
phys : "isa0060/serio0/input0"
bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP
/dev/input/event1
bustype : BUS_I8042
vendor : 0x2
product : 0x6
version : 48
name : "ImExPS/2 Logitech Explorer Mouse"
phys : "isa0060/serio1/input0"
bits ev : EV_SYN EV_KEY EV_REL
/dev/input/event2
bustype : BUS_PCI
vendor : 0x13c2
product : 0xe
version : 2
name : "DVB on-card IR receiver"
phys : "pci-0000:00:0f.0/ir0"
bits ev : EV_SYN EV_KEY EV_MSC EV_REP
open /dev/input/event3: No such file or directory
root@mythtv:~# input-events 2
/dev/input/event2
bustype : BUS_PCI
vendor : 0x13c2
product : 0xe
version : 2
name : "DVB on-card IR receiver"
phys : "pci-0000:00:0f.0/ir0"
bits ev : EV_SYN EV_KEY EV_MSC EV_REP
waiting for events
17:07:17.383090: EV_MSC code=3 value=1966100
17:07:17.383092: EV_MSC code=4 value=20
17:07:17.496911: EV_MSC code=3 value=1966100
17:07:17.496913: EV_MSC code=4 value=20
17:07:17.610501: EV_MSC code=3 value=1966100
17:07:17.610503: EV_MSC code=4 value=20
17:07:17.724241: EV_MSC code=3 value=1966100
17:07:17.724243: EV_MSC code=4 value=20
17:07:17.837895: EV_MSC code=3 value=1966100
17:07:17.837897: EV_MSC code=4 value=20
the button I pressed when receiving a value of 20 is the same as I pressed when getting the output from /var/log/messages: I pressed 'up'
being one of the ten kinds of people that know binary (some pun intended
) and hex too for that matter, I know 0x14 is 20 in decimal so I guess I'll have to edit the file manualy. Don't know why irrecord messed up like that.. ah maybe I screwed it up somewhere..
EDIT 4: I manualy edited te file
Code:
begin codes
go 0x0
tv 0x0
videos 0x0
music 0x0
pictures 0x0
guide 0x0
radio 0x0
ok 0x25
up 0x14
down 0x15
left 0x16
right 0x17
back 0x1F
menu 0x13
prev-chan 0x12
mute 0xF
vol+ 0x10
vol- 0x11
chan+ 0x20
chan- 0x21
record 0x
stop 0x
play 0x
rewind 0x
ffwind 0x
pause 0x
previous 0x
next 0x
1 0x01
2 0x02
3 0x03
4 0x04
5 0x05
6 0x06
7 0x07
8 0x08
9 0x09
0 0x00
* 0x10
# 0x14
yellow 0x11
red 0x2E
green 0x38
blue 0x29
end codes
end remote
but I still get error messages:
Code:
root@mythtv:/etc/lirc# tail -n 1 /var/log/messages
Jan 18 18:00:22 mythtv kernel: av7110_emit_key: code 00001794 -> addr 30 data 0x14 -> unknown key!
aargh, what is wrong? I've seen enough hex for one day.. Maybe some of you could shed some light on this..
EDIT 5: Ok, few more tests:
Code:
root@mythtv:/etc/dvb_ir# lircd -n -H dev/input -d /dev/input/event2
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: ok
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: up
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: down
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: left
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: right
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: back
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: menu
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: prev-chan
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: mute
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: vol+
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: vol-
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: chan+
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: chan-
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 1
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 2
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 3
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 4
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 5
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 6
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 7
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 8
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: 9
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: *
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: #
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: yellow
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: red
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: green
lircd-0.8.2-CVS-pvr150[12093]: invalid code found for /tmp/my-remote: blue
lircd-0.8.2-CVS-pvr150[12093]: lircd(all) ready
lircd-0.8.2-CVS-pvr150[12093]: accepted new client on /dev/lircd
lircd-0.8.2-CVS-pvr150[12093]: initializing '/dev/input/event2'
lircd-0.8.2-CVS-pvr150[12093]: removed client
lircd-0.8.2-CVS-pvr150[12093]: closing '/dev/input/event2'
lircd-0.8.2-CVS-pvr150[12093]: caught signal
root@mythtv:/etc/dvb_ir#
I thought the codes where not valid cause of padding (eg 0x0000000000000001 instead of 0x01)
but changing that was fruitless as well.
been looking at following guide, but it's in german and my german is more then a little rusty:
http://de.gentoo-wiki.com/Hauppauge_WinTV_Nexus-S