Lcdproc with Sure Electronics LCD
-
Hi,
Anyone have experiences installing [port]sysutils/lcdproc[/port] with Sure Electronics LCD (http://www.sure-electronics.com/goods.php?id=969)??)
I am getting this when trying to load the driver for testing:
[/usr/local/lib/lcdproc]# LCDd -d SureElec SureElec: open(/dev/ttyUSB0) failed (No such file or directory) Driver [SureElec] init failed, return code -1 Could not load driver SureElec There is no output driver Critical error while initializing, abort.
[/usr/local/lib/lcdproc]# dmesg | grep usb uslcom0: <cp2102 usb="" to="" uart="" bridge="" controller="">on usbus1</cp2102>
-
There is a pfSense package for lcdproc in case you weren't aware.
You probably need to point LCDd at the generated serial port, probably /dev/cuaU0.1. The uppper case 'U' indicates a usb connected serial port. Look in /dev before and after you plug it in to see what appears.Steve
-
This what i have
$ ls /dev ad0 ad0s1 ad0s1a ad0s2 ad0s2a ad0s3 ata bpf bpf0 console crypto ctty cuau0 cuau0.init cuau0.lock cuau1 cuau1.init cuau1.lock devctl devstat fd fido geom.ctl io klog kmem led md0 md1 mdctl mem nfslock null pci pf ptmx random speaker stderr stdin stdout ttyu0 ttyu0.init ttyu0.lock ttyu1 ttyu1.init ttyu1.lock ufs ufsid ugen0.1 ugen0.2 ugen1.1 urandom usb usbctl xpt0 zero
There is no cuaU0 with capital 'U'
and this what i have if use ugen0.2
May 16 20:23:46 LCDd: LCDd version 0.5.3 starting May 16 20:23:46 LCDd: Using Configuration File: /usr/local/etc/LCDd.conf May 16 20:23:46 LCDd: Listening for queries on 127.0.0.1:13666 May 16 20:23:46 LCDd: SureElec: cannot write to port May 16 20:23:46 LCDd: Driver [SureElec] init failed, return code -1 May 16 20:23:46 LCDd: Could not load driver SureElec May 16 20:23:46 LCDd: There is no output driver May 16 20:23:46 LCDd: Critical error while initializing, abort. May 16 20:23:52 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:23:57 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:24:09 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:24:21 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:24:33 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:24:44 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:24:56 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:25:08 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:25:20 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:25:32 php: lcdproc: Failed to connect to LCDd process Operation timed out (60) May 16 20:25:44 php: lcdproc: Failed to connect to LCDd process Operation timed out (60)
-
Hmm, ok. Those serial devices are just the seemingly omnipresent com1 and com2.
Any of those disappear when you unplug it?Clearly your screen is being recognised and attached to the uslcom(4) driver.
Steve
Edit: Try looking in /dev/usb
Edit2: I see that your display is 'edition 3' and there is a driver option for that:
http://lcdproc.sourceforge.net/docs/current-user.html#SureElecEdit3: Your device is on usbus1 so try ugen1.1 <– try this first!Hmm unsure about this now. It should definitely appear as ugen1.x though as it's on usbus1. ugen1.1 is probably the hub though. -
There is no ugen0.2 when i unplugged the LCD but i am still getting same error:
LCDd: Driver [SureElec] init failed, return code -1
I have tried /dev/usb/0.2.0 and /dev/usb/0.2.1 but same got this error:
LCDd: SureElec: failed to configure port (Inappropriate ioctl for device)
-
Ok so assume ugen0.2, have you tried 'edition=3'?
Steve
-
Tried and no success. Here is my LCDd.conf
[server] DriverPath=/usr/local/lib/lcdproc/ Driver=SureElec Bind=127.0.0.1 Port=13666 ReportLevel=3 ReportToSyslog=yes User=nobody Foreground=no ServerScreen=no GoodBye="Thanks for using" GoodBye=" pfSense " WaitTime=5 ToggleRotateKey=Enter PrevScreenKey=Left NextScreenKey=Right ScrollUpKey=Up ScrollDownKey=Down [menu] MenuKey=Escape EnterKey=Enter UpKey=Up DownKey=Down [SureElec] driverpath =/usr/local/lib/lcdproc/ Device=/dev/ugen0.2 Size=20x4 Edition=3 Contrast=200 Brightness=480
with this error logs:
May 16 23:40:15 LCDd: LCDd version 0.5.5 starting May 16 23:40:15 LCDd: Using Configuration File: /usr/local/etc/LCDd.conf May 16 23:40:15 LCDd: Listening for queries on 127.0.0.1:13666 May 16 23:40:15 LCDd: SureElec: failed to configure port (Inappropriate ioctl for device) May 16 23:40:15 LCDd: Driver [SureElec] init failed, return code -1 May 16 23:40:15 LCDd: Could not load driver SureElec May 16 23:40:15 LCDd: There is no output driver May 16 23:40:15 LCDd: Critical error while initializing, abort. May 16 23:40:16 php: lcdproc: Start client procedure. Error counter: (0)
-
Reading through the source code for the Sure Elec driver it expects to see a serial port not a usb device.
Surprising that the uslcom driver does not generate a new serial device. ???
You should ask in the lcdproc-dev package thread. The new maintainer, mdima, is using a SureElec LCD.
Steve
-
It looks like the device should appear as ucom0.
You need to have the ucom(4) driver loaded. Is it in the kernel?
The uslcom driver has been updated quite a bit since 8.1 was released, though it seems to recognise your device.You could try adding the ucom driver from here:
http://files.pfsense.org/jimp/ko-8.1/i386/ucom.ko
Add it to /boot/modules.
Load it from the command line:kld_load ucom.ko
Or add ucom_load="YES" to /boot/loader.conf.local and reboot.
Steve
-
How to upload ko file to my router? is it allowed?
-
Yes you can upload it. I usually use WinSCP uploading from windows.
Alternatively you can fetch it directly from the machine:[2.0.1-RELEASE][root@pfsense.fire.box]/root(1): cd /boot/modules [2.0.1-RELEASE][root@pfsense.fire.box]/boot/modules(2): /etc/rc.conf_mount_rw [2.0.1-RELEASE][root@pfsense.fire.box]/boot/modules(3): fetch http://files.pfsense.org/jimp/ko-8.1/i386/ucom.ko ucom.ko 100% of 20 kB 429 kBps [2.0.1-RELEASE][root@pfsense.fire.box]/boot/modules(4): kldload ucom kldload: can't load ucom: File exists [2.0.1-RELEASE][root@pfsense.fire.box]/boot/modules(5): /etc/rc.conf_mount_ro
However as you can see on my machine ucom is already present in the kernel.
The only other thing is to check that the USB product and vendor IDs are in the source code correctly.
Enter: usbconfig dump_device_desc
Paste the output here.Steve
-
This what i have now:
$ usbconfig dump_device_desc ugen0.1: <ohci root="" hub="" amd="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0100 bDeviceClass = 0x0009 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x0000 idProduct = 0x0000 bcdDevice = 0x0100 iManufacturer = 0x0001 <amd>iProduct = 0x0002 <ohci root="" hub="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen1.1: <ehci root="" hub="" amd="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0009 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x0000 idProduct = 0x0000 bcdDevice = 0x0100 iManufacturer = 0x0001 <amd>iProduct = 0x0002 <ehci root="" hub="">iSerialNumber = 0x0000 <no string="">bNumConfigurations = 0x0001 ugen0.2: <cp2102 usb="" to="" uart="" bridge="" controller="" silicon="" labs="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x10c4 idProduct = 0xea60 bcdDevice = 0x0100 iManufacturer = 0x0001 <silicon labs="">iProduct = 0x0002 <cp2102 usb="" to="" uart="" bridge="" controller="">iSerialNumber = 0x0003 <0001> bNumConfigurations = 0x0001</cp2102></silicon></cp2102></no></ehci></amd></ehci></no></ohci></amd></ohci>
$ ls /dev ad0 ad0s1 ad0s1a ad0s2 ad0s2a ad0s3 ata bpf bpf0 console crypto ctty cuau0 cuau0.init cuau0.lock cuau1 cuau1.init cuau1.lock devctl devstat fd fido geom.ctl io klog kmem led md0 md1 mdctl mem nfslock null pci pf ptmx random speaker stderr stdin stdout ttyu0 ttyu0.init ttyu0.lock ttyu1 ttyu1.init ttyu1.lock ufs ufsid ugen0.1 ugen0.2 ugen1.1 urandom usb usbctl xpt0 zero
NOTE: This LCD works properly under FreeBSD 9-STABLE but not under pfSense 2.0.1-RELEASE (i386)
-
In that case it's almost certainly due to the usb ids not in the source.
Have you tried one of the pfSense 2.1 snapshots? Based on FreeBSD 8.3.Under FreeBSD 9 does it generate a new serial port?
Looking at the 8.1 source it is in the usbdevs file.
The ucom functionality has been changed from 8.2 up so it's hard to see how to update.Steve
-
It generates ugen1.2
I will try 2.1 tonight and will let you know asap.
-
It worse now, even my ntpd won't start with 2.1
-
Well 2.1 is a work in progress so some things may not work. I take it LCDd won't start then? The lcdproc-dev package won't work because it's compiled for 8.1 you have to use the FreeBSD pkg.
Steve
-
Yeap. i just re-installed 2.0.1 and finding new LCD that compatible with my Alix board and pfSense 2.0.1. Do you have any recommendation?
Thanks.
-
All my experience is with the Firebox LCD which is built into the appliance so not much use to you.
Probably best to ask in the lcdproc-dev thread. Although I note that the only reference to the LCD you have is in reply to a similar suggestion. ::)Steve