LinuxMCE Forums

General => Developers => Topic started by: kyfalcon on December 30, 2011, 05:32:13 pm

Title: New IR Transceiver - mce_usb2.c (Solved - Receiver Unsolved - Transmitter)
Post by: kyfalcon on December 30, 2011, 05:32:13 pm
I have recently purchased a couple of IR transmitters, HP Media Center that come from a vendor not currentl listed in the version of LIRC that LinuxMCE uses. From what I have read online these will work once lirc is updated with the vendor specific info. I plan on rebuilding lirc when I get home.

lsusb shows:

Bus 002 Device 004: ID 1934:5168 where research indicates that 1934 is the vendor ID for: FINTEK.

So my assumption is that I need to add the lines highlighted to mce_usb2.c
Is this the correct approach and if so
How do I get this back into svn or does someone want to do this real quick for me.

How do I make this? Do I need to make all of lirc or just the mce_usb2 driver?

mce_usb.c

#define VENDOR_FINTEK      0x1934

static struct usb_device_id usb_remote_table [] = {
   { USB_DEVICE(VENDOR_PHILIPS, 0x0815) },   /* Philips eHome Infrared Transciever */
   { USB_DEVICE(VENDOR_SMK, 0x031d) },   /* SMK/Toshiba G83C0004D410 */
   { 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_FINTEK, 0x5168) },     /* Fintek - HP media center - eHome Infrared Transceiver */
   { }               /* Terminating entry */
};

Title: Re: New IR Transceiver - mce_usb2.c
Post by: kyfalcon on January 01, 2012, 06:00:31 pm
Can anyone tell me how to build this? There is a Makefile.in and another Makefile.somethingelse but when I run make it tells me there is no Makefile. Any help is appreciated.
Title: Re: New IR Transceiver - mce_usb2.c
Post by: Marie.O on January 01, 2012, 06:53:29 pm
see if you have a configure script, and if yes, execute that. after that you should have a Makefile
Title: Re: New IR Transceiver - mce_usb2.c
Post by: kyfalcon on January 01, 2012, 09:52:50 pm
Thanks Posde, the configure script was actuall in the root lirc directory and not in the mce_usb2 directory. Had to change some of the code but built and installled and the thing is working as an IR receiver. Trying to test the transmit functionality now.

Anyone have any ideas how to test the IR transmitter? irw doesn't seem to be part of linuxmce
Title: Re: New IR Transceiver - mce_usb2.c
Post by: kyfalcon on January 02, 2012, 08:20:36 pm
OK Spoke too soon. I was able to get the mce_usb2 to build within the lirc drivers directory, but as far as getting all of lirc to build I get all kinds of errors. Could someone explain how to build lirc? Can I just grab the latest version of lirc from the lirc website or do we have to stick with what is in the lmc repositories?

Thanks
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 09, 2012, 03:58:20 pm
OK, so I was able to add the new remote to the code and rebuild.

go to /usr/src/lirc 0.8.6/drivers/

edit mce_usb.c

add the following to the  static struct usb_device_id mceusb_dev_table[] =

   /* Fintek eHome Infrared Transceiver (HP branded) */
   { USB_DEVICE(VENDOR_FINTEK, 0x5168) },

save the file and do a dpkg -reconfigure lirc_modules_source

make sure your /etc/lirc/hardware.conf is setup correctly.

Reboot and your FINTEK HP transeiver should work.
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: DragonK on January 09, 2012, 08:21:09 pm
Kyfalcon,

This is a alternative to USB-UIRT?
If so, where do we get them?

Karel
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: bushtech on January 09, 2012, 09:01:37 pm
Also dying to know
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 09, 2012, 10:42:12 pm
Haven't tested the transmit part yet, but I think i purchased on ebay for $13 apiece. Look for HP usb ir transmitter. Once I get a chnace to test the transmit function I'll update.
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: DragonK on January 10, 2012, 06:42:25 am
Once I get a chnace to test the transmit function I'll update.

Waiting....... patiently.....  ;D
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 10, 2012, 07:32:00 pm
From, everything I've read, if these have a transmitter they should work, I have recorded some ir codes but can't test them till I get home tonight.
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: Aviator on January 11, 2012, 04:51:04 pm
kyfalcon, would you mind posting the model number of the transceiver? Thanks.
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 11, 2012, 05:17:53 pm
kyfalcon, would you mind posting the model number of the transceiver? Thanks.

Here is where I got them. http://www.ebay.com/itm/NEW-HP-MCE-USB-receiver-IR-Blaster-Emitter-Wire-/250802845891

I will post the model number when I get home.

By the way everything I have read about lirc says they should work as a transmitter, I know they work as a reciever. I just haven't had a chance to test the transmit part.
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: tschak909 on January 11, 2012, 11:54:31 pm
please check the code and make sure the LIRC you are building has the PRONTO command implemented (grep for it).

This is required for the transmitter to work, as we store all our IR codes as PRONTO codes.

-Thom
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 12, 2012, 05:54:12 pm
I am assuming you are talking about the lirc code base? I just edited the files that are in /usr/src. Is that where you are talking about?

Thom how do I add pronto codes if it is not there? I was able to use irrecord to create an lircd.conf file for it, but I see it gets overridden when mce_usb restarts. Can I use usb uirt to learn the codes?
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: tschak909 on January 12, 2012, 06:04:51 pm
 /usr/src ?? it shouldn't...be.... huh...

what version of lirc is installed?

-Thom
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 12, 2012, 09:18:41 pm
I have no idea how it got there, I am assuming it is part of the install. Any way there is a lirc 0.8.6 directory that had a drivers/lirc_mceusb/mce_usb.c file.

I edited that file did a dpkg-reconfigure lirc-modules-source and wala the receive part was working.

Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: tschak909 on January 12, 2012, 09:20:48 pm
the lirc that should be used is the 0.8.6 or 0.8.7 that is in our source tree under src/ubuntu.

-Thom
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 12, 2012, 10:00:01 pm
0.8.6 I believe is for 10.04, if I pull that do I build it with dpkg ? I tried make but got all kinds of errors
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: tschak909 on January 12, 2012, 10:03:12 pm
Yes, there should be a debian folder in there.
-Thom
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 13, 2012, 04:45:58 am
Ok, i'll pull that and rebuild. If everything works i'll check my changes into svn
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 13, 2012, 11:44:04 pm
ok, forgive my ignorance, but I have checked out both  /external/lirc and /external/pluto-lirc-0.1 from 1004 branch and made my edits in mce_usb.c then tried to do dpkg -b lirc and dpkg -b lirc-pluto and get the error

dpkg-deb: failed to open package info file `lirc-pluto/DEBIAN/control' for reading: No such file or directory

please help a blind man see the light

Thx

kevin
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: tschak909 on January 13, 2012, 11:50:51 pm
ignore the /external/ directory, and use ubuntu/lirc-0.8.6+lmce1

-Thom
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 14, 2012, 12:50:00 am
thx
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: DragonK on January 17, 2012, 07:32:38 am
Hi Kyfalcon.

I noticed the thread is marked as "SOLVED"... meaning you got the tranceiver part working to?

Karel
Title: Re: New IR Transceiver - mce_usb2.c (Solved)
Post by: kyfalcon on January 17, 2012, 03:38:47 pm
No I marked it solved when i was able to patch the code to recognize the Fintek HP transceiver. I am still trying to test the transmitter part. I have been following the wiki on setting up a template for a new amp to no avail. I am trying to create a new amp/receiver device ONKYO TX-SR703 with a remote control of RC-620M I have the RC620M.conf for the remote that I created from irrecord. But I have been unsuccessful in creating a template that adds that to the lircd in the /etc/lirc directory, hence no transmitter at the moment. I also need to know what the hardware.conf should look like in the transmitter section.
Title: Re: New IR Transceiver - mce_usb2.c (Solved - Receiver Unsolved - Transmitter)
Post by: kyfalcon on January 17, 2012, 07:54:57 pm
Ok after reading over the wiki on how to add a remote, I believe I have seen the light and discovered the errors in my ways, philosophically of course. Any way I have messed with things in the admin and believe i have set up everything correctly now. Have to wait till I get home from work to truly test things. Will update my progress at that time.
Title: Re: New IR Transceiver - mce_usb2.c (Solved - Receiver Unsolved - Transmitter)
Post by: kyfalcon on January 19, 2012, 08:10:14 pm
Does LIRC_DCE create a device for the transmitter? My understanding and it is limited, is that normally  lirc is started by ubuntu by a call to init.d/lircd start etc. This will create /dev/lirc0 for mceusb receiver and /dev/lirc1 for mceusb transmitter. It does not look like LIRC_DCE is doing this. Can someone else confirm this? Should LIRC_DCE be creating /dev/lirc1 ?

Thanks