Need LIRC help with USB receiver

Help with using MiniMyth (except Booting)

Moderator: Pablo

Need LIRC help with USB receiver

Postby kennelm » Mon Jun 27, 2011 10:08 pm

I am trying to replace an aging Asus Pundit myth frontend that is currenty configured as follows:
Mythdora 12.23
MCE USB IR receiver
lirc-0.8.6-6
Harmony 700 remote

I have a Giada cube that I am trying to boot minimyth 0.23.1-77 from the USB thumb drive. So far, I have most of it working, including audio and video over HDMI, and vdpau for HD decoding.

I am going nuts over the lirc configuration.

Here is my minimyth.conf, as it relates to lirc:
Code: Select all
MM_LIRC_AUTO_ENABLED='no'
MM_LIRC_DRIVER='mceusb'
MM_LIRC_DEVICE='/dev/lirc0'
MM_LIRC_KERNEL_MODULE='auto'
MM_LIRC_FETCH_LIRCD_CONF='no'
MM_LIRC_FETCH_LIRCRC='no'


Here is my lsusb output:
Code: Select all
lsusb
Bus 002 Device 002: ID 0471:0815 Philips eHome Infrared Receiver
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0424:2228 Standard Microsystems Corp. 9-in-2 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Here are the lirc messages in the syslog:

Code: Select all
Jun 26 21:19:22 localhost kernel: lirc_dev: IR Remote Control driver registered, major 248
Jun 26 21:19:22 localhost kernel: lirc_mceusb: Windows Media Center Edition USB IR Transceiver driver for LIRC 1.90
Jun 26 21:19:22 localhost kernel: lirc_mceusb: Daniel Melander <lirc@rajidae.se>, Martin Blatter <martin_a_blatter@yahoo.com>, Dan Conti <dconti@acm.wwu.edu>
Jun 26 21:19:22 localhost kernel: lirc_mceusb 2-4:1.0: lirc_dev: driver lirc_mceusb registered at minor = 0
Jun 26 21:19:22 localhost kernel: lirc_mceusb 2-4:1.0: Registered Philips eHome Infrared Transceiver on usb2:2
Jun 26 21:19:22 localhost kernel: usbcore: registered new interface driver lirc_mceusb
Jun 26 21:19:27 localhost lircd-0.8.6[1379]: lircd(default) ready, using /var/run/lirc/lircd
Jun 26 21:20:01 localhost lircd-0.8.6[1379]: accepted new client on /var/run/lirc/lircd


I started out by trying to "fetch" my existing lircd.conf and lircrc files from the config area, since these files work on the Asus Pundit. If I do this, it simply doesn't work. irw shows no response. If I take the default lircd and lircrc, the remote is at least "alive", meaning a few buttons kinda work, but most buttons do not show up in the irw report.

When I run lirc with the default lircd and lircrc, irw reports that "devinput" is the detected lirc device. Since this seems to be the lirc default device and is not installed anywhere on the minimyth system, I tried downloading this file to the config area, and fetching it explicitly, with the devinput server name changed to something specific that I could recognize in the irw output. I figured I could use this as a starting point and make changes from there. Problem is, this configuration doesnt work either.

In summary, if I try to supply my own lircd file, nothing works.

What should be my course of action to get a mceusb receiver and a harmony remote to play nicely in minimyth? Is there any reason why I cannot simply carry forward my old lircd and lircrc files from the other system, since I am using the same IR receiver and remote? I was hoping to avoid the hassle of using irrecord to create my own lircd.conf file.

Larry
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby kennelm » Thu Jul 07, 2011 2:39 am

Anyone?
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby Pablo » Thu Aug 25, 2011 3:03 am

Could you try the latest test build without setting the MM_LIRC_* variables and post the results?
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Pablo
Site Admin
 
Posts: 4178
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla

Re: Need LIRC help with USB receiver

Postby JoeHenley » Thu Aug 25, 2011 3:23 am

Larry,

I am working on some similar issues. Perhaps my experience will be of some help to you.

I have a fairly new Giada MI-ION2 mobo running as the FE. It was using 0.23.1-73. I found all the "stuff" going on with MM, LIRC, etc. simultaneously was too much for me. I posted a plea for help and got back some very helpful info from Pablo. See my post and Pablo's response on "Confused with LIrc" in the General Help section.

I gave up on 0.23.1-73 (because of the crossing of LIRC and MiniMyth changes) and went over to 0.23.1-78b3. It uses a 3.0 kernel (thus the latest from Jarod Wilson for Lirc) and Pablo's latest efforts at MM (including the new eventlircd). I got delayed with family stuff for awhile but am back at it now. Sorting out LIRC looks like it will be fairly easy now. I am concerned with some X issues, but once I get to focus on them they might not be too bad (I get the "Please Wait" message for a few minutes and then it goes back to the menu -- no TV show, DVD, nor video).

So my recommendation to you is to move to 0.23.1-78b3. Hopefully you'll not have the X problems and the LIRC issues appear to be much smaller.

Keep me posted on how you do.

Joe Henley

PS: I assume eveyone knows this trick, but if not....
I don't replace the working code in tftpboot until I have the new one working. I have two tftpboot subdirs, named slightly different, and a short script to switch back and forth between them. So for example I now have /tftpboot and /tftpboot-78b3 off root. It looks like that when I'm not working on the new version -- and it allows me and my wife to run MM. When I'm going to work on the new version, I run the script and then have /tftpboot and /tftpboot-73. I run nfs restart and xinetd restart when I change from one to another. Sometimes, when I'm REALLY screwed up, I'll have three going at once. ;-)
JoeHenley
Contributor
 
Posts: 185
Joined: Sun Aug 06, 2006 4:12 pm

Re: Need LIRC help with USB receiver

Postby kennelm » Thu Aug 25, 2011 9:10 pm

Thanks!

I'll try 0.23.1-78b and see what happens.
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby JoeHenley » Thu Aug 25, 2011 10:25 pm

Larry,

The LIRC part of the set up (for me, and thus most likely for you) was:
- Remove lircd.conf from the /tftpboot/conf directory. Save it somewhere, but you won't need it for 0.23.1-78b3.
- If you have a non-standard remote/receiver set, then make sure you do have a lircrc that works for your remote/receiver. The one you used before (earlier version) will work fine. But usually, Pablo's suggestion of letting everything default (so the default lircrc gets pulled in) will work just fine.

Once it's all working, you may want to tweak some lirc key bindings. I found editing the lircrc file with the mythweb key-bindings list in the background to be a good way to do it.

Once you have everything working, I'd be interested to hear if you get resume from S-3 sleep via the USB IR receiver to work. I am having trouble with that on my Giada MI-ION2 mobo.

Joe Henley
JoeHenley
Contributor
 
Posts: 185
Joined: Sun Aug 06, 2006 4:12 pm

Re: Need LIRC help with USB receiver

Postby kennelm » Fri Aug 26, 2011 4:01 pm

Pablo,

I have installed the new 78b codebase, without any MM_ settings for LIRC. My minimyth.conf has this:

Code: Select all
MM_DHCP_ROUTERS='192.168.1.1'
MM_MASTER_SERVER='192.168.1.200'
MM_DHCP_HOST_NAME='andy'
MM_DHCP_DOMAIN_NAME_SERVERS='68.87.73.246'
MM_DHCP_NTP_SERVERS='0.fedora.pool.ntp.org'
MM_THEME_NAME='MythCenter'
MM_X_OUTPUT_HDMI='auto'
MM_X_HDMI_OUTPUT='1'
MM_AUDIO_TYPE='digital'
MM_THEMEOSD_NAME='Titivillus-OSD'
MM_DHCP_TCODE='America/New_York'
MM_VIDEO_DECODER='vdpau'
MM_VIDEO_ASPECT_RATIO='16:9'
MM_VIDEO_DEINTERLACER='vdpaubasic'
#MM_X_RESOLUTION='1024x768'
MM_X_FETCH_XORG_CONF='yes'
MM_AUDIO_FETCH_ASOUND_STATE='yes'


Here is my syslog now:

Code: Select all
more /var/log/messages | egrep lirc
Aug 26 10:51:27 (none) user.info kernel: lirc_dev: IR Remote Control driver registered, major 252
Aug 26 10:51:27 (none) user.info kernel: rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
Aug 26 10:53:13 (none) local0.info mythfrontend: 2011-08-26 10:53:13.447 LIRC: Successfully initialized '/var/run/lirc/lircd' using '/home/minimyth/.mythtv/lircrc' config


Code: Select all
ps -ef | grep lirc
root      1897     1  0 10:53 ?        00:00:00 /usr/sbin/eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --repeat-filter --release=:UP
root      1899     1  0 10:53 ?        00:00:00 /usr/bin/irexec -d /etc/lirc/lircrc
root      2150  2123  0 11:00 pts/0    00:00:00 grep lirc


The system boots fine, and audio and video are both working over HDMI. I can control the myth frontend via keyboard, but the remote is non-responsive. I'll give irw a shot and see what happens...
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby Pablo » Sat Aug 27, 2011 5:39 pm

What is the output of the command
Code: Select all
cat /proc/bus/input/devices

If you run the command
Code: Select all
killall eventlircd

and run the command
Code: Select all
evtest /dev/input/event?

where event? is the event device listed under Handlers for your remote in the output of the first command (cat /proc/...), do you see any output when you press the remote keys?
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Pablo
Site Admin
 
Posts: 4178
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla

Re: Need LIRC help with USB receiver

Postby kennelm » Sat Aug 27, 2011 9:17 pm

Pablo,

Here you go...

Code: Select all
cat /proc/bus/input/devices
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0003 Vendor=0471 Product=0815 Version=0000
N: Name="Media Center Ed. eHome Infrared Remote Transceiver (0471:0815)"
P: Phys=usb-0000:00:04.0-1
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-1/3-1:1.0/rc/rc0/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=100013
B: KEY=fff 0 0 200 108fc32e 2376051 0 0 0 7 158000 4192 1 9e9680 0 0 10000000
B: MSC=10

I: Bus=0003 Vendor=046d Product=c312 Version=0110
N: Name="BTC USB Multimedia Keyboard"
P: Phys=usb-0000:00:06.0-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:06.0/usb4/4-2/4-2:1.0/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=120013
B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c312 Version=0110
N: Name="BTC USB Multimedia Keyboard"
P: Phys=usb-0000:00:06.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:06.0/usb4/4-2/4-2:1.1/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=13
B: KEY=2000000 387a d801d6a1 1e0000 0 0 0
B: MSC=10
 


When I run the evtest on event2, using the Harmony 700, I get responses to each key pressed. When I press a 2, I get:

Code: Select all
Testing ... (interrupt to exit)
Event: time 1314476965.345935, type 4 (Misc), code 4 (ScanCode), value 1f02
Event: time 1314476965.345939, -------------- Report Sync ------------
Event: time 1314476965.463914, type 4 (Misc), code 4 (ScanCode), value 1f02
Event: time 1314476965.463918, -------------- Report Sync ------------
Event: time 1314476965.583902, type 4 (Misc), code 4 (ScanCode), value 1f02
Event: time 1314476965.583906, -------------- Report Sync ------------
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby Pablo » Mon Aug 29, 2011 12:38 am

The fact that evtest is output scan codes rather than key events means that the keymap loaded by the kernel driver does not know how to convert what it is receiving from your remote control through your remote control receiver into key events.

I have the same remote control receiver and it works fine with the bundled MCE remote control. Did your remote control receiver come bundled with an MCE remote control? If so and you still have it, then you test whether or not it works correctly?

My first thought is that your Harmony 700 might be sending IR signals that do not match the bundled MCE remote control's signals and you were able to overcame this in the past by using a custom lircd.conf file. If this is the case, then the problem could be overcome by either configuring the Harmony 700 to match the bundled MCE remote, or by creating a custom RC keymap file for your Harmony 700 configuration. Personally, I think that it would be easier in the long term to configure your Harmony 700 to match your the bundled MCE remote as that is what driver and application developers assume is being used with the identified remote control receiver. Also, MiniMyth does not have support for custom RC keymap files integrated into its init system, so using a custom RC keymap file would require a little work.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Pablo
Site Admin
 
Posts: 4178
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla

Re: Need LIRC help with USB receiver

Postby kennelm » Mon Aug 29, 2011 1:55 am

Pablo wrote:The fact that evtest is output scan codes rather than key events means that the keymap loaded by the kernel driver does not know how to convert what it is receiving from your remote control through your remote control receiver into key events.

I have the same remote control receiver and it works fine with the bundled MCE remote control. Did your remote control receiver come bundled with an MCE remote control? If so and you still have it, then you test whether or not it works correctly?


I can't seem to find the MCE remote that came with the IR receiver. I have been using other remotes, including the Harmony. I got the Harmony working with mythtv using a mythtv device I found in the Harmony setup database, along with a Hauppauge lircd.conf file that I found here: http://lircconfig.commandir.com/lircd.conf/?viewremote=162. Through trial and error, I found that this file seemed to be Harmony-friendly, allowing me to control mythtv without too much work.

How did you program your Harmony to work with mythtv (and the MCE IR)? What device did you choose from the Harmony database?

Pablo wrote:My first thought is that your Harmony 700 might be sending IR signals that do not match the bundled MCE remote control's signals and you were able to overcame this in the past by using a custom lircd.conf file. If this is the case, then the problem could be overcome by either configuring the Harmony 700 to match the bundled MCE remote, or by creating a custom RC keymap file for your Harmony 700 configuration. Personally, I think that it would be easier in the long term to configure your Harmony 700 to match your the bundled MCE remote as that is what driver and application developers assume is being used with the identified remote control receiver. Also, MiniMyth does not have support for custom RC keymap files integrated into its init system, so using a custom RC keymap file would require a little work.


I thought the point of MM_LIRC_FETCH_LIRCD_CONF and MM_LIRC_FETCH_LIRCRC is for me to override the default behavior and bring my own mappings. If this is incorrect, then what do these config settings do? Assuming I cannot change the way I have programmed the Harmony and make that work, what would I need to do in order to create the custom RC keymap file that you refer to above?

Thanks,
Larry
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby JoeHenley » Mon Aug 29, 2011 5:16 pm

Larry,

"http://lircconfig.commandir.com/lircd.conf/?viewremote=162" is not for an MCE remote receiver; it's for a Hauppauge PVR remote receiver. So looking for MCE codes won't help much, try Hauppauge PVR.

"I thought the point of MM_LIRC_FETCH_LIRCD_CONF and MM_LIRC_FETCH_LIRCRC is for me to override the default behavior and bring my own mappings. " As noted before, get rid of lircd.conf. ... and read thru Pablo's info on how lirc now (as of ver 0.2*.*-78b3) works in "Confused with LIrc" in the General Help section.

Most of what you need is there. Good luck!

Joe Henley
JoeHenley
Contributor
 
Posts: 185
Joined: Sun Aug 06, 2006 4:12 pm

Re: Need LIRC help with USB receiver

Postby kennelm » Mon Aug 29, 2011 9:30 pm

JoeHenley wrote:Larry,

"http://lircconfig.commandir.com/lircd.conf/?viewremote=162" is not for an MCE remote receiver; it's for a Hauppauge PVR remote receiver. So looking for MCE codes won't help much, try Hauppauge PVR.
Joe Henley


Agreed. When I programmed the Harmony, I had to pick something they have defined in their database. I picked a Hauppauge MythTV device, If I recall correctly. Knowing that, I quickly found an lircd.conf that is compatible, and all was right with the world.

Now, since minimyth is less forgiving of this kind of custom configuration, it occurs to me that there must be another device that's defined in the Harmony database that "just works" with the IR hardware I have. Not sure if this is an MCE device, or what. I am looking for feedback on what Harmony device I should choose from the exhaustive list in their database that will work out of the box with the minimyth LIRC setup. I'd rather reprogram the remote than struggle with a one-off minimyth configuration.

UPDATE: Using the Harmony setup software, I chose Microsoft and then searched for MCE and selected that device for my Harmony. Now, minimyth is responsive to my remote, for the most part. I need to figure out why some buttons do not work, like Menu, but, this is good progress. If anyone can point me to the key mapping I need for the Menu button (that is, what MCE button maps to the Myth Menu command), that would be great!

Thanks to all and I'll keep you posted on the progress. Here's hoping I don't have the sleep issues with my Giada/ION system that Joe has described.
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Re: Need LIRC help with USB receiver

Postby JoeHenley » Mon Aug 29, 2011 11:09 pm

Larry,

Facing the same issue, what I did was:
- Telnet into the front end, run "killall X". Then run "irw &" .... in the same telnet window.
- Go to the FE, point at the receiver with the remote, press every key on the remote. (Use some pattern you'll remember!) Tip: do the power button last!
- Return to the PC running the telnet session, it should have all the output from irw in the window. Do a cut_'n_paste and save it to a text file somewhere.
So now you have the info to know what the kernel returns for every key pressed on the remote. As you described things, most (but not all) is the "standard" MCE stuff.

You can at this point build an "eventlircd" map file. Check out Pablo's eventlirc site on google and find the man files for more info. Or .....

With the info from the first paragraph, modify your lircrc file. If you don't have a fairly good lircrc file to start with, look in /etc/lirc/lircrc.d/mythtv/base. The KEY_* from the irw process is used in the "button = " line. Make sure you have a "begin yada yada end" stanza for every key you want to use. You should find most are correct already. Change the ones which aren't correct (ie., the KEY_* in the lircrc file doesn't EXACTLY match what the irw returned so change it to match EXACTLY).

You'll probably want to leave some unused key stanza's there even if you're not going to use them right away. Just comment out the entire stanza.

When you're done, save the lircrc file, re-start lirc (or reboot), and you should have your remote working just as desired.

Good luck, let us know how it goes.

Joe Henley
JoeHenley
Contributor
 
Posts: 185
Joined: Sun Aug 06, 2006 4:12 pm

Re: Need LIRC help with USB receiver

Postby kennelm » Tue Aug 30, 2011 2:12 am

Joe,

I think the easiest course of action for me is to simply create my own lircrc and update the key mapping I need for the menu command. I can have my remote send a code I am not otherwise using, like KEY_TUNER (for MCE liveTV). I know how to update the lircrc file to make this the key for myth menu ('M').

I assume I need to create this lircrc file in the minimyth config directory, using the base file that you referred to as a starting point? And then tell minimyth to use mine, and not the default, with MM_LIRC_FETCH_LIRCRC='yes'. Otherwise, if I edit in-place the one in /etc, it will get replaced with the next reboot, right?

Meanwhile, for added frustration, minimyth is suddenly, and inexplicably, telling me that it cannot connect to the mysql database on the master backend. I have no idea what caused this to start happening. It was working. I can ping the backend host from the minimyth box. I can log into the database remotely using other tools, like from my windows desktop. I dont have a firewall running on the master backend. Nothing changed in the minimyth.conf related to the mast backend IP address. Very strange.

UPDATE: I found that when I get this mysql backend error, if I kill off X, and then init 3, the minimyth initialization starts up again and gets past the error. Thoughts?
kennelm
Member
 
Posts: 11
Joined: Mon Jun 27, 2011 9:52 pm

Next

Return to General Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron