Author Topic: Mapping a remote  (Read 1929 times)

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Mapping a remote
« on: November 23, 2007, 02:06:07 pm »
Hi guys, I just purchased a no-name remote designed for Windows Media Center to use with LMCE. It has a joystick that right now works fine as a mouse and the media buttons (play, pause, ff and such) work fine - I would just like to know how I can map the buttons that don't do anything right now and make them actually do useful stuff in LMCE.

LME doesn't recognize it as a remote, though, but as I said it's basic functions are usable. It's connected to the computer via a bundled USB IR receiver, so it should be as simple as to map the incoming USB signals to keys, right? I just have no clue how to actually do that.

Thraxius

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Mapping a remote
« Reply #1 on: November 23, 2007, 02:13:35 pm »
I have been trying to map my remote to do things for a few days. I have not figured it out yet. If you get an answer let me know. Also I will update you if I figure it out. I know how to get it set the remote up in the system under the admin. I get the codes in to the remote assigned to my device template. I just need to figure out how to assign the button presses to do things on the UI.

rafik24

  • Guru
  • ****
  • Posts: 158
    • View Profile
Re: Mapping a remote
« Reply #2 on: November 23, 2007, 03:39:34 pm »
 Hi,

 The remote buttons are checked against the sql db (pluto_main ; RemoteMapping).

 It often happend that the remote buttons are slightly different than the once used in the sql table.

 However i would recommend to rename the buttons in the remote config rather that the db

 There is a thread on this topic where i have been helped by totallymaxed

 Hope this helps,

Rafik



 

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #3 on: November 23, 2007, 06:02:18 pm »
Hi,

 The remote buttons are checked against the sql db (pluto_main ; RemoteMapping).

 It often happend that the remote buttons are slightly different than the once used in the sql table.

 However i would recommend to rename the buttons in the remote config rather that the db

 There is a thread on this topic where i have been helped by totallymaxed

 Hope this helps,

Rafik



 

How would I go about doing that? I'm pretty confused about the admin site at this point.

I go to Wizard > Devices > Media Director and 'add remote' which prompts me to put manufacturer name and such, all of which is sorta void, because it's a noname remote and receiver. But anyhow, I add a manufacturer (noname) and a device(?) and then what? There's something about editing RemoteMapping in a SQL database? How would I do that? And also, don't I need to know what signals the button presses are sending?

I'm not asking for a step-by-step guide on how to do it(though I wouldn't complain..), but I'm just really at a loss here.. I just need to understand where to read USB Device keypresses and make them output keyboard commands or commands to the UI

But thanks for the help, Rafik24.. I tried looking back through your other threads, but I don't think I could find the one in question.. And what I did find confused me even more..

rwilson131

  • Veteran
  • ***
  • Posts: 118
    • View Profile
Re: Mapping a remote
« Reply #4 on: November 23, 2007, 06:19:35 pm »


Can you give more information?  Homebrew Reciever? remote control Model?
do you have a working copy of lircd.conf for this remote?

You are in the right place on the MD page. First select the IR Reciever and then select the remote.

If your Remote is not listed then your are going to need to create a new template for the new remote. 

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #5 on: November 23, 2007, 06:35:04 pm »


Can you give more information?  Homebrew Reciever? remote control Model?
do you have a working copy of lircd.conf for this remote?

You are in the right place on the MD page. First select the IR Reciever and then select the remote.

If your Remote is not listed then your are going to need to create a new template for the new remote. 

Hi Wilson!

Well, it's a noname receiver that came with the remote.. None of them have any writing on them at all. I have no lircd.conf - It shows up as a USB Keyboard in /proc/bus/usb/devices.

But after I create a new template, it just drops me back to where the 'add remote' button is..

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #6 on: November 23, 2007, 08:57:22 pm »
Okay, so I found the keycodes the remote was sending through xev and then using xmodmap I mapped them to the corresponding keys on the keyboard.

This, however, leaves me with still something missing. On the keyboard, there seems to be no direct key to, for example, turn the volume up/down, so how do I map the volume up/down keys on the remote to actually turn the volume up and down and other such things?

rafik24

  • Guru
  • ****
  • Posts: 158
    • View Profile
Re: Mapping a remote
« Reply #7 on: November 25, 2007, 04:04:24 am »
 You need to add the volume up / volume down command in the db ( pluto_main RemoteMappings) as said earlier.

Rafik

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #8 on: November 25, 2007, 06:02:08 pm »
You need to add the volume up / volume down command in the db ( pluto_main RemoteMappings) as said earlier.

Rafik

Even if the remote isn't recognized as a remote, but as a USB Keyboard? And also where is the db and do I just edit it like a text-file?

Thanks for the help!

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Mapping a remote
« Reply #9 on: November 25, 2007, 11:16:28 pm »
Sounds like we may be using the same remote. It works fine as a mouse and keyboard (ie; the number keys work as if they were pressed on a kb)

I posted about it here http://forum.linuxmce.org/index.php?topic=2433.0

but didn't really get much further with it.
I still use it to control the MD, just does not have the media control buttons working.

My thoughts were that if a mapping device was written that allowed the extra keys on a keyboard to map to the media controls then this would allow both this remote as well as keyboards with extended media buttons to work.
Still havn't done anything about it (have not really done anything with linuxMCE for quite a while now). May do so when I have some leave over christmas.

I know that there is commands to simulate key presses which is sort of the reverse of what is needed.
What I still need to find out is if for example PAUSE causes a DCE Command to be sent or is it handled a different way.

Keep us informed if you make any progress as the remote itself was quite good and certainly cheap.

Regards
Darren

rafik24

  • Guru
  • ****
  • Posts: 158
    • View Profile
Re: Mapping a remote
« Reply #10 on: November 26, 2007, 02:03:54 am »
 Hi Darren,

 Nice to see you back  ;)

 I have a remote which uses a usb receiver seen as a keyboard, the big issue with mine is that some keys are directly recognized as keyboard keys by hiddev and i couldnt find a way to remap the keys properly. it is possible to edit hiddev before compilling the kernel but then any usb keyboard would use the new map anb obviously that would not help much.

 i just gave up as i found this to be to much effort just to support a silly remote.

 So a built a serial receiver and know it works like a charm (even over walls lol !).

 Have a look at lirc.org serial receivers

 Hope this helps,

Rafik

« Last Edit: November 26, 2007, 02:05:56 am by rafik24 »

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #11 on: November 26, 2007, 02:21:36 pm »
darrenmason > It certainly does seem like we have the same problem (Or remote even? Bought mine from eBay China), but most of my media buttons actually do work, except volume up/down.. That reminds me of an interesting development: when watching DVDs, I can actually use volume up/down, but the screen interface that pops up is remotely different than the LMCE one. I suspect it's the DVD playback software's own (Xineplayer? VLC?) It's white with blue bars and numbers, but I digress.

I don't think I'm gonna work that hard on this as it's actually working fine now. Just not 100% flawless and logical, but just fine for what I need it to. There's a lot of unused buttons, but it doesn't bother me enough to actually look into a new solution as rafik24 suggest.

Or.. That depends on how hard building a receiver would be..

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Mapping a remote
« Reply #12 on: November 26, 2007, 10:52:25 pm »
Hi,

Out of interest is it this remote? http://www.digitalnow.com.au/otherproducts.html

If it is could you please post the result of 'lsusb'

Might help me to get more functionality on mine working....

Had a quick look at code yesterday for linuxMCE, should be a way to map keyboard events to media events, may be a bit of work though

Regards
Darren

Visti

  • Regular Poster
  • **
  • Posts: 22
    • View Profile
Re: Mapping a remote
« Reply #13 on: November 27, 2007, 01:29:19 pm »
No, the one I got was this one:
Picture

I'm not handy with code, so I probably won't be much of a help there..