Generic USB IR Remote?

Ask for hardware advice here

Moderator: Pablo

Post Reply
opel70
New Member
Posts: 8
Joined: Sat Sep 26, 2009 5:10 am
Location: Los Angeles

Generic USB IR Remote?

Post by opel70 » Wed Jan 12, 2011 11:11 pm

Hello,

I've been working on getting my pretty generic Dekcell remote working with MiniMyth 0.23.1-75. I had it working with 0.21.0.69, but then I went and updated my backend. I see a lot has changed since v69. Any way, the remote looks like this:
http://www.google.com/products/catalog? ... EPICMAg4bg#

Code: Select all

ls -l /dev/persistent/
lrwxrwxrwx    1 root     root            15 Jan 12 15:44 event-phys:LNXPWRBN:button:input0 -> ../input/event1
lrwxrwxrwx    1 root     root            15 Jan 12 15:44 event-phys:PNP0C0C:button:input0 -> ../input/event0
lrwxrwxrwx    1 root     root            15 Jan 12 15:44 event-usb:04b4:0100::00 -> ../input/event2
lrwxrwxrwx    1 root     root            15 Jan 12 15:44 mouse-usb:04b4:0100::00 -> ../input/mouse0
I've modified the mcekbd.evmap to have the correct key codes (I think) for the remote and created a devinput.evmap in my conf directory.

Code: Select all

KEY_UP             = KEY_UP
KEY_DOWN           = KEY_DOWN
KEY_LEFT           = KEY_LEFT
KEY_RIGHT          = KEY_RIGHT
KEY_ENTER          = KEY_ENTER
KEY_PAGEDOWN       = KEY_PAGEDOWN
KEY_PAGEUP         = KEY_PAGEUP
#DVD Menu button
crtl+KEY_V         = KEY_MENU
#Back button
KEY_BACKSPACE      = KEY_BACK
KEY_NUMERIC_1      = KEY_NUMERIC_1
KEY_NUMERIC_2      = KEY_NUMERIC_2
KEY_NUMERIC_3      = KEY_NUMERIC_3
KEY_NUMERIC_4      = KEY_NUMERIC_4
KEY_NUMERIC_5      = KEY_NUMERIC_5
KEY_NUMERIC_6      = KEY_NUMERIC_6
KEY_NUMERIC_7      = KEY_NUMERIC_7
KEY_NUMERIC_8      = KEY_NUMERIC_8
KEY_NUMERIC_9      = KEY_NUMERIC_9
KEY_NUMERIC_0      = KEY_NUMERIC_0
#TV Button
ctrl+KEY_T         = KEY_TV
#MUSIC button
ctrl+KEY_M         = KEY_MP3
#VIDEO button
ctrl+KEY_E         = KEY_VIDEO
#PHOTO button
ctrl+KEY_I         = KEY_MEDIA
#DVD button
ctrl+KEY_N         = KEY_DVD
#RADIO button
ctrl+KEY_A         = KEY_RADIO
ctrl+KEY_R         = KEY_RECORD
#REPEAT button
ctrl+shift+KEY_R   = KEY_D
ctrl+KEY_P         = KEY_PAUSE
ctrl+shift+KEY_P   = KEY_PLAY
ctrl+KEY_S         = KEY_STOP
ctrl+KEY_B         = KEY_PREVIOUS
ctrl+KEY_F         = KEY_NEXT
ctrl+shift+KEY_D   = KEY_REWIND
ctrl+shift+KEY_F   = KEY_FORWARD
#MUTE button
KEY_F8             = KEY_MUTE
KEY_VOLUMEDOWN     = KEY_VOLUMEDOWN
KEY_VOLUMEUP       = KEY_VOLUMEUP
#GUIDE button
KEY_F1             = F1
When I kill eventlircd and run evtest I get this type of output:

Code: Select all

Event: time 1294869897.119635, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1294869897.119649, type 1 (Key), code 29 (LeftControl), value 1
Event: time 1294869897.119654, type 4 (Misc), code 4 (ScanCode), value 700e1
Event: time 1294869897.119659, type 1 (Key), code 42 (LeftShift), value 1
Event: time 1294869897.119668, type 4 (Misc), code 4 (ScanCode), value 70015
Event: time 1294869897.119673, type 1 (Key), code 19 (R), value 1
Event: time 1294869897.119677, -------------- Report Sync ------------
Event: time 1294869897.127616, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1294869897.127626, type 1 (Key), code 29 (LeftControl), value 0
Event: time 1294869897.127631, type 4 (Misc), code 4 (ScanCode), value 700e1
Event: time 1294869897.127634, type 1 (Key), code 42 (LeftShift), value 0
Event: time 1294869897.127641, type 4 (Misc), code 4 (ScanCode), value 70015
Event: time 1294869897.127645, type 1 (Key), code 19 (R), value 0
Event: time 1294869897.127648, -------------- Report Sync ------------
Event: time 1294869904.615905, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1294869904.615919, type 1 (Key), code 29 (LeftControl), value 1
Event: time 1294869904.615928, type 4 (Misc), code 4 (ScanCode), value 70015
Event: time 1294869904.615932, type 1 (Key), code 19 (R), value 1
Event: time 1294869904.615937, -------------- Report Sync ------------
Event: time 1294869904.623894, type 4 (Misc), code 4 (ScanCode), value 700e0
Event: time 1294869904.623904, type 1 (Key), code 29 (LeftControl), value 0
Event: time 1294869904.623912, type 4 (Misc), code 4 (ScanCode), value 70015
Event: time 1294869904.623916, type 1 (Key), code 19 (R), value 0
That was for the RECORD and the REPEAT buttons on the remote. Before kill eventlircd and running irw, both buttons show up as KEY_R.

What am I missing? Does the devinput.evmap need to be named something else?

Oh yeah, the lsusb output is:

Code: Select all

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04b4:0100 Cypress Semiconductor Corp. Cino FuzzyScan F760-B
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
What else do you need to know?
Tim Musa

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Generic USB IR Remote?

Post by Pablo » Sat Jan 15, 2011 11:49 pm

You are correct in assuming the file should be named something else. Specifically, it is named after remote control receiver hardware. In your usb bus type (which is 03), usb vendor (which is 04b4) and usb device (which is 0100). Therefore, if you name it 03_04b4_0100.evmap, then it should work.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

opel70
New Member
Posts: 8
Joined: Sat Sep 26, 2009 5:10 am
Location: Los Angeles

Re: Generic USB IR Remote?

Post by opel70 » Wed Jan 19, 2011 4:34 pm

Thanks for the tip. I gave that a try, renaming the file to 03_04b4_0100.evmap and also updating the MM_LIRC_EVENTLIRCD_FILE_EVMAP_ADD option in the minimyth.conf file to point to this file. Looking in /var/log/messages I see that the file does get downloaded during boot. However, I still get the same results in irw. The Play and Pause buttons both return KEY_P, the Record and Repeat buttons both return KEY_R, etc. Am I understanding correctly that with this evmap file in place, the Play button should return KEY_PLAY in irw?

I have also tried this in 23.1-76b1 with the same results.

Thanks for any more input you can give on this.

Tim
Tim Musa

opel70
New Member
Posts: 8
Joined: Sat Sep 26, 2009 5:10 am
Location: Los Angeles

Re: Generic USB IR Remote?

Post by opel70 » Sun Feb 06, 2011 3:10 am

So, no other tips to get the correct output from this remote? Or logs I should be checking?

Tim
Tim Musa

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Generic USB IR Remote?

Post by Pablo » Tue Feb 08, 2011 4:12 am

I cannot think of what might be causing this.

Is the file /etc/eventlircd.d/03_04b4_0100.evmap present?

If you kill eventlircd and then restart it with

Code: Select all

/usr/sbin/eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --repeat-filter --release=:UP -vvv -f
do you see anything interesting in the output?
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

opel70
New Member
Posts: 8
Joined: Sat Sep 26, 2009 5:10 am
Location: Los Angeles

Re: Generic USB IR Remote?

Post by opel70 » Sat Feb 12, 2011 5:54 am

Ok,
Thanks for that tip. I kill and manually ran eventlircd and saw that is was opening default.evmap. So I renamed my file to default.evmap and all is well. After editing a few typos in that file (only found by manually running eventlircd) all of my remote buttons are returning the proper values in irw. Now I just need to make sure my lircrc files are correct.

Thanks again,

Tim
Tim Musa

Post Reply