Tuesday, March 25, 2008

Remotes

My MCE remote that came with my PVR-USB2 doesn't seem to be programmable (to have the volume control the television). So I bought the ultra cool M2010 remote off ebay, and ordered the receiver from Dell, per the AVS forum thread (it contains a discrete power supply and two chips: CYWUSB6934-48LFXC [wireless USB tx (and rx?)] and the CY7C63743-QXC [enCoRe USB something or other].

Be sure to keep in mind Bruce Perens instructions.

# cat /proc/bus/input/devices

and
# cat /proc/bus/usb/devices
If I have trouble:

Or maybe I should just buy the Logitech Harmony remote that everyone raves about. Nawww... that would be cheating.

One thing I noticed is that the remote is recognized as a keyboard rather than a remote. A thread on the linuxmce forum mentions getting Linux to recognize it as a remote by keying on its USB UUID, which allowed someone to use UIRT by way of adding a line in /etc/something/rules.d. Seems like part of the problem might be some keycodes are > 255? Xmodmap is the default way of supporting stuff via the HID driver that is enabled by default. A hack into LIRC might provide access to more keys. The guy that figured out the rules.d aspect is named Adam Pierce. LIRC appears to be the much preferred way because it works across lots of different applications. There is also a thread on myth-users about udev to skip the keyboard buffer.

I wonder about the other direction. The remote has an LCD screen. Interesting - there is a USB LCD display that you can buy which we might be able to base some of this on. It uses the standard libusb, with a small adder: usblcd. linuxusblcd and lcdproc also exist. There is even Mythlcdserver, which uses lcdproc. Might use a usb bus tracker within windows to see it (the driver) in operation.

Different thread on the same topic: I also have a desire to be able to remotely control a frontend from a remote computer (that is obviously not the front end). Especially mythmusic (or whatever might replace it). So volume control, next song and previous song are the most important. Being able to retrieve the playlist would be a big bonus, although I'd probably be happy with Previous song/artist + current song/artist (and hopefully + next song/artist). There are some people that appear to have done something similar: Web Virtual Remote, iphone remote control, mythetomer, mythRemote, mythdroid (for Android), and for the iphone: Remote Remote and MyMote. Mythdroid includes mdd (mdd-01.pl) which intercepts music info headed for the LCDproc - this could be useful for debug and other things. The mythtv telnet socket wiki page has links to some of these as well. Or maybe I'll just settle for vnc. tkmythremote is new, as is mymote (which is much more than just a simple remote - perhaps what I want for the LCD display??). Someone apparently posted a python script to do something similar from the command line.

And it would be worth being able to:
  1. Power down the backend with a keypress or mouse button (or combination)
  2. Restart the front-end
Since I have a combined frontend/backend, this shouldn't be too hard.

Someone has gone to the trouble of putting together some scripts to control the stereo and TV.
Commandir has a pretty comprehensive list of lirc related configs - it might be worth grabbing in case the site goes offline. Of course, it is probably based on the files semi-hidden in on the lirc website.

BTW, irw and mode2 are the two utils for debugging lirc:
$ sudo killall -9 lircd
$ sudo mode2 -d /dev/lirc0

2 Comments:

At Fri Jul 24, 01:50:00 AM 2009, Blogger Unknown said...

I found this blog through your post on the AVS forum - did you ever get the LCD protocol reverse engineered? I have a similar remote (the Gyration Air Music), and I can't get the remote to work while I'm sniffing USB data (tried multiple programs). You mentioned you could at least see song information being transferred - can you tell me what program you're using in windows to log the USB transfers?

 
At Sun Jul 26, 09:20:00 AM 2009, Blogger Marc Randolph said...

Unfortunately I have not had time (and even if I do, I don't know how successful I'll be). I have dreams of getting back to it in the next month or two, but who knows if that works out.

I too had a bit of trouble getting data captured, although it has been almost exactly a year, so my memory is fading somewhat.

You have the windows driver for the remote installed and have it working with Windows Media player, right?

I think I used sniffusb.exe, which I believe is a somewhat updated version of usbsnoop.

I also found snoopypro, but don't recall getting that to work.

I can zip up the captures and send them to you if you have the time or interest in looking at them. Just shoot me a note on AVS forums with your email address.

 

Post a Comment

<< Home