Discussion:
[Lcdproc] LCDProc CVS + PicoLCD on FreeBSD
(too old to reply)
Andre Guibert de Bruet
2009-01-15 16:16:20 UTC
Permalink
Hello all,
I recently purchased one of these little guys for eventual use on
my alix/pfsense based firewall: http://www.mini-box.com/PicoLCD-4X20-Sideshow
I cannot seem to get it to work! I have tried the mini-box
provided version of LCDProc, version .5.2 and the latest CVS
I am sorry, but the picolcd driver is currently not supported under
FreeBSD. So without any additional programming there is no way to
get it to work with FreeBSD. In the FreeBSD's port it is therefore
disabled and not built by default.
On your system the driver loads and tries to identify the device.
What packages have you installed to get the dependicies satisfied?
Unfortunately the PicoLCD 2X20 and 4X20 devices present themselves as
HID devices. I filed PR usb/128803 and attached a patch which quirks
the device, so that it doesn't get attached to by the HID driver (Thus
making it available to libusb). It can be found at http://www.freebsd.org/cgi/query-pr.cgi?pr=128803
. It would be awesome if this would get committed on CURRENT and
possibly MFC'ed... :)

Cheers,
Andy

PS: I have the magic to get the 4X20 working on OSX too, if anyone is
interested.

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Gary R. Van Sickle
2009-01-16 12:27:01 UTC
Permalink
From: Andre Guibert de Bruet
[]
Unfortunately the PicoLCD 2X20 and 4X20 devices present
themselves as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
I filed PR usb/128803 and attached
a patch which quirks the device, so that it doesn't get
attached to by the HID driver (Thus making it available to
libusb). It can be found at
http://www.freebsd.org/cgi/query-pr.cgi?pr=128803
. It would be awesome if this would get committed on
CURRENT and possibly MFC'ed... :)
Perhaps I'm missing something, but how would that be awesome? Wouldn't it
be significantly more awesome if these HID devices were communicated with in
the same manner as any other HID device? Or is FreeBSD's HID support really
that broken?
--
Gary R. Van Sickle
Andre Guibert de Bruet
2009-01-16 20:34:06 UTC
Permalink
Post by Gary R. Van Sickle
From: Andre Guibert de Bruet
Unfortunately the PicoLCD 2X20 and 4X20 devices present
themselves as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
The PicoLCD 4X20 devices offer a bunch of different bits of
functionality:
- A 4x20 character display.
- 8 physical buttons.
- An IR receiver.

It is "unfortunate" because the FreeBSD HID implementation (Along with
OSX, Linux and Windows') has no clue what to do why any of these. It
is way more useful for a program to be able to attach to the device
and interact with it in a user-configurable way. You may want to have
the display print out the output of a program (Such as lcdproc or
lcdexec), have the buttons map to commonly-used scripts and have the
IR controller hooked up to lirc, for example.
Post by Gary R. Van Sickle
I filed PR usb/128803 and attached
a patch which quirks the device, so that it doesn't get
attached to by the HID driver (Thus making it available to
libusb). It can be found at
http://www.freebsd.org/cgi/query-pr.cgi?pr=128803
. It would be awesome if this would get committed on
CURRENT and possibly MFC'ed... :)
Perhaps I'm missing something, but how would that be awesome?
Wouldn't it
be significantly more awesome if these HID devices were communicated
with in
the same manner as any other HID device? Or is FreeBSD's HID
support really
that broken?
It has nothing to do with FreeBSD being broken. As stated above, this
quirk allows third-party programs to connect to the device and
interact with it. Note that this device's smaller brother, the PicoLCD
2X20 is already being quirked in the USB stack.

Cheers,

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Poul-Henning Kamp
2009-01-16 21:19:55 UTC
Permalink
Post by Gary R. Van Sickle
Post by Andre Guibert de Bruet
Unfortunately the PicoLCD 2X20 and 4X20 devices present
themselves as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because that
is what microchip.com supplies as a USB programming example.

The actual protocol they talk has nothing to do with the HID
specification.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
***@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Andre Guibert de Bruet
2009-01-16 22:38:33 UTC
Permalink
In message <C6F61B9C-A765-4F35-9BF7-
Post by Gary R. Van Sickle
Post by Andre Guibert de Bruet
Unfortunately the PicoLCD 2X20 and 4X20 devices present
themselves as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because that
is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
PHK - I see that you committed the quirk for the 2X20. Would you mind
committing the patch attached to PR usb/128803? Do you want me to
produce the bits required for usb2 as well?

Many thanks,
Andy

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Poul-Henning Kamp
2009-01-17 01:31:45 UTC
Permalink
Post by Andre Guibert de Bruet
Post by Poul-Henning Kamp
Post by Gary R. Van Sickle
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because that
is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
PHK - I see that you committed the quirk for the 2X20. Would you mind
committing the patch attached to PR usb/128803? Do you want me to
produce the bits required for usb2 as well?
USB2 patches should go to HPS@ still I think ?
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
***@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
Gary R. Van Sickle
2009-01-17 01:32:15 UTC
Permalink
From: Poul-Henning Kamp
In message
Post by Gary R. Van Sickle
Post by Andre Guibert de Bruet
Unfortunately the PicoLCD 2X20 and 4X20 devices present
themselves
Post by Gary R. Van Sickle
Post by Andre Guibert de Bruet
as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because
that is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
Ah. That's not "unfortunate", that's just sheer laziness on iTuner's part.
Great, and I just bought one too. Welp, here's hoping whatever nonstandard
protocol they do use works reasonably, and that the mfg gets their act
together on the next one.
--
Gary R. Van Sickle
Andre Guibert de Bruet
2009-01-19 19:20:25 UTC
Permalink
Post by Gary R. Van Sickle
From: Poul-Henning Kamp
In message
Post by Gary R. Van Sickle
Post by Andre Guibert de Bruet
Unfortunately the PicoLCD 2X20 and 4X20 devices present themselves
as HID devices.
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because
that is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
Ah. That's not "unfortunate", that's just sheer laziness on
iTuner's part.
Great, and I just bought one too. Welp, here's hoping whatever
nonstandard
protocol they do use works reasonably, and that the mfg gets their act
together on the next one.
The iTuner parts are firmware upgradable, so there is hope. The
Picolcd.com SDK has code that does the flashing on Windows so it would
be a matter of porting it, if firmware that addresses the issue
becomes available.

I have purchased a couple of these and they've worked with LCDproc CVS
HEAD with the quirk. I just upgraded my testbed to CURRENT and will be
producing the appropriate patch for the USB2 stack, later tonight.

Cheers,
Andy

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Andre Guibert de Bruet
2009-01-20 04:00:13 UTC
Permalink
--Apple-Mail-10-713703121
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit
In message <F2B6C026-25FB-4789-A2C1-
Post by Andre Guibert de Bruet
Post by Poul-Henning Kamp
Post by Gary R. Van Sickle
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because that
is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
PHK - I see that you committed the quirk for the 2X20. Would you mind
committing the patch attached to PR usb/128803? Do you want me to
produce the bits required for usb2 as well?
I have attached the 4x20 quirk patch for hpsusb.

Thanks for all of your hard work!

Cheers,
Andy

/* Andre Guibert de Bruet * 436f 6465 2070 6f65 742e 2042 6974 206a */
/* Managing Partner * 6f63 6b65 792e 2053 7973 4164 6d69 6e2e */
/* GSM: +1 734 846 8758 * 2055 4e49 5820 736c 6575 7468 2e00 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */



--Apple-Mail-10-713703121
Content-Disposition: attachment;
filename=picolcd.usb2.quirk.diff
Content-Type: application/octet-stream; x-unix-mode=0644;
name="picolcd.usb2.quirk.diff"
Content-Transfer-Encoding: 7bit

Index: sys/dev/usb2/include/usb2_devtable.h
===================================================================
--- sys/dev/usb2/include/usb2_devtable.h (revision 187457)
+++ sys/dev/usb2/include/usb2_devtable.h (working copy)
@@ -3401,6 +3401,12 @@
"USB-LCD 2x20",
},
{
+ USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD4X20,
+ 0,
+ "I-Tuner Networks",
+ "USB-LCD 4x20",
+ },
+ {
USB_VENDOR_JABLOTRON, USB_PRODUCT_JABLOTRON_PC60B,
0,
"Jablotron",
Index: sys/dev/usb2/include/usb2_devid.h
===================================================================
--- sys/dev/usb2/include/usb2_devid.h (revision 187457)
+++ sys/dev/usb2/include/usb2_devid.h (working copy)
@@ -1511,6 +1511,7 @@

/* Ituner networks products */
#define USB_PRODUCT_ITUNERNET_USBLCD2X20 0x0002 /* USB-LCD 2x20 */
+#define USB_PRODUCT_ITUNERNET_USBLCD4X20 0xc001 /* USB-LCD 4x20 */

/* Jablotron products */
#define USB_PRODUCT_JABLOTRON_PC60B 0x0001 /* PC-60B */
Index: sys/dev/usb2/quirk/usb2_quirk.c
===================================================================
--- sys/dev/usb2/quirk/usb2_quirk.c (revision 187457)
+++ sys/dev/usb2/quirk/usb2_quirk.c (working copy)
@@ -95,6 +95,7 @@
{USB_QUIRK_ENTRY(USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_1500CAVRLCD, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD2X20, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
+ {USB_QUIRK_ENTRY(USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD4X20, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)},

--Apple-Mail-10-713703121
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit



--Apple-Mail-10-713703121
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hans Petter Selasky
2009-01-20 09:36:02 UTC
Permalink
Post by Andre Guibert de Bruet
In message <F2B6C026-25FB-4789-A2C1-
Post by Andre Guibert de Bruet
Post by Poul-Henning Kamp
Post by Gary R. Van Sickle
...but... they *are* HID devices. Why is this "unfortunate"?
It's unfortunate, because they are HID devices only because that
is what microchip.com supplies as a USB programming example.
The actual protocol they talk has nothing to do with the HID
specification.
PHK - I see that you committed the quirk for the 2X20. Would you mind
committing the patch attached to PR usb/128803? Do you want me to
produce the bits required for usb2 as well?
I have attached the 4x20 quirk patch for hpsusb.
Hi,

Committed to P4. And my private SVN. Will go into -current early next week.

http://perforce.freebsd.org/chv.cgi?CH=156420

--HPS

Loading...