Adding a New MCE Compatible Transceiver

From LinuxMCE
Jump to: navigation, search
Version Status Date Updated Updated By
710 Compatible 1st May 2010 totallymaxed
810 Compatible 1st May 2010 totallymaxed
1004 Unknown N/A N/A
1204 Unknown N/A N/A
Usage Information


Compatibility

The procedures described here are compatible with LinuxMCE 0710 and 0810.

Figuring Out Your Vendor/Model ID

Firstly attach your MCE Compatible Transceiver to your Core/MD and see if its detected. If it is not detected then open a terminal session on the machine you attached it too and use the lsusb command to find out some info about it. Type the following;

lsusb -v <return>

You should get some output like this;

Bus 002 Device 002: ID 0471:0815 Philips

The Vendor/Product ID is 04710815 in the above example (a standard Philips MCE Transceiver from Microsoft). Sometimes its obvious which usb device your Transceiver is as the Vendor/Product name will be displayed. If they are not then repeatedly connect the Transceiver then do 'lsusb -v' then disconnect the Transceiver and use the 'lsusb -v' command again and by comparing the two oupputs you should be able to determine which entry is your Transceiver.

Adding the Vendor/Product ID to the mce_usb2 Template

Now armed with the info above we can add the Vendor/Product ID to the mce_usb device template on your Core and after a reload router it should be detected properly;

Got to Web Admin -> Advanced -> Configuration -> Device Templates

In the ID field to the left of the 'Go' button type the ID of the mce_usb2 template - 1862 and then click the 'Go' button. A new window will open to display the parameters of the Device Template. Scroll down to the section called 'Plug-n-Play' and find the last empty entry in that section - this where you will add the details of your MCE Transceiver. Add the following values to the fields for your MCE Transceiver;

  • From = 0
  • To = 0
  • PnP Protocol = Xap
  • Parms = 175|pci

Now add the Vendor/Prod ID data from the output of your lsusb command for the Pinnacle to the 'Vendor Model ID' field;

Vendor Model ID = 04710815 (**Notice you do not need the colon and your Vendor/Product ID will be different of course**)

Then in the 'Comment' field enter some text to identify the Transceiver;

Comment = MCE I/R receiver (**Your Vendors Name goes here**)

Now lastly click save at the bottom of the page and then do a reload router. Now plug your Pinnacle transceiver into a usb port and it should get detected (you will see the detection and setup scripts run and be announced in the top left hand corner of the Orbiters screen... when everything has been setup you will see a message on screen confirming this and asking if you want to reload the router. Please click the reload button... and your Pinnacle transceiver should be working fine.

If your Receiver Does Not Respond

If your receiver now gets detected and you saw the messages to this affect appearing in the top left hand corner of your MD's screen after plugging it into a USB port but the Orbiter still does not respond when you press its buttons then it maybe that the Prod ID needs to be added to the lirc_mceusb2 driver. You can check this by using the following command;

modinfo lirc_mceusb2|grep <vendor ID eg 0471> <return>

Your should get some output that looks something like below;

alias:          usb:v0471p060Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0471p0815d*dc*dsc*dp*ic*isc*ip*

The Prod ID for your receiver should be shown in one of lines between the 1st 'p' and the 1st 'd' after your Vendor ID. ie in the output above we have two Product ID's '060C' and '0815'

If the Product ID for your transceiver is not listed in the output of the modinfo command then the lirc_mceusb2 driver will need to be re compiled with your transceivers Product ID included.

Adding your Receivers Product ID to the driver

These instructions are just the basic steps needed to update the driver source and build the new binary. I am assuming that you know the basics of building from sources...so some steps may have been omitted because of this (please feel free to update this with more detail).

You'll need to install subversion, linux-source-2.6.22, build-essential, gcc and possibly some other packages too before you start. Do this now before continuing...

Next grab the sources you need, including lirc sources from the svn;

cd /usr/src <return>

Grab a copy of the LinuxMCE-0710 lirc sources from the svn;

svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0710/ubuntu/lirc-0.8.2+lmce <return>

Now go to the directory that contains the lirc_mceusb2 sources;

cd drivers/drivers/lirc_mceusb2 <return>

You should see this when you ls;

root@moon206:/usr/src/lirc-0.8.2+lmce/drivers/lirc_mceusb2# ls
Makefile.am  Makefile.in lirc_mceusb2.c

Next we need to edit the lirc_mceusb2.c file and add the Product ID for your Tranceiver. I'm using the joe editor below but you can use any editor that suits you;

joe lirc_mceusb2.c <return>

Now you should have the lirc_mceusb2.c source file open on screen inside your text editor, search for, or scroll down until you see the lines below;

static struct usb_device_id usb_remote_table [] = {
       { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, /* Philips eHome Infrared Transciever */
       { USB_DEVICE(VENDOR_PHILIPS, 0x060c) }, /* Philips Infrared Transciever - HP branded */
       { USB_DEVICE(VENDOR_SMK, 0x031d) },     /* SMK/Toshiba G83C0004D410 */
       { USB_DEVICE(VENDOR_SMK, 0x0322) },     /* SMK eHome Infrared Transceiver (Sony VAIO) */
       { USB_DEVICE(VENDOR_TATUNG, 0x9150) },  /* Tatung eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_SHUTTLE, 0xc001) },  /* Shuttle eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_GATEWAY, 0x3009) },  /* Gateway eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_MITSUMI, 0x2501) },  /* Mitsumi */
       { USB_DEVICE(VENDOR_TOPSEED, 0x0001) },  /* Topseed eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_RICAVISION, 0x0010) }, /* Ricavision internal Infrared Transceiver */
       { USB_DEVICE(VENDOR_ITRON, 0x7002) },   /* Itron ione Libra Q-11 */
       { USB_DEVICE(VENDOR_FIC, 0x9242) },     /* FIC eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_LG, 0x9803) },      /* LG eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_MICROSOFT, 0x00a0) }, /* Microsoft MCE Infrared Transceiver */
       { }                                     /* Terminating entry */
};

Now we want to add a new Product ID for the manufacturer or 'VENDOR' of our Tranceiver. As an example lets assume we want to add support for the IR Tranceiver shipped with the new ASUS Eee Box 206 (the model with the ATI GPU). We already know the VENDOR is Philips for the ASUS's Transceiver and we also know that the new Product ID is '206c'. So we would insert a new line like the one below just below the last Philips entry;

{ USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, /* Philips Infrared Transciever - ASUS EeeBox 206*/

This would give us a modified source file that looks like below;

static struct usb_device_id usb_remote_table [] = {
       { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, /* Philips eHome Infrared Transciever */
       { USB_DEVICE(VENDOR_PHILIPS, 0x060c) }, /* Philips Infrared Transciever - HP branded */
       { USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, /* Philips Infrared Transciever - ASUS EeeBox 206*/
       { USB_DEVICE(VENDOR_SMK, 0x031d) },     /* SMK/Toshiba G83C0004D410 */
       { USB_DEVICE(VENDOR_SMK, 0x0322) },     /* SMK eHome Infrared Transceiver (Sony VAIO) */
       { USB_DEVICE(VENDOR_TATUNG, 0x9150) },  /* Tatung eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_SHUTTLE, 0xc001) },  /* Shuttle eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_GATEWAY, 0x3009) },  /* Gateway eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_MITSUMI, 0x2501) },  /* Mitsumi */
       { USB_DEVICE(VENDOR_TOPSEED, 0x0001) },  /* Topseed eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_RICAVISION, 0x0010) }, /* Ricavision internal Infrared Transceiver */
       { USB_DEVICE(VENDOR_ITRON, 0x7002) },   /* Itron ione Libra Q-11 */
       { USB_DEVICE(VENDOR_FIC, 0x9242) },     /* FIC eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_LG, 0x9803) },      /* LG eHome Infrared Transceiver */
       { USB_DEVICE(VENDOR_MICROSOFT, 0x00a0) }, /* Microsoft MCE Infrared Transceiver */
       { }                                     /* Terminating entry */
};

Obviously your changes will reflect the Transceiver Product ID you want to add and therefore will have a different ID and the string between the "/* */" would describe your Transceiver. Now save the changes you have made...dont forget this ;-)

Now you should follow the instructions for compiling Lirc (see the the INSTALL file in the main lirc directory for details)

This article still needs extending...