LCDproc development and user support list

Text archives Help

[Lcdproc] PATCH: Enable picolcd to pass IR codes to LIRC via UDP (redone)

Chronological Thread 
  • From: jack at (Jack Cleaver)
  • Subject: [Lcdproc] PATCH: Enable picolcd to pass IR codes to LIRC via UDP (redone)
  • Date: Sun, 21 Sep 2008 20:43:45 +0100

Ethan Dicks wrote:
> On Sun, Sep 21, 2008 at 5:15 PM, Jack Cleaver <jack at>
> wrote:
>> The claim-and-detach logic for the USB interface isn't working
>> properly (for me) at bootup, because the hid driver has got the
>> device. This used to work.
>> It works if I change the code so the driver doesn't bail out after
>> failing to set the configuration, and goes on with detaching the
>> hid driver. But I can't see anything that has changed in that
>> regard since I had code that worked, so I'm not uploading a patch
>> (for now).
>> I've been tinkering with my hardware. That's the only thing I can
>> see that has changed since yesterday, but I can't see why that
>> would affect anything.
>> Is anyone else testing this?
> I have been working on the picolcd driver myself, but I don't have
> LIRC set up (yet), so I haven't tested that portion of things.
> I personally noticed some oddnesses with the claim-and-detach logic.
> Working with Nicu and stepping through the logic in usblib, I came up
> with an init sequence that works for me, but I don't know that it's
> the "right thing to do".
> My test environment is usblib 0.12 and a very recent nightly of
> LCDproc on a RedHat Enterprise Linux desktop (2.6.9-55.0.9.ELsmp).
> Given that I use RHES for work, I won't be dropping Debian or Ubuntu
> or anything else on it... I have nothing against other distros (I
> started with Slackware over 15 years ago), but nobody is paying me to
> run anything other than RedHat right now.
> Anyway, here's what I have _after_ the existing code that opens the
> device and checks the device tree for picoLCD_VENDOR/picoLCD_DEVICE
> (note that I do _not_ call usb_set_configuration() - if I do that,
> things never work right).

Oh - cool! OK, I also can't see why the usb_set_configuration() call is
needed; everything works fine if it isn't called. But I've never coded
against USB before.

I'll compare what you have shown with what I have working (tomorrow);
perhaps we can come up with something we're both happy with, and submit it.

> It's pretty straightforward and it does work on my RHEL system, but
> one thing that's odd... according to log messages, the first time I
> start up LCDd after I've plugged in the picolcd, it tells me that the
> reliquishing driver is 'usbhid'... ok... great. The odd part is
> _after_ that, every time I start up LCDd, until I unplug the devlce
> and plug it back in, I get garbage for an owner.

Oh - I'll see if I can replicate that.

> I would have thought that the device would be unowned after LCDd
> takes it from usbhid the first time, and that usb_get_driver_np()
> would return some sort of status that _nobody_ owned the picolcd, but
> it appears to be not so.
> If this sequence really is doing the right thing rather than just
> "not breaking" on my system, I can submit a patch for that part of
> picolcd.c. I'm also quite happy to test other arrangements on my
> system to ensure they work in this environment.

Great. I only have one test environment, the picolcd is built-in (M300),
and I don't know anyone else that's using this gear that I can ask to
test my code.

Thanks for the feedback.


Archive powered by MHonArc 2.6.18.

Top of page