[mythtv-users] Re: USB MCE IR Receiver

Jim Oltman cnliberal at gmail.com
Mon Mar 21 00:42:45 UTC 2005


Alright.  I have fixed the 4KSTACKS issue and commented out the
EXTRAVERSIONS in the MAKEFILE.  I successfully compiled LIRC.  After
moving my .ko dev and mceusb files to their correct locations, I
rebooted the machine and received this error in my /var/log/messages:

Mar 20 18:31:05 mythfrontend kernel:
/home/mythtv/compile/lirc-0.7.0/drivers/lirc_mceusb/lirc_mceusb.c:
mceusb_setup2 - Unsuccessful initialization
Mar 20 18:31:05 mythfrontend kernel: usbcore: registered new driver lirc_mceusb
Mar 20 18:31:05 mythfrontend kernel:
/home/mythtv/compile/lirc-0.7.0/drivers/lirc_mceusb/lirc_mceusb.c: USB
Microsoft IR Transceiver Driver v0.2.jim

You can see that at the end, I tacked on the .jim to the .h driver
file in the #DEFINE section.  I have compared my PRODUCTID and
VENDORID numbers to the ones in the lirc_mceusb.h file I made and they
are identical to my ProdID and VendorID.  I have found the
mceusb_setup2 location in the lirc_mceusb.c file.  Here is what it
says:

static void mceusb_setup2( struct usb_device *udev, struct usb_skel* dev )
{
       char data[16];
       int res, size;

       memset( data, 0, 16 );
       res = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
                                       USB_REQ_GET_STATUS, USB_DIR_IN, 0, 0,
                                       data, 2, HZ);
       dprintk("%s - Get Status: res = %d, status = 0x%x 0x%x",
__func__, res, data[0], data[1]);

       memset( data, 0, 16 );
       res = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
                                       USB_REQ_SET_CONFIGURATION, 0, 1, 0,
                                       data, 0, HZ);
       dprintk("%s - Set Configuration #1: res = %d", __func__, res);

       /* Doesn't seem strictly necessary, but the Windows driver does it */

       memset( data, 0, 16 );
       data[0] = 0;
       data[1] = 0xFF;
       data[2] = 0xAA;
       data[3] = 0xFF;
       data[4] = 0x0B;

       res = usb_bulk_msg(udev, usb_sndbulkpipe(udev,
dev->bulk_out_endpointAddr),
               data, 5, &size, HZ);
       dprintk("%s - Send #1: res = %d, data = 0x%x 0x%x, size=%d,
sendAddr=%d", __func__, res, data[0],
data[1], size, dev->bulk_out_endpointAddr);
       if (res == -ETIMEDOUT)
       {
               err("%s - Unsuccessful initialization", __func__);
               return;
       }

       memset( data, 0, 16 );
       res = usb_bulk_msg(udev, usb_rcvbulkpipe(udev,
dev->bulk_in_endpointAddr),
               data, 16, &size, HZ);
       dprintk("%s - Receive #1: res = %d, size=%d, receiveAddr=%d",
__func__, res, size, dev->bulk_in_endpointAddr);

       memset( data, 0, 16 );
       data[0] = 0xFF;
       data[1] = 0x18;

       res = usb_bulk_msg(udev, usb_sndbulkpipe(udev,
dev->bulk_out_endpointAddr),
               data, 2, &size, HZ);
       dprintk("%s - Send #2: res = %d, size=%d, sendAddr=%d",
__func__, res, size, dev->bulk_out_endpointAddr);

       memset( data, 0, 16 );
       res = usb_bulk_msg(udev, usb_rcvbulkpipe(udev,
dev->bulk_in_endpointAddr),
               data, 16, &size, HZ * 5);
       dprintk("%s - Receive #2: res = %d, size=%d, receiveAddr=%d",
__func__, res, size, dev->bulk_in_endpointAddr);
}

I am a little confused by the two memset(data,0,16) that is listed
above.  What could be the problem here?  Thanks!!

On Sat, 19 Mar 2005 17:23:59 +0100, Axel Thimm <Axel.Thimm at atrpms.net> wrote:
> On Fri, Mar 18, 2005 at 06:49:05PM -0600, Jim Oltman wrote:
> > Axel,
> >
> > I built lirc against the kernel source I downloaded from ATRPMs.
> > Shouldn't this be setup and ready to go with 4KSTACKS and match the
> > kernel I have installed already?  I know these are nooB questions but
> > I am about as noob as they get with compiling.  Thanks!
> 
> Instructions for setting up your kernel sources can be found in Fc3'
> release notes. You will need to copy over the right .config file and
> remove any EXTRAVERSION from the top Makefile.
> 
> > On Wed, 16 Mar 2005 14:22:19 +0100, Axel Thimm <Axel.Thimm at atrpms.net> wrote:
> > > On Tue, Mar 15, 2005 at 09:31:06PM -0600, Jim Oltman wrote:
> > > > lirc_dev: version magic '2.6.10-prep 686 REGPARM gcc-3.4' should be
> > > > '2.6.10-1.770_FC3 686 REGPARM 4KSTACKS gcc-3.4'
> > >
> > > Looks like you didn't build against a kernel source tree matching the
> > > kernel you want to target. Unfortunatley that's an open issue with
> > > RH's infrastructure for building external kmdls. Check the release
> > > notes for how to get the kernel sources set up and also check the
> > > kernel specfile for which steps are needed to configure/prepare the
> > > kernel sources.
> > >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> --
> Axel.Thimm at ATrpms.net
> 
> 
>


More information about the mythtv-users mailing list