LCDproc development and user support list

Text archives Help

[Lcdproc] Patch for lcd2usb

Chronological Thread 
  • From: bsdfan at (Markus Dolze)
  • Subject: [Lcdproc] Patch for lcd2usb
  • Date: Thu, 23 Dec 2010 08:33:43 +0100

On 21.12.2010 13:51, Michael Zanetti wrote:
> Hi,
> On Tuesday 21 December 2010 11:06:38 Michael Zanetti wrote:
>> 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.
> Never mind this... I just realized that the device id changes each time the
> device gets unplugged so this is obviously not a solution. First I thought
> they would be always the same for the same USB port.
> Indeed to me (I'm really not a USB expert) it seems using the serial number
> would be the only working solution to let the user choose which device to
> use.
> I have been in contact with Till Harbaum and I think he would have no
> problem
> releasing a new firmware version that has the serial field set up properly.
> The
> bigger problem is how to keep the serial id unique on open hardware (given
> that the user can just download a firmware containing one serial-ID and
> flash it
> to all of its devices). This could be however workarounded by falling back
> to
> to the old mechanism if the field has not been filled out prior to flashing
> or
> duplicate IDs are detected.

Probably serial numbers will not be unique on open hardware as there
will be no one who assigns them.

Adding a serial number to lcd2usb is just as easy as adding two #define
lines to its usbconfig.h file. Tried this the day before yesterday and
it works.

As long as you are able to compile and flash the firmware yourself, you
only need to ensure each of your device has a different serial number.

> The next problem is how LCDd parses its config file. If I add two "Driver="
> entries and then add two sections "[hd44780]", config_get_string() just
> gives
> me the entries in the first section twice. So it is not possible to define
> two
> devices using the same driver but differently configured serial numbers.

You can name driver sections in LCDd.conf as you like. If the section
name does not match the driver file name, you have to set the 'File'
option. Example:





Archive powered by MHonArc 2.6.18.

Top of page