Kodi Community Forum
[LINUX] HOW-TO get X10 OR22V RF (Radio Frequency) Remote Control to work with LIRC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: [LINUX] HOW-TO get X10 OR22V RF (Radio Frequency) Remote Control to work with LIRC (/showthread.php?tid=57628)

Pages: 1 2 3 4 5


[LINUX] HOW-TO get X10 OR22V RF (Radio Frequency) Remote Control to work with LIRC - funnybox2006 - 2009-09-09

Hello,

i can´t post in HOW-TO section...so i post here.

At first i want to say, that this how-to maybe is obsolete. The User Rico_S get this remote to work on a much easier way. You can try his solution by reading this post: http://forum.xbmc.org/showpost.php?p=479159&postcount=49

Here is my original how-to for people still having problems:

I have bought a very cheap RF Remote from ebay. It´s the X10 OR22V with RF USB Dongle for about 12 Euros include shipping.

Image

I´ve read many threads in Internet about this remote but nobody get the remote to work correctly. So i tried my luck and get it to work. Smile

At first you have to know that the USB RF-receiver is recognized as an ati/mce receiver from Linux Kernel (Ubuntu Jaunty). That is wrong and therefore you have to blacklist the Kernel modules ati_remote and lirc_atiusb.
--------------------------------------------------------------------------------------------------------------------

sudo nano /etc/modprobe.d/blacklist.conf


Append following lines to the file and save it.
Code:
#Set ATI USB RF Receiver Modules to Blacklist for X10 OR22V Remote
blacklist ati_remote
blacklist lirc_atiusb
--------------------------------------------------------------------------------------------------------------------
Now install LIRC:

sudo apt-get install lirc

Select None for Remote and Transmitter during installation!!!
--------------------------------------------------------------------------------------------------------------------
Now we have to edit LIRC´s harware.conf in /etc/lirc/hardware.conf

sudo nano /etc/lirc/hardware.conf

Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="OR22V"
REMOTE_MODULES=""
REMOTE_DRIVER="atilibusb"
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
--------------------------------------------------------------------------------------------------------------------
Finally we have to edit /etc/lirc/lircd.conf

sudo nano /etc/lirc/lircd.conf

Code:
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.8.4a(atilibusb) on Tue Sep  8 23:54:34 2009
#
# contributed by funnybox2006
#
# brand:  X10
# model no. of remote control: OR22V with RF USB Dongle
# devices being controlled by this remote:
# note: use atilibusb driver for this remote and set device in hardware.conf to /dev/lirc0

begin remote

  name        OR22V
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x14
  post_data_bits  16
  post_data      0x0
  gap          139982
  min_repeat      2
  toggle_bit_mask 0x80800000

      begin codes
       KEY_POWER       0xD702
       KEY_RED         0x87B2
       KEY_YELLOW      0x0934
       KEY_GREEN       0x88B3
       KEY_TEXT        0x6B96
       KEY_BLUE        0x0A35
       KEY_BACK        0xF520
       KEY_INFO        0x84AF
       KEY_UP          0xEF1A
       KEY_LEFT        0x729D
       KEY_OK          0xF31E
       KEY_RIGHT       0xF41F
       KEY_DOWN        0x77A2
       KEY_TIMESHIFTING 0x6D98
       KEY_EPG         0x0631
       KEY_DVDMENU     0xD904
       KEY_LIVETV      0x719C
       KEY_VOLUMEUP    0xDE09
       KEY_WINDOWS     0x709B
       KEY_CHANNELUP   0xE00B
       KEY_VOLUMEDOWN  0x5D88
       KEY_CHANNELDOWN 0x618C
       KEY_MUTE        0xD500
       KEY_PREVIOUS    0x76A1
       KEY_NEXT        0xF823
       KEY_REWIND      0x79A4
       KEY_PLAY        0xFA25
       KEY_FASTFORWARD 0x7BA6
       KEY_RECORD      0xFC27
       KEY_STOP        0x7DA8
       KEY_PAUSE       0xFE29
       KEY_1           0x628D
       KEY_2           0xE30E
       KEY_3           0x648F
       KEY_4           0xE510
       KEY_5           0x6691
       KEY_6           0xE712
       KEY_7           0x6893
       KEY_8           0xE914
       KEY_9           0x6A95
       KEY_*           0x8CB7
       KEY_0           0xEC17
       KEY_#           0x0D38
       KEY_CLEAR       0x85B0
       KEY_ENTER       0x0B36
      end codes

end remote
--------------------------------------------------------------------------------------------------------------------
Now all steps are done and you can restart lirc with the following command:

sudo /etc/init.d/lirc restart

Now type:

irw

and then if you press a button on the remote the corresponding button name should be displayed in the terminal.
Now you are able to map buttons to XBMC the usual way.


Sorry for my bad english. Cool

funnybox2206


- funnybox2006 - 2009-09-09

Can an admin please move my thread to HOW-TO section!? Smile


- godsborn - 2009-09-10

Great! It works like a charm. Thanks a lot you saved my day!


- onnan - 2009-09-10

I'm still having problems thought. Irw outputs fine but the button mapping seems to be wrong or none existing. XBMC does not respond to any buttons. What is the usual way to map buttons in xbmc 9.04.1? According to the wiki there should be a folder called .xbmc/userdata/keymaps and .xbmc/system/keymaps in the users home folder. But I can't find any keymaps folder. Any suggestions?


- funnybox2006 - 2009-09-10

onnan Wrote:I'm still having problems thought. Irw outputs fine but the button mapping seems to be wrong or none existing. XBMC does not respond to any buttons. What is the usual way to map buttons in xbmc 9.04.1? According to the wiki there should be a folder called .xbmc/userdata/keymaps and .xbmc/system/keymaps in the users home folder. But I can't find any keymaps folder. Any suggestions?

Yes,

you have to edit/create the files Lircmap.xml and Keymap.xml in
~/.xbmc/userdata
In future versions of XBMC the Keymaps.xml is located in a seperate folder. But for now you can put bot XML files in ~/.xbmc/userdata

Here is my Lircmap.xml
Code:
<lircmap>
  <remote device="OR22V">
    <obc1>KEY_POWER</obc1>
    <obc2>KEY_RED</obc2>
    <obc3>KEY_YELLOW</obc3>
    <obc4>KEY_GREEN</obc4>
    <obc5>KEY_TEXT</obc5>
    <obc6>KEY_BLUE</obc6>
    <obc7>KEY_BACK</obc7>
    <obc8>KEY_INFO</obc8>
    <obc9>KEY_UP</obc9>
    <obc10>KEY_LEFT</obc10>
    <obc11>KEY_OK</obc11>
    <obc12>KEY_RIGHT</obc12>
    <obc13>KEY_DOWN</obc13>
    <obc14>KEY_TIMESHIFTING</obc14>
    <obc15>KEY_DVDMENU</obc15>
    <obc16>KEY_EPG</obc16>
    <obc17>KEY_LIVETV</obc17>
    <obc18>KEY_VOLUMEUP</obc18>
    <obc19>KEY_VOLUMEDOWN</obc19>
    <obc20>KEY_WINDOWS</obc20>
    <obc21>KEY_CHANNELUP</obc21>
    <obc22>KEY_CHANNELDOWN</obc22>
    <obc23>KEY_MUTE</obc23>
    <obc24>KEY_PREVIOUS</obc24>
    <obc25>KEY_NEXT</obc25>
    <obc26>KEY_RECORD</obc26>
    <obc27>KEY_PAUSE</obc27>
    <obc28>KEY_STOP</obc28>
    <obc29>KEY_REWIND</obc29>
    <obc30>KEY_PLAY</obc30>
    <obc31>KEY_FASTFORWARD</obc31>
    <obc32>KEY_CLEAR</obc32>
    <obc33>KEY_ENTER</obc33>
  </remote>
</lircmap>

Now you can map these buttons (e.g.: obc11) to XBMC actions in Keymap.xml. Please use <universalremote> tags in Keymap.xml instead of <remote> tags!


- onnan - 2009-09-11

Thanks! I'll try it out tonight.


- onnan - 2009-09-11

I tried to get my Keymap.xml working but to no avail. Could you maybe attach your Keymap.xml for reference? Would help a lot!


- funnybox2006 - 2009-09-11

onnan Wrote:I tried to get my Keymap.xml working but to no avail. Could you maybe attach your Keymap.xml for reference? Would help a lot!

No, because it´s too long to post here. But you can give me your e-mail address and then i can send it to you!


- onnan - 2009-09-11

Okey, great! I've sent you my email address as a personal message in the forum.


- noother - 2009-09-13

I Just installed xbmc on an Zotac ION ITX A 300 following this guide: http://www.xbmc.org/forum/showthread.php?t=38804. (Minimal HTPC using Ubuntu 9.04 Jaunty Jackalope and XBMC)

I am now trying to install an X10 OR22V RF Remote by using your guide but I can't get it to work.

irw produces no output and when i run irrecord i get the following error message:
irrecord: coould not get file information for /dev/lirc
irrecord: default_init(): No such file or firectory
irrecord: could not init hardware (lirc running ? --> close it, check permissions)


Any ideas?


- funnybox2006 - 2009-09-13

noother Wrote:I Just installed xbmc on an Zotac ION ITX A 300 following this guide: http://www.xbmc.org/forum/showthread.php?t=38804. (Minimal HTPC using Ubuntu 9.04 Jaunty Jackalope and XBMC)

I am now trying to install an X10 OR22V RF Remote by using your guide but I can't get it to work.

irw produces no output and when i run irrecord i get the following error message:
irrecord: coould not get file information for /dev/lirc
irrecord: default_init(): No such file or firectory
irrecord: could not init hardware (lirc running ? --> close it, check permissions)


Any ideas?

It works definetely. Many others who followed this guide get it to work. At first please post the output of lsusb and lsmod. And please check that your hardware.conf and lircd.conf is exactly the same as in the guide.


- noother - 2009-09-13

I'm sure it works but unfortunately I don't speak Linux Oo (windows user)

The two files are identical!

lsusb
Code:
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0bc7:0006 X10 Wireless Technology, Inc. Wireless Transceiver (ACPI-compliant)
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lsmod
Code:
Module                  Size  Used by
input_polldev          11912  0
video                  25360  0
output                 11008  1 video
lp                     17156  0
parport                42220  1 lp
arc4                    9856  2
ecb                    10752  2
snd_hda_intel         434100  3
snd_pcm_oss            46336  0
snd_mixer_oss          22656  1 snd_pcm_oss
snd_pcm                83076  3 snd_hda_intel,snd_pcm_oss
snd_seq_dummy          10756  0
snd_seq_oss            37760  0
snd_seq_midi           14336  0
snd_rawmidi            29696  1 snd_seq_midi
snd_seq_midi_event     15104  2 snd_seq_oss,snd_seq_midi
ath9k                 280760  0
snd_seq                56880  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              29704  3 snd_pcm,snd_seq
mac80211              217592  1 ath9k
snd_seq_device         14988  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
nvidia               9594760  36
agpgart                42696  1 nvidia
cfg80211               38288  1 mac80211
snd                    62756  13 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
shpchp                 40212  0
soundcore              15200  1 snd
pcspkr                 10496  0
snd_page_alloc         16904  2 snd_hda_intel,snd_pcm
led_class              12036  1 ath9k
lirc_mceusb2           20996  0
lirc_dev               19892  1 lirc_mceusb2
forcedeth              61712  0
fbcon                  46112  0
tileblit               10752  1 fbcon
font                   16384  1 fbcon
bitblit                13824  1 fbcon
softcursor              9984  1 bitblit

I tried this with no success: http://ubuntuforums.org/showthread.php?t=887966&highlight=lirc

Thank you for your time!


- funnybox2006 - 2009-09-14

In your lsmod you can see, that mceusb2 module is loaded. That is the problem. Please post your /etc/modprobe.d/blacklist.conf Wink


- noother - 2009-09-14

My blacklist.conf. I tried sudo rmmod lirc_mceusb2 but that did nothing good Smile

Code:
# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac

# MCE Remote
blacklist ati_remote
blacklist lirc_atiusb



- funnybox2006 - 2009-09-14

noother Wrote:My blacklist.conf. I tried sudo rmmod lirc_mceusb2 but that did nothing good Smile

Mhmmm curious - all things seem to be ok...i have no more idea. Don´t know why the appropriate module is not loaded... Sad