XBMC Community Forum  

Go Back   XBMC Community Forum > Announcements, Info and General Discussion > XBMC Tips, Tricks, and HOW-TO (Step-by-Step Guides)

XBMC Tips, Tricks, and HOW-TO (Step-by-Step Guides) Tips, Tricks, and HOW-TOs for XBMC (read-only forum).
Users can request their threads/posts to be moved here.

Reply
 
Thread Tools Search this Thread Display Modes
Old 2010-01-28, 01:09   #1
stpfarms
Junior Member
 
Join Date: Oct 2009
Posts: 26
stpfarms is on a distinguished road
Thumbs up [LINUX] HOW-TO to use Antec Veris Basic IR Receiver, Harmony/MCE Remote on Ubuntu

I created the following tutorial for users of Ubuntu/Mythbuntu 9.10 Karmic. None of the tutorials/posts I found worked properly all the way through so I created a step by step guide:

Prerequisites:
Antec Veris Basic installed
Ubuntu 9.10 Karmic
XBMC 9.11
MCE Remote or any Harmony Remote programmed as a MCE Remote

1. The first thing to do is ensure the Antec Veris Basic is recognized by the OS. Type in "lsusb" at the terminal. Take note of the characters following ID for SoundGraph Inc., in this case 15c2:0043:
lsusb

Output:
Bus 003 Device 003: ID 15c2:0043 SoundGraph Inc.
Bus 003 Device 002: ID 045e:0719 Microsoft Corp.
Bus 003 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 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2. We now want to add a UDEV rule to prevent the USBHID driver from loading and taking over the Antec Veris device. We accomplish this by creating a rule in /etc/udev/rules.d/. You can download my rule here:
sudo wget -q http://www.stpit.com/public/99-lirc.rules -O /etc/udev/rules.d/99-lirc.rules
In order to edit the file to ensure the proper Product ID type the following:
sudo nano /etc/udev/rules.d/99-lirc.rules
Add the following:
#Prevent the USBHID driver from loading for the Antec Veris
SYSFS{idVendor}=="15c2", SYSFS{idProduct}=="0043", MODE="0666", PROGRAM="/bin/sh -c 'echo -n $id:1.0 >/sys/bus/usb/drivers/usbhid/unbind;\
echo -n $id:1.1 >/sys/bus/usb/drivers/usbhid/unbind'"
*note - the idVendor and idProduct is pulled from Step One. In my case the idProduct was 0043 but yours may be different depending on the revision of the Antec Veris you purchased.

3. Reboot your machine:
sudo reboot

4. *Optional - We can now check to see if the Antec Veris is loaded without a driver associated with it. This step is optional.
sudo mount -t usbfs none /proc/bus/usb
sudo cat /proc/bus/usb/devices

Output:
T: Bus=03 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15c2 ProdID=0043 Rev= 0.02
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

5. Now it is time to install LIRC. Since you are using Ubuntu 9.10 Karmic, the software repository includes the latest 0.8.6 version of LIRC.
sudo apt-get install lirc

6. You will be presented with a choice for remote control, simply choose "Soundgraph iMON Antec Veris" and for IR Transmitter choose "None". This will set up your /etc/lirc/hardware.conf file to load the lirc_imon driver for the Antec Virus.

7. *Optional - We can now check to see if the Antec Veris is loaded with the lirc_imon driver. This step is optional.
sudo mount -t usbfs none /proc/bus/usb
sudo cat /proc/bus/usb/devices

Output:
T: Bus=03 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15c2 ProdID=0043 Rev= 0.02
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=(lirc_imon)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(lirc_imon)
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

8. We will now tell the lirc_imon driver to use the MCE codes instead of the RMA100 codes. You can download my conf file by using the following:
sudo wget -q http://www.stpit.com/public/lirc_imon.conf -O /etc/modprobe.d/lirc_imon.conf
You can view the lirc_imon.conf file:
cat /etc/modprobe.d/lirc_imon.conf
Output:
options lirc_imon ir_protocol=1
9. We now want to change the driver to load the MCE compatible configuration. We will do this by changing a line in /etc/lirc/hardware.conf and /etc/lirc/lircd.conf. You will want to change "lircd.conf.imon-antec-veris" with "lircd.conf.imon-mceusb" You can do this by typing in the following in terminal:
sudo nano /etc/lirc/hardware.conf
Change: REMOTE_LIRCD_CONF="imon/lircd.conf.imon-antec-veris" to REMOTE_LIRCD_CONF="imon/lircd.conf.imon-mceusb"
sudo nano /etc/lirc/lircd.conf
Change: include "/usr/share/lirc/remotes/imon/lircd.conf.imon-antec-veris" to include "/usr/share/lirc/remotes/imon/lircd.conf.imon-mceusb"

*note: we could also simply overwrite the lircd.conf.imon-antec-veris with lircd.conf.imon-mceusb but you may want to use the imon-antec-veris settings at a later time.

10. We now want to restart LIRC:
sudo /etc/init.d/lirc restart

11. Now we can test the MCE remote control to ensure the system is recognizing your remote control commands. We will load IRW and press buttons on our MCE remote. The terminal should output the buttons that you press.
sudo irw

Output:
0200005100000000 00 KEY_DOWN MCE_via_iMON
0200005100000000 01 KEY_DOWN MCE_via_iMON
0200004f00000000 00 KEY_RIGHT MCE_via_iMON
0200004f00000000 01 KEY_RIGHT MCE_via_iMON
0200005000000000 00 KEY_LEFT MCE_via_iMON
0200005000000000 01 KEY_LEFT MCE_via_iMON
0200002800000000 00 #KEY_OK MCE_via_iMON
0200002800000000 01 #KEY_OK MCE_via_iMON

12. Now that the MCE remote is working properly we need to have XBMC pick up these commands. We accomplish by creating a Lircmap.xml file in ~/xbmc/userdata. I have created a Lircmap.xml file that you can use. Type the following at the terminal:
sudo wget -q http://www.stpit.com/public/Lircmap.xml -O ~/.xbmc/userdata/Lircmap.xml

13. Start XBMC and you should be able to remote control XBMC with your Harmony or MCE remote. Currently for some reason on my system I have to issue a sudo /etc/init.d/lirc restart on a fresh boot before XBMC starts or the remote will not work. I am trying to track this issue down under this link here: http://forum.xbmc.org/showthread.php?t=68127

Last edited by stpfarms; 2010-01-29 at 16:19.
stpfarms is offline   Reply With Quote
Old 2010-01-29, 06:12   #2
bjs1400
Junior Member
 
Join Date: Jan 2005
Location: Milwaukee, WI, USA
Posts: 4
bjs1400 is on a distinguished road
Default

Great post. I happened to purchase the same hardware and found this post via a quick google search.

Everything above worked great, only to find that the IR receiver, by default, only recognizes remote codes transmitted by the original remote. A simple addition to /etc/modprobe.d/ allows interpretation of MCE remote codes as well. By default it seems that the ir_protocol option is set to 0 which limits the hardware to only interpret the crappy remote that came with the receiver.

Do the following to enable MCE remote codes. Edit /etc/modprobe.d/lirc_imon.conf (create if needed)

Code:
sudo pico -w /etc/modprobe.d/lirc_imon.conf
and add the following.

Code:
options lirc_imon ir_protocol=1
Then reboot.

Code:
sudo reboot
After restarting it should be picking up MCE remote codes. Confirm by running irw.

Code:
irw
Everything else above worked great. Thanks!!
bjs1400 is offline   Reply With Quote
Old 2010-01-29, 16:19   #3
stpfarms
Junior Member
 
Join Date: Oct 2009
Posts: 26
stpfarms is on a distinguished road
Default

Thanks for the update. I completed this step as well but forgot it in the tutorial. I have added it in step 8.
stpfarms is offline   Reply With Quote
Old 2010-01-29, 18:46   #4
batrad
Member
 
Join Date: Jun 2007
Posts: 72
batrad is on a distinguished road
Default

thanks .. will try soon
right now I have 2 IR's in my system
Antec for the ON/OFF (no USB connection) and MCE for XBMC
This will help remove one IR unit from the box and help with the other system I'm making for the Family Room (another Antec Case build..)
batrad is offline   Reply With Quote
Old 2010-03-20, 13:26   #5
xexe
Fan
 
xexe's Avatar
 
Join Date: Sep 2008
Posts: 625
xexe is on a distinguished road
Default

Excellent tips here.

For me though steps 1-7 are complicated and completely bypassed by simply doing a:

dpkg-reconfigure lirc

then selecting the built in settings for your Antec case.

After this simply change the ini files as documented and you have a working mce.

Much simpler on karmic at least.

Does anyone have a clue if the XBOX 360 Universal remote can be used in this way?
__________________
Having problems getting your TV shows recognized?

Try my extra TV show matching REGEX here

Last edited by xexe; 2010-03-20 at 13:30.
xexe is offline   Reply With Quote
Old 2010-03-21, 13:26   #6
shassino
Senior Member
 
Join Date: Mar 2009
Posts: 155
shassino is on a distinguished road
Default

USBHID kernel module issue is solved since kernel 2.6.28, the steps related to that are not needed in karmic (2.6.30).
I have an Antec veris micro fusion (imon 0038) all works well without that.
BTW there is a simplier way to make usbhid ignore a device

# vim /etc/modprobe.d/usbhid
add
options usbhid quirks=0x15c2:0x0043:0x0004
# depmod -ae
# update-initramfs -u

Last edited by shassino; 2010-03-21 at 13:29.
shassino is offline   Reply With Quote
Old 2010-03-21, 13:31   #7
xexe
Fan
 
xexe's Avatar
 
Join Date: Sep 2008
Posts: 625
xexe is on a distinguished road
Default

Also as of Revision 28719 of XBMC I managed to have the Lircmap.xml added (thanks vdrfan) so you no longer need step 12 either

Does anyone know how to make imon work with the xbox 360 IR remote?
__________________
Having problems getting your TV shows recognized?

Try my extra TV show matching REGEX here

Last edited by xexe; 2010-03-21 at 15:09.
xexe is offline   Reply With Quote
Old 2010-03-23, 19:35   #8
stpfarms
Junior Member
 
Join Date: Oct 2009
Posts: 26
stpfarms is on a distinguished road
Default

Yeah I use my XBOX 360 controller and Microsoft IR Receiver via xboxdrv. Download the latest version here:

http://pingus.seul.org/~grumbel/xbox...0.4.10.tar.bz2 and simply extract it to a location (in this instance I extracted it to /home/user/ or ~/)

Modified my /etc/modules:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp

# XBMC addons
uinput
joydev




Modified my /etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

cd /home/user/xboxdrv-linux-0.4.10
./xboxdrv --wid 0 -s -l 2 --dpad-as-button --deadzone 12000 --trigger-as-zaxis
exit 0
stpfarms is offline   Reply With Quote
Old 2010-04-06, 23:40   #9
martinez
Junior Member
 
Join Date: Dec 2008
Posts: 6
martinez is on a distinguished road
Thumbs up

In case this helps anyone else reading this, this instructions helped me solve my issue with another iMon receiver:

Bus 004 Device 002: ID 15c2:003c SoundGraph Inc.

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


Thank you for your post
martinez is offline   Reply With Quote
Reply

Bookmarks

Tags
harmony, how to, how-to, howto, logitech, mce, remote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:17.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2010, XBMC Project