# Infrared remote commands not recognized (Solved)

## shx

Hello, I am at a loss trying to make a remote working for a HTPC.

Here what I have done;

emerge lirc inputlircd

inserting the receiver

lsusb

```

Bus 003 Device 003: ID 147a:e042 Formosa Industrial Computing, Inc. 

```

dmesg

```
> [ 2584.808063] usb 3-6: new full-speed USB device number 3 using ohci_hcd

> [ 2585.010134] usb 3-6: New USB device found, idVendor=147a, idProduct=e042

> [ 2585.010141] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3

> [ 2585.010147] usb 3-6: Product: eHome Infrared Transceiver

> [ 2585.010151] usb 3-6: Manufacturer: Formosa21

> [ 2585.010154] usb 3-6: SerialNumber: 00107400

> [ 2585.019071] Registered IR keymap rc-rc6-mce

> [ 2585.019228] input: Media Center Ed. eHome Infrared Remote Transceiver (147a:e042) as /devices/pci0000:00/0000:00:02.0/usb3/3-6/3-6:1.0/rc/rc0/input10

> [ 2585.019300] rc0: Media Center Ed. eHome Infrared Remote Transceiver (147a:e042) as /devices/pci0000:00/0000:00:02.0/usb3/3-6/3-6:1.0/rc/rc0

> [ 2585.019436] input: MCE IR Keyboard/Mouse (mceusb) as /devices/virtual/input/input11

> [ 2585.019591] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0

> [ 2585.162683] mceusb 3-6:1.0: Registered Formosa21 eHome Infrared Transceiver with mce emulator interface version 2

> [ 2585.162691] mceusb 3-6:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x0 active)

> [ 2595.171073] generic-usb 0003:147A:E042.0004: timeout initializing reports

> [ 2595.171244] generic-usb 0003:147A:E042.0004: hiddev0,hidraw3: USB HID v1.00 Device [Formosa21 eHome Infrared Transceiver] on usb-0000:00:02.0-6/input1

```

lsmod

 *Quote:*   

> 
> 
> rc_core                11023  9 mceusb,rc_rc6_mce,ir_lirc_codec,ir_mce_kbd_decoder,ir_sony_decoder,ir_jvc_decoder,ir_rc5_decoder,ir_nec_decoder,ir_rc6_decoder
> 
> rc_core                11023  10 mceusb,rc_rc6_mce,ir_lirc_codec,ir_mce_kbd_decoder,ir_sony_decoder,ir_jvc_decoder,ir_rc5_decoder,ir_nec_decoder,ir_rc6_decoder
> ...

 

evtest

```

/dev/input/event10:   Media Center Ed. eHome Infrared Remote Transceiver (147a:e042)

/dev/input/event11:   MCE IR Keyboard/Mouse (mceusb)

```

If I select event 10, and try a remote (three different models), I have something like

```
Event: time 1331205125.047081, type 4 (EV_MSC), code 4 (MSC_SCAN), value 10

Event: time 1331205125.047082, -------------- SYN_REPORT ------------

Event: time 1331205127.241743, type 4 (EV_MSC), code 4 (MSC_SCAN), value 05

```

With different values depending on the key pressed or the type of remote

If I try irrecord -d /dev/input/event10 /tmp/remote, I can create a file with keys definition. I have try this file and the file for devinput and the file corresponding to one of my remote as /etc/lirc/lircd.conf

In every case, irw /dev/lircd gives me nothing, the program just wait and other device like event10 or event11 give me 'connection refused'.

Unfortunaly, I have only one receiver, but as the system is able to read the keys value, I suppose it is a configuration problem, 

Copy of /etc/conf.d/inputlircd

```

INPUTLIRCD_OPTS="/dev/input/event10"

```

Can you confirm that I should NOT started lirc and that /etc/conf.d/lirc can be let empty (only commented out parameters

Thank you for any input you may have

PhilippeLast edited by shx on Sat Mar 10, 2012 3:20 pm; edited 1 time in total

----------

## depontius

I'm not doing it your way.  My /etc/conf.d/lircd contains effectively 1 line:

```
LIRCD_OPTS="-H devinput -d /dev/input/by-id/usb-Topseed_Technology_Corp._eHome_Infrared_Transceiver_TS000JH6-event-if00"
```

----------

## shx

 *depontius wrote:*   

> I'm not doing it your way. 

 

I am ready to make it anyway that works   :Razz: 

I try that without success, I also tried to make an udev rule to create an /dev/input/remote0 device and link to that one iso directly to the by-id one. No luck,

Thank you anyway

----------

## Hu

Based on the dmesg output, this might be a remote that misreports itself as a keyboard+mouse.  If so, all the IR processing is being done in the token you wired to the case, meaning that LIRC cannot get access to the raw IR data.  I have no experience with this model, so I might be wrong, but the line input: MCE IR Keyboard/Mouse is suspicious to me.

----------

## depontius

Now that you mention it, I bought another remote/receiver a month or two back, and pretty carefully researched the reviews on Amazon before doing so.  One common theme I saw for several remotes was that by the time they were plugged in and running, they weren't really remotes - they were keyboard/mouse combinations.  One of the remotes stated that explicitly, and on the photographs had a picture of the button->keypress mapping table.

I would think that for a remote of this kind, you don't even need LIRC.  Using the remote should be just like pressing the buttons.  The job left is to remap MythTV's keymapping so that it uses the remote keypresses to do as you wish.  Unfortunately that also remaps the regular keyboard at the same time.  One mitigating factor is that each client gets its own keymapping, so if you have a client that's driven mostly by the remote, its keys can be remapped that way without affecting other clients.

Another issue would be suspend/resume.  Obviously you can set the system to resume on keypress, and only enable the remote device.  Unfortunately then it will resume on any keypress, not just the power button.  I'm not sure how to make it suspend, though.  MythTV will get all keypresses, and if it's possible to map a keypress to an external script, that could do the job.  If it's possible to snoop keypresses on their way to MythTV, that could do it, also.

----------

## shx

Ok, working now,

Thanks Hu, part of the mistake was to believe that because mceusb is now in the kernel that you should use the event way instead of basic lirc and some kernel issue (module iso in kernel)

I found this guide, that solved it 

http://forum.xbmc.org/showthread.php?p=995504

So in summary if someone with the same receiver came here.

ID 147a:e042 Formosa Industrial Computing, Inc.   aka ir606

----------------------

1. install kernel sources

2. patch the mceusb.c file

```

--- linux-3.2.2.orig/drivers/media/rc/mceusb.c 2012-01-30 23:37:12.374473509 +0100

+++ linux-3.2.2/drivers/media/rc/mceusb.c 2012-01-30 23:40:57.989652931 +0100

@@ -350,6 +350,8 @@

  { USB_DEVICE(VENDOR_FORMOSA, 0xe015) },

  /* Formosa21 / eHome Infrared Receiver */

  { USB_DEVICE(VENDOR_FORMOSA, 0xe016) },

+ /* Formosa21 / eHome Infrared Receiver */

+ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) },

  /* Formosa aim / Trust MCE Infrared Receiver */

  { USB_DEVICE(VENDOR_FORMOSA, 0xe017),

  .driver_info = MCE_GEN2_NO_TX },

```

In order to have the receiver recognized. I expect this won't be needed in the future as the patch will make its way in the bug reporting system.

3. follow http://forum.xbmc.org/showthread.php?p=995504

Pay attention to the kernel configuration for me passing thing inline instead of by module solved the issue.

Use 

```
LDFLAGS_amd64="" emerge -va lirc
```

 in case of compiling error. Bug of lirc 0.9! Again, it probably will be solved with the next ebuild.

4. if the lircd.conf file provided doesn't work, you can find others in /usr/share/lirc/remote or create yours with

```
irrecord /tmp/MyLircd.conf
```

5. Configure wour HTPC

6. Enjoy the movies

Thank to Depontius and Hu for the help

----------

