LCDproc development and user support list

Text archives Help

[Lcdproc] Patch for lcd2usb

Chronological Thread 
  • From: lists at (Michael Zanetti)
  • Subject: [Lcdproc] Patch for lcd2usb
  • Date: Tue, 21 Dec 2010 13:43:24 +0100

On Tuesday 21 December 2010 08:05:46 you wrote:
> On 18.12.2010 17:42, Michael Zanetti wrote:
> > The attached patch for hd44780-lcd2usb changes the device scanning
> > mechanism of the lcd2usb driver. The original version scans for all
> > attached lcd2usb devices and uses the last one found. This has the
> > problem, that defining two lines "Driver=hd4478" in the config file,
> > opens the last display twice.
> >
> > The patched version keeps track of the used devices and uses the first
> > unused one. This makes it possible to use multiple lcd2usb devices on
> > one machine and clone the output to all of them (e.g. for different
> > rooms playing music using the same MythTV box).
> I will not add this patch. For several reasons:
> * I'd like to see code reuse. We have a linked list implementation
> available as ./shared/LL.c .

Yeah, yesterday while making the second patch I stubled over LL too. I
planned to change this patch to use that list. I just didn't knew about the
when I first jumped into the code to get my displays up and running. Friday
evening was the first time I installed lcdproc after soldering the lcd2usb

> * It adds a global variable to the hd44780 driver which is supposed
> to not have these. The lcd2usb driver has a global buffer anyway.
> This was accidentally commited and will be corrected soon.
> * The global variable introduces a dependency between otherwise
> unrelated instances of hd44780 drivers.
> * It only addresses the situation where you have the same number of
> driver instances as the number of devices connected. If one only
> uses some of his devices it depends on libusb which devices are used.

Correct, however, the current implementation has this issue (apart from the
global variable) too. If one has multiple devices attached, it depends on
libusb which one is used. Anyways, I agree that this is not good and will try
to fix it.

> One solution will be to add a unique device address to the connection
> type, e.g. the USB serial number, like the bwct connection type supports
> and then add a config section for each device. Unfortunately stock USB
> devices do not have a serial number. It can easily be added, but
> requires firmware modification for each device.

What about using Bus-ID and Device-ID where the device is attached? AFAIK it
should be easy to get them in the code without changing the devices firmwares
and the user can easily obtain it using lsusb.


Archive powered by MHonArc 2.6.18.

Top of page