# [pfSense 1.2.3] How compile the picoLCD driver for nanoBSD



## bartgrefte (Mar 9, 2010)

Hi 

A while back I bought this system:
MSI IM-945GSE-A, Kingston KVR533D2S4-1G, Mini-Box M300-LCD case.
As operating system I've chosen pfSense 1.2.3 embedded (nanoBSD) since I want to use this system as a router, embedded because it runs from a CF-card.

Now here's the thing. The lcdproc package (v0.5.2) for pfSense does not have a picolcd driver (even though it is listed in the settings) for the picolcd display in the case. Since I would like to be able to use it, I would like to get it working, but how?

On the pfSense forum, no-one is willing to help. The only one who did try to get it working stopped working on it, wasn't a priority anymore.

So I'm hoping that someone here can put me in the right direction about how to compile the picolcd driver, that is present in the package from sourceforge lcdproc project, in such a way that it works with pfSense/nanoBSD?
Or is there more to it than that?

With regards,

Bart Grefte

*lcdproc 0.5.2 link.
*picoLCD 2x20 SDK link


----------



## DutchDaemon (Mar 9, 2010)

Guess you could try sysutils/lcdproc.


----------



## bartgrefte (Mar 10, 2010)

Thanks for the tip 

But uhm, how do I install it? I know I should use the && make install clean command, but I can't get the files downloaded (wget and get don't work, command not found).

Since I still had the pfSense package of lcdproc 0.5.2 installed, I thought I'd install the package from you're link in a virtual computer (VMWare Workstation) running FreeBSD and then copy the driver over to pfSense... For some reason I can't seem to find the directory where the files of lcdproc are located in pfSense. Even the find command can't find it.

But I do have the picolcd driver, copied from the virtual computer, now to find out where to put it...


----------



## dennylin93 (Mar 10, 2010)

`# make install clean` should download the files automatically.


----------



## bartgrefte (Mar 10, 2010)

I know that, it's these files I can't download: http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/lcdproc/


----------



## bartgrefte (Mar 10, 2010)

(No edit button?)

I found the driver-folder, tried (via ftp) to add the picolcd driver I've put on my webspace, but can't save it since it's a readonly FS (pfSense embedded). Any idea's?


----------



## DutchDaemon (Mar 10, 2010)

bartgrefte said:
			
		

> (No edit button?)



You received a welcome email. Try reading the information on the links in it


----------



## DutchDaemon (Mar 10, 2010)

Did you install an up-to-date ports tree? You can't just download a tarball and treat it like a port. It needs the ports sekeleton installed.

Note all the warnings here before proceeding: http://forums.freebsd.org/showthread.php?t=7290


----------



## bartgrefte (Mar 10, 2010)

DutchDaemon said:
			
		

> You received a welcome email. Try reading the information on the links in it


Ah, forgot to check that :r




			
				DutchDaemon said:
			
		

> Did you install an up-to-date ports tree? You can't just download a tarball and treat it like a port. It needs the ports sekeleton installed.
> 
> Note all the warnings here before proceeding: http://forums.freebsd.org/showthread.php?t=7290


Uhm, I don't know how to do that in pfSense, if it's even possible.
I can only get the pfSense-ports list, can't find a way to get a different list.

Just now I tried adding the driver to the rest of them (again), since I got past the "read-only FS" part with the help of */etc/rc.conf_mount_rw *and */etc/rc.conf_mount_ro*.
Had a hunch that simply putting the picolcd-driver with the rest wasn't gonna do it, and I was right. Driver is not listed in the settingspage of lcdproc so I can't select it. Tried manually editing the LCDd.conf file, but it keeps putting back the name of the driver selected at the settingspage.
Found a pdf where it's explained about how to add a driver but the file that has to be edited can't be found.

Already saw that topic


----------



## bartgrefte (Mar 13, 2010)

Made some progress 

Tried to start LCDProc from commandline with the -d option where I specified the picolcd driver, I got this:


```
Could not open driver module /usr/local/lib/lcdproc/picolcd.so: Shared object "libusb.so.2" not found, required by "picolcd.so"
Driver [picolcd] binding failed
Could not load driver picolcd
There is no output driver
Critical error while initializing, abort.
```
So there is something missing, gonna look for that tomorrow.

Also made some progress getting the driver listed in the settingspage of LCDProc, thanks to this post I ran into thanks to Google 
After editing the XML file the driver got listed, then I added

```
case "picolcd":
$config_text .= "[{$lcdproc_config['driver']}]\n";
$config_text .= "Device={$realport}\n";
break;
```
to the other file. Now when I select the picolcd driver in the webinterface and try to start LCDProc, I get the exact same error in pfSense's log that I mentioned earlier in this post. This means that LCDProc sees the driver and is trying to use it, now that's good:e


----------



## bartgrefte (Mar 19, 2010)

Got the files needed, now running into an error that says that the display can't be fount eventhough it is connected and recognized.
However, it is not hooked up (or whatever it's called) to  "/dev/cuaU0" or "/dev/cuaU1". Instead it's connected to "uhub2" a.k.a. "/dev/usb2".

Now to figure out how to solve that...


----------



## bartgrefte (Mar 25, 2010)

Solved that, had to edit the same files as when I added the picolcd driver.
But, still no go. Display not found....

However, read this at http://lcdproc.sourceforge.net/docs/current-user.html#picolcd


> Requirements
> 
> The driver is based on the libusb USB library, which should make it work with Linux, the different BSB variants as well as Darwin/MacOS X.
> 
> ...


Run LCDd as root: tried that.
USB host controller driver? Uhm....
The part with the mount->

```
[admin@bocadelinfierno.local]/(42): mount -t usbfs usbfs /proc/bus/usb
mount: /proc/bus: No such file or directory
```


----------



## bartgrefte (Mar 31, 2010)

Got it working  , kinda....
Seems there is an USB "patch" necessary that is applied in pfSense 2.0 BETA.
Rest of the story (and howto) can be found here: http://forum.pfsense.org/index.php/topic,23919.msg123663.html#msg123663


----------

