View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Jan 18, 2008 8:11 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
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 :D )

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_cards
http://readlist.com/lists/mythtv.org/mythtv-users/0/3050.html

which lead me to av7110_loadkeys

http://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_controllers
so 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 :roll: ) 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


Last edited by bonarez on Sun Jan 20, 2008 9:06 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 19, 2008 11:26 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
One day later, been reading a lot about 'linux input layer'
playing with tools like keyfuzz and input-utils I believe I'm not going to waste more time on lirc.

the input device is working well, but mythtv doesn't seem to be listening to that device:

when I switch to terminal and press buttons on my remote characters appear on screen (in terminal) The chars are wrong (the mapping seems wrong)
when in an X11 terminal though, the kepresses are showing up correctly!

So basicly, mythtv is listening to the wrong device, now, how do I fix that?

any help greatly appreciated,
bonarez


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 20, 2008 10:34 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
Ok getting better results now

mythtv catches keypresses, but sadly not all..

I have installed 'inputlirc' whicht is in the apt repository.

It's a zeroconf 'fake' lircd, that catches events from the 'linux input layer' and lets lirc clients connect.

now just getting all the keys right. I'm still not sure on how to configure it properly, I do not know if any lirc config files are still to be used, In any case I will try to get it to work with keyfuzz, since it will work in any other x11 program then..

Guess I need to do a lot of scancode/keycode mapping now..


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 20, 2008 4:37 pm 
Offline
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location: UK
The Hauppauge Nova-T's IR comes up as an input device as well. Lirc will work with it direct, you just need to tell it to use the dev/input driver. Heres my hardware.conf:

Code:
LIRCD_ARGS=""
START_LIRCMD=false
LOAD_MODULES=false
DRIVER="dev/input"
DEVICE="/dev/input/event2"
MODULES="lirc_dev lirc_i2c"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 20, 2008 8:20 pm 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
thanks for the help, but I think I can get it to work 'without' any use of lirc.

I've already found a way to map my keys, it's just that I'm having trouble finding the right scancode/keykode for some keys. (space char to be exact)

the remote works for most of the keys though, without using lirc / inputlirc (eg: apt-get remove inputlircd && /etc/init.d/lirc stop) still works

I'll still need some time to get them all working, then I'll make a small howto on it.

the configuration is much simpler then lirc, and it works with any device that supports the linux input layer (think bluetooth, joysticks, etc). I really believe this is the way to go.

edit: this issue is to be considered solved
allright, found a way to get the scancodes nice and easy, using tools installed by default, you can expect a howto on this next few days..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 21, 2008 8:01 pm 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
I'm allmost there, it's just that some keys used by myth are giving me troubles, like escape

this is the scancode/keycode I get from the keyboard
Code:
root@mythtv:/home/bonarez# showkey
kb mode was RAW

press any key (program terminates after 10s of last keypress)...
0x01 0x81
0x01 0x81


this is my temporary rc5 file, (not the one for the hauppauge remote, decided to get it to work with the remote that was bundled with my card, but in the end it doesn't matter does it?)
Code:
0x0c KEY_0
0x03 KEY_1
0x04 KEY_2
0x05 KEY_3
0x06 KEY_4
0x07 KEY_5
0x08 KEY_6
0x09 KEY_7
0x0a KEY_8
0x0b KEY_9

0x0d KEY_UP
0x10 KEY_LEFT
0x11 KEY_DOWN
0x0e KEY_RIGHT

0x0f KEY_ENTER
0x09 KEY_M

0x02 KEY_P
0x18 KEY_C
0x12 KEY_I

loading it up through
Code:
root@mythtv:/home/bonarez# av7110_loadkeys /root/test.rc5 > /proc/av7110_ir

and it all works,exept of course the escape key, if I add that key (0x13 KEY_ESC) to my rc5 file, it won't load:
Code:
root@mythtv:/home/bonarez# av7110_loadkeys /root/test.rc5 > /proc/av7110_ir

ERROR: could not parse '/root/test.rc5'


ah too late and too loaded for this now, /me is sleepy.. tomorrow


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 73 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu