Kodi Community Forum

Full Version: XBMC Live problem with keyconfig + remote
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I've got 2 annoying problems right now that I'm not able to solve. After looking around in the forum, nothing has worked so far. I've got an Acer Revo 3610 and it's updated to Darma latest Live release installed on it. Let's start with the first one:

1. The remote
I just bought a MCE remote "AVS Gear HA-IR01SV". I read from this page:
http://wiki.xbmc.org/index.php?title=Rem...ol_Reviews
that it should work "out of the box". It does not in my case.

So, when I plug it into my win7 computer, the light stays off and only flashes when I press a button. On my Live version, the light stays red all the time. (Should probably behave the same I imagine)

I did a "lsusb"
Code:
~$ lsusb
Bus 002 Device 004: ID 04f2:0402 Chicony Electronics Co., Ltd
[b]Bus 002 Device 003: ID 1784:0011 TopSeed Technology Corp.[/b] <-- this one seems to be the IR module detected.
Bus 002 Device 002: ID 046d:c058 Logitech, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 1058:1110 Western Digital Technologies, Inc.
Bus 001 Device 004: ID 1058:1111 Western Digital Technologies, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Maybe the "TopSeed Technology Corp" is not included in some lircd config files?

I also tried to reconfigure it:
Code:
~$ sudo dpkg-reconfigure lirc

~$ tail /var/log/syslog
Dec 23 20:17:48 XBMCLive kernel: [ 1524.368056] usb 2-4: new full speed USB device using ohci_hcd and address 5
Dec 23 20:17:48 XBMCLive kernel: [ 1524.581571] usb 2-4: configuration #1 chosen from 1 choice
Dec 23 20:20:21 XBMCLive lircd-0.8.6[1869]: caught signal
Dec 23 20:20:21 XBMCLive kernel: [ 1677.955666] usbcore: deregistering interface driver lirc_mceusb
Dec 23 20:20:25 XBMCLive kernel: [ 1681.473792] lirc_dev: IR Remote Control driver registered, major 61
Dec 23 20:20:25 XBMCLive kernel: [ 1681.482718] lirc_mceusb: Windows Media Center Edition USB IR Transceiver driver for LIRC 1.90
Dec 23 20:20:25 XBMCLive kernel: [ 1681.482728] lirc_mceusb: Daniel Melander <[email protected]>, Martin Blatter <[email protected]>, Dan Conti <[email protected]>
Dec 23 20:20:25 XBMCLive kernel: [ 1681.482810] usbcore: registered new interface driver lirc_mceusb
Dec 23 20:20:25 XBMCLive lircd-0.8.6[2116]: lircd(default) ready, using /var/run/lirc/lircd
And it doesn't do much.

I also checked if the IR receiver was detected:
Code:
~$ dmesg | grep -i usb

[ 1681.482718] lirc_mceusb: Windows Media Center Edition USB IR Transceiver driver for LIRC 1.90

~$ lircd -v
lircd 0.8.6

So, if someone has some other tips. I would be happy to try.

--- EDIT ---

after reading the help of lircd, I just found out that there is a verbose mode. So, it seems that the kernel module isn't loading. I have no idea what it means...
Code:
sudo /etc/init.d/lirc restart verbose
* Stopping remote control daemon(s): LIRC                               [ OK ]
* Loading LIRC modules                                                  [ OK ]
* Unable to load LIRC kernel modules. Verify your
* selected kernel modules in /etc/lirc/hardware.conf

--- EDIT #2 ---
It seems like that the device:
/dev/lirc0
is not listed. That's probably why LIRC isn't working properly. Any idea? Stopping for tonight investigating this annoying problem.


2. The Key configs
I don't know if it has anything to do with the first one, but I've been trying to setup some key on my keyboard and it doesn't work.

I've followed this:
http://wiki.xbmc.org/index.php?title=Keymap.xml
and it looks like my xml file is completely ignored.
Code:
~/.xbmc/userdata/keymaps/keyboard.xml

I've tried to change the global one as well, and it's the same thing, ignore...


Thanks in advance.
it looks like the problem has something to do with lirc0

after reconfiguring, if you wait 10sec before checking the log, you'll see that it's failing to initialize

Dec 24 18:54:16 XBMCLive lircd-0.8.6[3989]: lircd(default) ready, using /var/run/lirc/lircd
Dec 24 18:54:23 XBMCLive lircd-0.8.6[3989]: accepted new client on /var/run/lirc/lircd
Dec 24 18:54:23 XBMCLive lircd-0.8.6[3989]: could not get file information for /dev/lirc0
Dec 24 18:54:23 XBMCLive lircd-0.8.6[3989]: default_init(): No such file or directory
Dec 24 18:54:23 XBMCLive lircd-0.8.6[3989]: Failed to initialize hardware

only reason i bought this was because someone said it works out of the box, i've spent like 6hrs trying to get this to work!
I'm still trying to figure this out. I've re-installed lirc (to the latest release which is the same I had) and it still do the same: nothing. So, I think, the next step I will try is either re-install xbmc (which I doubt that it's going to fix the problem) or get the latest lirc trunk and test it. The IR is detected, so the only thing that could happen is that the drivers are not compatible. That's probably why we receive this log:
Dec 24 18:54:23 XBMCLive lircd-0.8.6[3989]: Failed to initialize hardware

But what is weird is that even when I use the "irw" command, nothing happen.
I had a very similar problem with the Rosewill RC-127 remote. Seems like our remotes use the same IR receiver, as my lsusb also has:

Bus 002 Device 003: ID 1784:0011 TopSeed Technology Corp.

When I installed Ubuntu 10.10 Desktop and ran xbmc off that, the remote worked perfectly, right out of the box. But once I formatted and went with an XBMC Live build, I had the exact problem you've got. A remote button push caused the led on the receiver to light up (and stay on), with IRW showing no activity.

I was able to solve the problem with help from this thread: http://forum.xbmc.org/showthread.php?tid=84281

Specifically, the thread pointed me to instructions for adding a device to the LIRC source code. https://help.ubuntu.com/community/Instal...%20remotes

I went through steps 1-5 there to get the TopSeed entry added. On my system, the directory structure was slightly different and the file to be edited was lirc_mceusb.c rather than lirc_mceusb2.c. But steps were essentially the same.

Once I had the entry added to that file, I removed and rebuilt LIRC (again following instructions in that thread):

Code:
sudo dkms remove -m lirc -v 0.8.6 --all
sudo dkms add -m lirc -v 0.8.6
sudo dkms -m lirc -v 0.8.6 build
sudo dkms -m lirc -v 0.8.6 install

You're then supposed to:

Code:
sudo rmmod lirc_mceusb
sudo rmmod lirc_dev
sudo modprobe lirc_mceusb
sudo modprobe lirc_dev
sudo /etc/init.d/lirc restart

Apparently the rmmod commands work for some people right away, but I kept getting an error. I don't 100% remember how I solved that, but I think I just had to reboot and then those commands worked.

Once that was done, all my button presses were showing up when I ran IRW. Tested in XBMC - everything is good. Hope the same works for you.
Wow, it worked right away after doing all that. Thanks a lot for the information.

You just saved me a lot of trouble Smile


Now I just need to understand why my key config is totally ignored.
angedelamort Wrote:2. The Key configs
I don't know if it has anything to do with the first one, but I've been trying to setup some key on my keyboard and it doesn't work.

I've followed this:
http://wiki.xbmc.org/index.php?title=Keymap.xml
and it looks like my xml file is completely ignored.
Code:
~/.xbmc/userdata/keymaps/keyboard.xml

I've tried to change the global one as well, and it's the same thing, ignore...


Thanks in advance.

I'm not super familiar with that process, but just to confirm - pretty sure the filename should be keymap.xml, rather than keyboard.xml. Not sure if that was just a typo in your post...
It's not a typo. From the wiki:

Quote:All *.xml files in these folders are applied as keymaps. Keymaps defined in user folders add to or override mappings in the global keymap.

Since it's the only file, I suppose it's the only one that can override. I will try to rename it, but I remember doing something like that and it didn't work.
Hi,

I altered the /usr/src/lirc-0.8.6/drivers/lirc_mceusb/mceusb.c

lsusb gives me:

xbmc@XBMCLive:~$ lsusb
Bus 005 Device 002: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 6253:0100 TwinHan Technology Co., Ltd Ir reciver f. remote control
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


The twinhan is my remote controller so I added two lines in

/usr/src/lirc-0.8.6/drivers/lirc_mceusb/lirc_mceusb.c


#define VENDOR_NORTHSTAR 0x04eb
#define Vendor_TwinHan 0x6253

{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) },
/* TwinHan From DVB-C */
{ USB_DEVICE(VENDOR_TwinHan, 0x0100) },
/* Terminating entry */

{ }
};

but when I do the build thing I get this


xbmc@XBMCLive:~$ sudo dkms -m lirc -v 0.8.6 build

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-26-generic dkms KSRC=/lib/modules/2.6.32-26-generic/bu ild KVER=2.6.32-26-generic.............(bad exit status: 2)

Error! Bad return status for module build on kernel: 2.6.32-26-generic (i686)
Consult the make.log in the build directory
/var/lib/dkms/lirc/0.8.6/build/ for more information.
0
0


Following is a extract of the make.log


/var/lib/dkms/lirc/0.8.6/build/drivers/lirc_mceusb/lirc_mceusb.c:226: error: ‘VENDOR_TwinHan’ undeclared here (not in a function)
make[4]: *** [/var/lib/dkms/lirc/0.8.6/build/drivers/lirc_mceusb/lirc_mceusb.o] Error 1
make[3]: *** [_module_/var/lib/dkms/lirc/0.8.6/build/drivers/lirc_mceusb] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.32-26-generic'
make[2]: *** [lirc_mceusb.o] Error 2
make[2]: Leaving directory `/var/lib/dkms/lirc/0.8.6/build/drivers/lirc_mceusb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/dkms/lirc/0.8.6/build/drivers'
make: *** [mceusb] Error 2

So apparently I still have to declare the Twinhan card


Does anybody have a Idea?

thanks in advance
Guy Forssman
It seems to be a compile error because the vendor doesn't exists.

Code:
Bus 004 Device 002: ID 6253:0100 TwinHan Technology Co., Ltd Ir reciver f. remote control
ID = VENDOR : DEVICE

So, at the beginning of the file with all other vendor defines, add the following:

Code:
#define VENDOR_TWINHAN 0x6253

and where you did your code, just be sure that it's the same name you have defined (it's case sensitive)
Code:
{ USB_DEVICE(VENDOR_TWINHAN, 0x0100) },

I think it should make things work.
angedelamort Wrote:It seems to be a compile error because the vendor doesn't exists.

Code:
Bus 004 Device 002: ID 6253:0100 TwinHan Technology Co., Ltd Ir reciver f. remote control
ID = VENDOR : DEVICE

So, at the beginning of the file with all other vendor defines, add the following:

Code:
#define VENDOR_TWINHAN 0x6253

and where you did your code, just be sure that it's the same name you have defined (it's case sensitive)
Code:
{ USB_DEVICE(VENDOR_TWINHAN, 0x0100) },

I think it should make things work.



Indeed it's case sensitive it's getting late perhaps some sleep will help.

Anyway the sudo dkms -m lirc -v 0.8.6 build went fine....



the mceusb module loads fine ....


but how can I know learn the keys from my remote?
to know the key ids, you can use:

Code:
sudo irw

http://www.lirc.org/html/irw.html

After that, you'll need to adjust the keys in the keyconfig.

---

For my keyconfig problem. Anyone know where the default keys are defined? or is it compiled in the binaries?
irw nor mode2 responds

the strange thing is that xbmc itself reacts to the volume button but that's the only button.
hi,

I didn't have any luck with the stock xbmc 10.0 which is based on ubuntu 10.04

around these time Lirc is changing a lot and moving into the kernel as was mentioned http://wilsonet.com/?page_id=95

So I installed http://www.xbmcfreak.nl/xbmcfreak-livecd...verick-v1/

Here you have the kernel 2.6.35 where a lot of the infrared drivers are included...

For this xbmc you'll have to use unetinboot make sure you're usb stick is in FAT32
I have it running on 2 pc's The ASrock ion 330 with mceusb remote
and a ShuttleXS35 with this remote http://www.doctort.org/adam/general/upda...u-810.html

On the shuttle the network wasn't found at install thats okay ...
just do

sudo nano /etc/network/interfaces and add the following

auto eth0
iface eth0 inet dhcp

save the file and continue with

sudo /etc/init.d/networking restart

Where on a ubuntu 10.10 frame so alot have changed regarding infrared
Have a look at for a detailed explanation
http://wilsonet.com/?page_id=95

DON'T install the lirc-modules which I was used to install by habbit

Issue the following cat /proc/bus/input/devices
You'll get something like:
xbmc@XBMCLive:~$ cat /proc/bus/input/devices

I: Bus=0003 Vendor=6253 Product=0100 Version=0110
N: Name=”Twinhan Tech Remote Control”
P: Phys=usb-0000:00:1d.2-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/input/input5
U: Uniq=1111111
H: Handlers=kbd event5
B: EV=20013
B: KEY=3ff 0 0 0 10c0810 803410 0 0 0 0 80048000 180 80000001 8e0000 0 0 8000
B: MSC=10
B: LED=1f

You'll probably get more entry's but I know my remote is a TwinHan wich was included with my DVB-C

Look carefully the following line
S: Sysfs=/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/input/input5

My system needed dialog so
sudo apt-get install dialog

Now enter the following:
sudo dpkg-reconfigure lirc
CHOOSE the Linux input layer even if you now the brand and are used to choose let's say Windows Microsoft ...!!!!!

Linux input layer (/dev/input/eventX)
then choose none
then I had to choose /dev/input/by-path/pci-0000:00:1d.2-usb-0.1.1.0-event remember the cat /proc/bus/input/devices

If you enter irw now you could see the following

0000000080010205 00 KEY_NUMERIC_5 devinput
If that's the case you entered the button 5 on the exact same remote as I have here.
Anyway similar output shows you're on the right pad.
You're remote is know by the system you just have to translate the buttons to xbmc...

Kind Regards Forsskieken

http://ubuntuforums.org/showthread.php?t=1593122 is wat put me on the right track
rbrohman Wrote:I had a very similar problem with the Rosewill RC-127 remote. Seems like our remotes use the same IR receiver, as my lsusb also has:

Bus 002 Device 003: ID 1784:0011 TopSeed Technology Corp.

When I installed Ubuntu 10.10 Desktop and ran xbmc off that, the remote worked perfectly, right out of the box. But once I formatted and went with an XBMC Live build, I had the exact problem you've got. A remote button push caused the led on the receiver to light up (and stay on), with IRW showing no activity.

I was able to solve the problem with help from this thread: http://forum.xbmc.org/showthread.php?tid=84281

Specifically, the thread pointed me to instructions for adding a device to the LIRC source code. https://help.ubuntu.com/community/Instal...%20remotes

I went through steps 1-5 there to get the TopSeed entry added. On my system, the directory structure was slightly different and the file to be edited was lirc_mceusb.c rather than lirc_mceusb2.c. But steps were essentially the same.

Once I had the entry added to that file, I removed and rebuilt LIRC (again following instructions in that thread):

Code:
sudo dkms remove -m lirc -v 0.8.6 --all
sudo dkms add -m lirc -v 0.8.6
sudo dkms -m lirc -v 0.8.6 build
sudo dkms -m lirc -v 0.8.6 install

You're then supposed to:

Code:
sudo rmmod lirc_mceusb
sudo rmmod lirc_dev
sudo modprobe lirc_mceusb
sudo modprobe lirc_dev
sudo /etc/init.d/lirc restart

Apparently the rmmod commands work for some people right away, but I kept getting an error. I don't 100% remember how I solved that, but I think I just had to reboot and then those commands worked.

Once that was done, all my button presses were showing up when I ran IRW. Tested in XBMC - everything is good. Hope the same works for you.

rbrohman, you are the man!!!!!!!! I am soooo happy now!!!!