Linux [HOW-TO][XBMCbuntu 12.0][Frodo] XBOX DVD Remote/Dongle
#1
Thumbs Up 
So i just finished updating my Zotac XBMC box (XBMC10.1 - Ubuntu 10.10) to the latest version (XBMC12.0 - Ubuntu Frodo).

Getting the xbox dvd remote working was a pain as always, and the information out there is scattered. I have an old post outlining the process from my last upgrade so i figured i would write one up for this version.

I've parsed information from a lot of posts and mainly from Mr. Plows post in the Ubuntu forums.

I usually start off by creating a folder in my home directory to do all the work in - this makes cleanup easier, all i need to do is delete it when i'm done.

1 - Update VI [Optional]
The default installation comes with the horrible vim-tiny installation, the first thing i did was upgrade vim so i can edit my files in peace. Install vim-nox using the following commands
Code:
sudo apt-get update
sudo apt-get -y install vim-nox

2 - Blacklist xpad & mceusb
Code:
sudo echo blacklist xpad >> /etc/modprobe.d/blacklist
sudo echo blacklist mceusb >> /etc/modprobe.d/blacklist

3 - Get lirc xbox driver patch
Code:
sudo update-initramfs -u
sudo apt-get update
sudo apt-get build-dep lirc
sudo apt-get -y install git dialog automake autoconf libtool
git clone git://lirc.git.sourceforge.net/gitroot/lirc/lirc
wget http://old.nabble.com/attachment/31787507/0/lirc_0.9.1_lirc_xbox_driver.patch

4 - Apply patch and build lirc_xbox driver
Code:
cd lirc/
patch -p1 <../lirc_0.9.1_lirc_xbox_driver.patch
sed -i '/#include <linux\/smp_lock.h>/d' drivers/lirc_xbox/lirc_xbox.c
./autogen.sh
./configure -with-driver=userspace
cd drivers/lirc_xbox/
make
sudo make install

5 - Backup /etc/lirc/hardware.conf and replace with this
Code:
vi /etc/lirc/hardware.conf
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES="lirc_xbox lirc_dev"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="xbox/lircd.conf.xbox"
REMOTE_LIRCD_ARGS="-r"

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
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="lircd.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="true"
START_LIRCMD=""

6 - Backup /etc/lirc/lircd.conf and replace with this
Code:
# brand: Microsoft Xbox DVD Receiever (also works with generic)
# remote control: Xbox remote or any remote using RCA DVD player codes

begin remote

  name  XboxDVDDongle
  bits            8
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  gap          163983
  toggle_bit_mask 0x0

      begin codes
          LEFT                     0xA9
          UP                       0xA6
          RIGHT                    0xA8
          DOWN                     0xA7
          SELECT                   0x0B
          1                        0xCE
          2                        0xCD
          3                        0xCC
          4                        0xCB
          5                        0xCA
          6                        0xC9
          7                        0xC8
          8                        0xC7
          9                        0xC6
          0                        0xCF
          MENU                     0xF7
          DISPLAY                  0xD5
          REWIND                   0xE2
          FFWD                     0xE3
          PLAY                     0xEA
          PAUSE                    0xE6
          STOP                     0xE0
          SKIP-                    0xDD
          SKIP+                    0xDF
          TITLE                    0xE5
          INFO                     0xC3
          BACK                     0xD8
      end codes

end remote

7 - Reboot to apply changes
Code:
sudo shutdown -r now

Your remote should be working now Smile

8 - Verify the new lirc_xbox
Check lsmod, you should see the following output.
Code:
# lsmod | grep lirc
lirc_xbox              17506  0
lirc_dev               18671  4 lirc_xbox

Angel Shameless plea for reputation in my signature
Like my post? please up my reputation, it faced the wrath of X3lectric over this post
[HOW-TO][FRODO] Configure XBOX 360 Wireless Controller
[HOW-TO][Frodo] XBOX DVD Remote/Dongle
Reply
#2
Thanks a lot for this! You saved my good old friend - the original XBOX Remote Dongle - from being replaced with one of those ugly and soulless MCE receivers Wink
Hardware Setup
Acer Revo 3610 // 2GB RAM // 64GB SSD // Harmony 650 w. XBox USB Dongle // Lenovo Wireless Keyboard N5901A // Logitech Cordless RumblePad 2 // Panasonic P42S10E 42" FullHD Plasma // Atmolight
Software Setup
XBMCbuntu 12.2 (Frodo)
Reply
#3
I've just installed Frodo 12.2 on a new Zotac ZBOX with a view to keeping my old Xbox DVD remote (which is currently working on a Camelot install I have on an Acer Revo).

I followed your guide exactly as written but unfortunately, my remote still doesn't work. The only difference I can see (and I don't know if it's relevant, as I no nothing about Ubuntu) is the code you show in STEP 8 has "1 lirc_xbox" instead of "4 lirc_xbox".

Any suggestions as to what the problem might be? Thanks.
Reply
#4
I've just realised that this could be the system not detecting the USB <-> XBOX DVD IR cable I'm using. Am I right in thinking that (again, I know nothing about Ubuntu) issuing LSUSB should give me something which includes the following:

Code:
Bus 002 Device 004: ID 045e:0284 Microsoft Corp. Xbox DVD Playback Kit

I'll give this a try to see if my system is even detecting the DVD playback kit.
Reply
#5
Just ran LSUSB and it confirms that the Xbox DVD Playback Kit is detected.

Any help would be very much appreciated.
Reply
#6
Hi, I am in exactly the same situation as George Stark. I had a fully working MS original XBOX remote & receiver on the previous xbmcbuntu live release, upgraded to "xbmcbuntu-12.2.Intel-NVIDIA" and am getting the same result. Same lsmod/lsusb messages and status. Double checked the actual hardware was still working with a quick Windows install of xbmc with eventghost and the recl0ud driver.

Stuck now and will probably go back to the previous release Sad

Any help or pointers appreciated.
Reply
#7
I ended up accepting defeat on this one. I have next to no Unix knowledge and in the absence of any replies from people who know what they're doing, I just had to give up.

It's not all doom and gloom though. Blush An FLIRC dongle went most of the way to solving this...it's not perfect but I'm at least able to use my trusty Xbox DVD remote. This, combined with the XBMC remote for iOS, means I have total control over my XBMC installation.
Reply
#8
Well I did manage to get it working by installing the 12.00 live CD and everything works ok. However I went to install on another htpc and old.nabble.com has now been retired, and I can't find the patch on the new/current nabble. I'm in the same boat as regards Linux knowledge and am just typing the commands & instructions without really understanding them completely.

I found the same patch on bitbucket, but I'm not sure if I can just substitute the `wget` in the instuctions with this new url?

https://bitbucket.org/durin42/raspbmc-mi...iver.patch
Reply
#9
I had to re-do this after an apt-get dist-upgrade, but it still works fine.

I used:
Code:
./configure --with-driver=xbox

Also, in hardware.conf, only lirc_dev needs to be present, but lircd doesn't seem to care if you have lirc_xbox in there too:
Code:
REMOTE_MODULES="lirc_dev"

Finally, there is no reason to blacklist mceusb. Only the xpad driver seems to interfere with the Xbox DVD dongle. (because it thinks it's a gamepad).

-Wes[/code]
Reply
#10
I've been using this method to install my Xbox IR receiver for a long time now. If I ever need to run a dist-upgrade I reinstall the patched module.

A couple of days ago my received seemed to stop working (strange, I don't remember upgrading the kernel, meh). I tried to rebuild and install the patched module but this time after building and installing I still had no luck. irw shows no output when I run it, and when I try modprobe lirc_xbox I get:

Code:
modprobe: ERROR: could not insert 'lirc_xbox': Invalid argument

and dmesg shows:

Code:
[  175.052488] lirc_xbox: disagrees about version of symbol lirc_register_driver
[  175.052497] lirc_xbox: Unknown symbol lirc_register_driver (err -22)

Here's my uname -a output

Code:
Linux zbox 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Has anyone else had this problem? Is this method no longer compatible with the latest kernel? Is this finally the end for the Xbox IR receiver??
Reply
#11
(2014-11-18, 00:02)japher Wrote:
Code:
modprobe: ERROR: could not insert 'lirc_xbox': Invalid argument

and dmesg shows:

Code:
[  175.052488] lirc_xbox: disagrees about version of symbol lirc_register_driver
[  175.052497] lirc_xbox: Unknown symbol lirc_register_driver (err -22)

Here's my uname -a output

Code:
Linux zbox 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Has anyone else had this problem? Is this method no longer compatible with the latest kernel? Is this finally the end for the Xbox IR receiver??

yes i have had this, and working on submitting a patch to the V4L media bundle, if we can get the patch included in this bundle it should live on..

you can try http://ubuntuforums.org/showthread.php?t=1743470&page=7

I have not gone any further other than getting the driver to load and register correctly.
Reply
#12
A quick update for those of you having the errors with this remote on newer versions of ubuntu (14.04 here)

After lots of fiddling i had it working in 14.04 with kernel 3.13.0-39, but upgraded my kernel to 3.13.0-43 and it broke again and i couldnt remember what i did the first time, so here goes

follow the normal instructions to build the modules:

git clone -b "lirc-0.9.0-branch" git://git.code.sf.net/p/lirc/git lirc
wget ****lirc_0.9.1_lirc_xbox_driver.patch (you'll have to google for this file, the original link is down)
cd lirc/
patch -p1 <../lirc_0.9.1_lirc_xbox_driver.patch
nano drivers/lirc_xbox/lirc_xbox.c
remove the line #include <linux/smp_lock.h>

./autogen.sh
./configure --with-driver=xbox
make
make install

edit hardware.conf to use lirc_xbox as the remote module.

If you've already downloaded and patched the source, and are just upgrading kernel, i think you only need to re-run the lower section from autogen onwards

At this point, the module was built, but it wouldnt load, giving the symbol missmatch errors that are mentioned around the place. Many of the forum links suggest that folk have given up at this point assuming it simply wont work with the newer kernels in 14.04, but i knew i had it working before so i kept at it.

After some poking around and much cursing, i realised the lirc_dev compiled in the steps above wasnt being loaded. Instead the kernel was loading a lirc_dev that comes with the kernel, located in /lib/modules/3.13.0-43-generic/kernel/drivers/media/rc/lirc_dev.ko rather than the compiled version which is located in /lib/modules/3.13.0-43-generic/misc/ beside the xbox driver.

So i deleted the kernel version, and copied the compiled one into that path above to replace the supplied one, rebooted and bingo, both modules loaded right up!

Hope that helps some folk struggling with this in the future.
Reply
#13
Thanks aragorn, this worked great for me to reinstate my XBOX DVD Dongle following a Ubuntu 14.04 LTS + Kodi install.

One tweak which is "sudo make install".

Also, I couldn't get hold of lirc-0.9.0-branch via git, but I had a copy from before so was lucky!

Thanks again.
Reply
#14
@aragorn

You nailed it. Why the hell there is a vesion coming with the kernel? Is there any way to remove that for good and prevent having to go through this every kernel update? maybe a DKMS version of the xbox module...
Reply
#15
Heh!

Same thing again today, dist-upgraded to get kodi 15 and it pulled a new kernel and broke the remote again.

Forgot i'd written that writeup above, spent another half hour messing around before finding this thread. Sure enough, followed my steps to the letter and that sorted it!

On an existing build after a kernel upgrade, you can simply start from the ./autogen.sh line if you've still got your lirc source tree kicking around.

I've no idea why this remote module cant just exist in the bloody kernel driver in the first place without all the hacks and patches.


Diabbo: its supplied with the kernel becuase lirc modules are part of the kernel. I guess thats a good thing for most remotes, as they'll just work out the box, but becuase this xbox driver needs messed about with, it leaves us with this problem every time.
Reply

Logout Mark Read Team Forum Stats Members Help
[HOW-TO][XBMCbuntu 12.0][Frodo] XBOX DVD Remote/Dongle1