Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Get Nova-T Remote 2 control all your apps INC MythTV
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
riksta
n00b
n00b


Joined: 16 Apr 2004
Posts: 73
Location: Manchester, UK

PostPosted: Sat Aug 28, 2004 10:48 am    Post subject: HOWTO: Get Nova-T Remote 2 control all your apps INC MythTV Reply with quote

How to get the Hauppauge WinTV Nova-T Remote Control to work properly with MythTV to create the perfect PVR!

I'd like to share something with you guys, that i think is very important if you are wanting to set up a really nice working PVR with mythtv on gentoo.

Have you noticed that the nova-t's kernel module (budget-ci.ko) comes with its own special way of handling the on board remote control? Well....this sounds great at 1st....no LIRC to worry about!

However, the problem is that, the card driver literally just translates the remote's signals into keypresses on the system. For example if you go into a terminal and press the 2 key, the number "2" appears in the console.

As the default configuration, the only keys that will work out of the box on MythTV are just the number keys 0-9 .... DAMN! not too good!

So i did some digging around in /usr/src/linux/drivers/media/dvb/ttpci/budget-ci.c and i found that there was a list of the key mappings here....and so i searched on google and sure enough someone had already hacked up some new keybindings so that all the keys (more or less) are bound to the right key for operating mythtv! This was lucky as it saved me some work... but it was very difficult to find and im sure there are not many people that know about this little trick!

Anyway enough of the rubbish.....lets get on with showing you how to do it

Step 1

Go to the dvb directory in your kernel source tree
Code:

cd /usr/src/linux/drivers/media/dvb/ttpci

cp budget-ci.c buget-ci.c.old


Step 2

Open up the following file
Code:

$editor budget-ci.c


You need to remove the following lines of code from the lines (line 142 in my file (may differ slightly)) starting:

Code:

static  u16 key_map[64] = {

 remove all the contents in here
 all the way to the end of the brace
 (leaving the top line and the bottom brace)

};



and insert this section of code:

Code:

       /* Key bindings for MythTV
           For Hauppauge Nova-T (Grey/Silver Remote Control) */

       /* 0x0X */
       KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8,
       KEY_9,
       0,
       KEY_QUESTION, // Red
       KEY_W, /* Reserved: No label */
       KEY_M, /* Menu */
       0,
       KEY_E, // Mute
       /* 0x1X */
       KEY_RIGHT, KEY_LEFT, //
       0, 0, 0,
       0, 0, 0,
       0, 0, 0,
       0, 0, 0,
       KEY_PAGEDOWN, // Skip forward
       KEY_ESC, /* Back/Exit */
       /* 0x2X */
       KEY_UP, KEY_DOWN, //
       0, 0,
       KEY_PAGEUP, // Skip Back
       KEY_ENTER, // Enter
       0, 0, 0,
       KEY_U, // Blue
       0, 0, 0, 0,
       KEY_SLASH, // Green
       0,
       /* 0x3X */
       KEY_P, // Pause
       0,
       KEY_LEFT, // Rewind
       0,
       KEY_RIGHT, // Fast Forward
       KEY_P, // Play
       KEY_S, // Stop
       KEY_R, // Record
       KEY_J, //  Yellow
       0, 0,
       KEY_SPACE, /* Go */
       KEY_I, /* Full Screen */
       KEY_POWER, /* On/Off */
       0, 0,


this code should be inside the curly braces now....so proceed to save and exit


Step 3

Now to re-compile with the changes

(assuming you are still in the /usr/src/linux/drivers/media/dvb/ttpci directory)
Code:

rm budget-ci.ko
cd /usr/src/linux
make modules
make modules_install


then you'll need to reload the module so that it takes effect
Code:

rmmod budget_ci
modprobe budget_ci


That's about it .... with regards to actually getting it working.

Note:
As you can see in the code that we inserted, its relatively self explanitory as to what the commands mean KEY_W for example means that itll send w (as if someone had pressed it on the keyboard)

With this knowledge, you can actually do some other cool stuff!

I for example, use it to control my XMMS/BeepMediaPlayer.
The MythTv key configuration above already allows you to turn the volume up and down and fast forward and rewind...as the arrow keys on the remote are mapped to the arrow keys on the keyboard, which control those four things in XMMS.

Now the problem is that you'll probably want to skip to the next track (thats key b in xmms/beep) so what i did was edit the key KEY_W, which is the blank key on the remote itsself above play, and i mapped it to KEY_B, so now i can also skip the track!

With that in mind you can basically use your remote to work any application that allows control by the keyboard....so HAVE FUN!

I hope this has been of use to you! Let me know of any other suggestions

Rick


Last edited by riksta on Sun Aug 29, 2004 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7692
Location: Pelotas, BR

PostPosted: Sat Aug 28, 2004 6:56 pm    Post subject: Reply with quote

Moved from Multimedia as it isn't a request for support.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
riksta
n00b
n00b


Joined: 16 Apr 2004
Posts: 73
Location: Manchester, UK

PostPosted: Sun Aug 29, 2004 2:17 am    Post subject: Reply with quote

pilla wrote:
Moved from Multimedia as it isn't a request for support.


Sorry about that.. Duly noted!
Back to top
View user's profile Send private message
Sastraxi
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 258

PostPosted: Sun Aug 29, 2004 2:56 am    Post subject: Reply with quote

With mythweb, you can change the keymappings of mythtv. So that may save you some kernel hacking.
_________________
Platypus.
Back to top
View user's profile Send private message
riksta
n00b
n00b


Joined: 16 Apr 2004
Posts: 73
Location: Manchester, UK

PostPosted: Sun Aug 29, 2004 1:33 pm    Post subject: Reply with quote

ahh, that sounds good, i'll have a look at that.

Although, the problem still remains that initially, you'd need to know what keys on the remote produce what output anyway (pretty much impossible without looking at the budget-ci.c file)

plus this is useful for using the remote with any other application :D
Back to top
View user's profile Send private message
robin_elvin
n00b
n00b


Joined: 25 Nov 2004
Posts: 16
Location: Dereham, Norfolk, England

PostPosted: Thu Nov 25, 2004 8:51 pm    Post subject: Nova-T #90002 Reply with quote

Does this work with the new Nova-T cards? I have just built a MythTV box and the card works fine for TV but I'm stuck trying to get the remote to work.

This thread says you don't need lirc, other threads say you need to enable IR support in the kernel which isn't there in kernel-2.6.9-gentoo-r1 that I am using.

Any help/pointers would be much appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum