LDCproc - get i2500vfd working
-
Hey guys,
sorry for bad english - i am not a native speaker :/i need help modifying the current (2.3.3-DEVELOPMENT (amd64)) LCDpro package to work with my Intranator 2500 Display.
i got some input from revengineer (https://forum.pfsense.org/index.php?topic=110177.msg688692#msg688692) but i think a new thread would be better. I need alot of help :D
my usbconfig output:ugen0.5: <vfd display="" intra2net="" ag=""> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)</vfd>
goal:
i want to use my Intranator 2500 Display on my pfsense setup.What i did:
As i understand LCDproc (http://lcdproc.omnipotent.net/hardware.php3) i need driver i2500VFD.
unfortunately that driver is not avialable through the LCDproc php interface, so i changed /usr/local/www/packages/lcdproc/lcdproc.php and added an i2500vfd driver entry to the dropdown menu:$driverGroup->add( new Form_Select( 'driver', 'Driver', $pconfig['driver'], // Initial value. [ ... ... 'i2500vfd' => 'i2500vfd', ... ... ] ) );
But if selected and try to save the config via php interface, no /usr/local/etc/LCDd.conf gets created… seems to have problems with my changes -> ?? where can i find log files?
then i tried to directly modify /usr/local/pkg/lcdproc.inc and write 'i2500vfd' directly in to the LCDd.conf
i changed:
$config_text .= "Driver={$lcdproc_config[driver]}\n";... $config_text = "[server]\n"; $config_text .= "DriverPath=/usr/local/lib/lcdproc/\n"; $config_text .= "Driver={$lcdproc_config[driver]}\n"; ... ... \"\n"; ...
to
... $config_text = "[server]\n"; $config_text .= "DriverPath=/usr/local/lib/lcdproc/\n"; $config_text .= "Driver=i2500vfd\n"; ... ... \"\n"; ...
now the /usr/local/etc/LCDd.conf gets created and the i2500vfd driver is selected… but my display does nothing (execpt showing the Intranator logo, as usual). I read somewhere that the driver i2500vfd needs to be selected during compile time of the package.??
what should i do next to gets this working.
any help even reading material would be great.regards
n0s3 -
Regarding your lcdproc.inc modification, scroll down that file a little bit further to where all the case statements for drivers are, and add a case for i2500vfd:
case "i2500vfd": $config_text .= "[{$lcdproc_config['driver']}]\n"; break;
That will enable your UI change in lcdproc.php to select the i2500vfd driver, and you won't have to worry about that switch statement failing and executing the line: unset($lcdproc_config[driver]);
If you do it that way then undo your previous lcdproc.inc changes
I read somewhere that the driver i2500vfd needs to be selected during compile time of the package.?
This was what I was worried about, I'm not very familiar with the lcdproc drivers but the help suggested a dependency and your tinkering seems to be confirming it.
The pfsense LCD package uses Freebsd's lcdproc ports package, which is built by this makefile, and that makefile contains a FTDI option to "Build drivers using libftdi", but I don't know what the implications would be to add that dependency to pfsense's LCDproc package.
You could look into installing/recompiling a version of the sysutils/lcdproc ports package with the FTDI option on your pfsense machine, then your driver-selection UI changes might start working. I'll leave advice on how best to make changes like that to people who use FreeBSD as their day to day OS.
-
That driver is not being built from what I can see. It's not in the make file at all and if you look in /usr/local/lib/lcdproc, it's not there.
Just adding it as selectable is not going to help. You will need to compile it yourself on an equivalent FreeBSD machine and import the .so driver file to test it.
If you check the system log after attempting to start LCDd it will probably show errors.
Steve
-
Hey,
today i setup a FreeBSD VM in my qemu. But again i have problems and need help.I tried to build lcdproc on my own. (including i2500vfd)
I downloaded the sources and tried to build it with following command:./configure --prefix=/root/lcd/bin/ --enable-drivers=i2500vfd
the prefix thing is just for me, i want to know what gets installed where :D never mind..
problem:root@:~/lcd # ./configure --prefix=/root/lcd/bin/ --enable-drivers=i2500vfd checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking build system type... amd64-unknown-freebsd11.0 checking host system type... amd64-unknown-freebsd11.0 checking whether to enable debugging... no checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of cc... gcc3 checking how to run the C preprocessor... cc -E checking for ranlib... ranlib checking whether cc understands -c and -o together... yes checking for xmlto... no checking CFLAGS for gcc -Wno-unused-function... -Wno-unused-function checking CFLAGS for gcc -ftrampolines... no, unknown checking for gethostbyname... yes checking for connect... yes checking for inet_aton... yes checking for kstat_open in -lkstat... no checking for nanosleep in -lposix4... no checking for getloadavg... yes checking for swapctl... no checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking procfs.h usability... no checking procfs.h presence... no checking for procfs.h... no checking sys/procfs.h usability... yes checking sys/procfs.h presence... yes checking for sys/procfs.h... yes checking sys/loadavg.h usability... no checking sys/loadavg.h presence... no checking for sys/loadavg.h... no checking utmpx.h usability... yes checking utmpx.h presence... yes checking for utmpx.h... yes checking for kvm_open in -lkvm... yes checking sched.h usability... yes checking sched.h presence... yes checking for sched.h... yes checking for sys/types.h... (cached) yes checking machine/pio.h usability... no checking machine/pio.h presence... no checking for machine/pio.h... no checking machine/sysarch.h usability... yes checking machine/sysarch.h presence... yes checking for machine/sysarch.h... yes checking sys/cpuvar.h usability... no checking sys/cpuvar.h presence... no checking for sys/cpuvar.h... no checking machine/apm_bios.h usability... yes checking machine/apm_bios.h presence... yes checking for machine/apm_bios.h... yes checking for System V IPC headers... yes checking for union semun... yes checking for machine/cpufunc.h... yes checking for sched_setscheduler... yes checking for sched_setscheduler in -lposix4... no checking for sched_setscheduler in -lrt... yes checking for i386_get_ioperm in -li386... no checking for i386_get_ioperm in -lc... no checking for iopl... no checking for ioperm... no checking sys/io.h usability... no checking sys/io.h presence... no checking for sys/io.h... no checking for a parallel port... yes checking linux/i2c-dev.h usability... no checking linux/i2c-dev.h presence... no checking for linux/i2c-dev.h... no checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for ANSI C header files... (cached) yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking for sys/io.h... (cached) no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking kvm.h usability... yes checking kvm.h presence... yes checking for kvm.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/dkstat.h usability... yes checking sys/dkstat.h presence... yes checking for sys/dkstat.h... yes checking stdbool.h usability... yes checking stdbool.h presence... yes checking for stdbool.h... yes checking for sys/sysctl.h... yes checking for sys/pcpu.h... yes checking for SA_RESTART... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for uid_t in sys/types.h... yes checking whether cc needs -traditional... no checking return type of signal handlers... void checking for select... yes checking for socket... yes checking for strdup... yes checking for strerror... yes checking for strtol... yes checking for uname... yes checking for cfmakeraw... yes checking for snprintf... yes checking for getopt... yes checking for your mounted filesystem table... /etc/fstab checking for fcntl.h... (cached) yes checking sys/dustat.h usability... no checking sys/dustat.h presence... no checking for sys/dustat.h... no checking for sys/param.h... (cached) yes checking sys/statfs.h usability... no checking sys/statfs.h presence... no checking for sys/statfs.h... no checking sys/fstyp.h usability... no checking sys/fstyp.h presence... no checking for sys/fstyp.h... no checking mnttab.h usability... no checking mnttab.h presence... no checking for mnttab.h... no checking mntent.h usability... no checking mntent.h presence... no checking for mntent.h... no checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking sys/statvfs.h usability... yes checking sys/statvfs.h presence... yes checking for sys/statvfs.h... yes checking sys/vfs.h usability... no checking sys/vfs.h presence... no checking for sys/vfs.h... no checking sys/filsys.h usability... no checking sys/filsys.h presence... no checking for sys/filsys.h... no checking sys/fs_types.h usability... no checking sys/fs_types.h presence... no checking for sys/fs_types.h... no checking for sys/mount.h... yes checking for getmntinfo... yes configure: checking how to get filesystem space usage... checking for statvfs... yes checking module extension... .so checking for dlopen in -ldl... no checking for shl_load in -ldld... no checking if libusb support has been enabled... yes checking for pkg-config... no checking for LIBUSB... no checking if libusb-1-0 support has been enabled... yes checking for LIBUSB_1_0... no checking if libftdi support has been enabled... yes checking for LIBFTDI... no checking if libhid support has been enabled... yes checking for LIBHID... no checking if PNG support has been enabled... yes checking for libpng-config... /usr/local/bin/libpng-config checking whether libpng is present and sane... yes checking if freetype support has been enabled... yes checking for freetype-config... /usr/local/bin/freetype-config checking for FreeType -- version >= 7.0.1... yes checking if ethlcd support has been enabled... yes checking for doxygen... no configure: checking which drivers to compile... configure: WARNING: The i2500vfd driver needs the ftdi library --------------------------------------- LCDd will be compiled with the drivers: --------------------------------------- checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating shared/Makefile config.status: creating server/Makefile config.status: creating server/commands/Makefile config.status: creating server/drivers/Makefile config.status: creating clients/Makefile config.status: creating clients/lcdproc/Makefile config.status: creating clients/lcdexec/Makefile config.status: creating clients/lcdvc/Makefile config.status: creating clients/examples/Makefile config.status: creating clients/metar/Makefile config.status: creating docs/Makefile config.status: creating docs/Doxyfile config.status: creating docs/lcdproc-dev/Makefile config.status: creating docs/lcdproc-user/Makefile config.status: creating docs/lcdproc-user/drivers/Makefile config.status: creating scripts/Makefile config.status: creating scripts/init-LCDd.LSB config.status: creating scripts/init-lcdproc.LSB config.status: creating scripts/init-lcdexec.LSB config.status: creating scripts/init-lcdvc.LSB config.status: creating scripts/init-LCDd.debian config.status: creating scripts/init-lcdproc.debian config.status: creating scripts/init-lcdexec.debian config.status: creating scripts/init-lcdvc.debian config.status: creating scripts/init-LCDd.rpm config.status: creating scripts/init-lcdproc.rpm config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands
i think the important section:
configure: checking which drivers to compile... configure: WARNING: The i2500vfd driver needs the ftdi library --------------------------------------- LCDd will be compiled with the drivers: ---------------------------------------
It seems that if i make it now, nothing will be maked. Yes i installed libftdi package via pkg.
pkg install libftdi
After that same problem…
I decided to build the latest FTDI lib.
I cloned the latest master banch from git. Problem during prepareing:... ... ... -- Boost version: 1.63.0 -- Found the following Boost libraries: -- unit_test_framework -- Building unit test CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: LIBUSB_LIBRARIES (ADVANCED) linked by target "ftdi1-static" in directory /root/git/libftdi/src linked by target "ftdi1" in directory /root/git/libftdi/src linked by target "ftdipp1" in directory /root/git/libftdi/ftdipp -- Configuring incomplete, errors occurred! ... ... ...
due to my lacking cmake knowledge i cant help me…. :(
maybe some of you can help me...
regards! -
Looks like you might need the "libftdi1" package, instead of the plain "libftdi"…
Best of luck, keep us posted.
-
Hey,
Thanks for the reply!
but i still cant get it to compile my needed driver…
I installed your suggested package (below prove of installation)root@:~ # pkg install libftdi1 Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent version of packages are already installed
but i still get:
root@:~/lcdproc-0.5.6 # ./configure --enable-drivers=all ... ... configure: WARNING: The i2500vfd driver needs the ftdi library ... ...
anything else i can do?
i dont know what else i need to install…I WANT TO USE MY DISPLAY SO BAD :D
regrad
n0s3 -
You can try the attached. Took a bit of convincing around pkg-config, but it compiled. I do not have the LCD, so I have no idea if it works.
Disclosure: The attached file is an i386 binary that could technically contain "any"code, and I suggested you install this code (of unknown origin to you) into a security-focused live system. You probably should only do this into an off line home system you fully own and control…
$ ldd server/drivers/i2500vfd.so server/drivers/i2500vfd.so: libftdi1.so.2 => /usr/local/lib/libftdi1.so.2 (0x281f9000) libusb.so.3 => /usr/lib/libusb.so.3 (0x28205000) libkvm.so.6 => /lib/libkvm.so.6 (0x28215000) libc.so.7 => /lib/libc.so.7 (0x2806f000) libthr.so.3 => /lib/libthr.so.3 (0x2821e000) $ file server/drivers/i2500vfd.so server/drivers/i2500vfd.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped $ md5 server/drivers/i2500vfd.so MD5 (server/drivers/i2500vfd.so) = 8ce01a45856be894d9a8c2cf30363e10
I had to install a couple of things:
# pkg install libftdi1 # pkg install pkgconf
Then I ended up with:
configure CFLAGS="$(pkg-config --cflags --libs libftdi1)" --enable-libftdi --enable-drivers=i2500vfd
Best of luck, keep us posted.
-
Hey, long time no see…
i still did not get it to work.
I tried your file with no success. :( but thanks for the offer anyway!
I guess your file is not working because of 32vs64 bit?so i am back to compileling myself.
I did a fresh freebsd 10.3 VM setup and tried to replicate your steps:# pkg install libftdi1 # pkg install pkgconf
then configure with ur call:
root@freebsd-vm:~/lcdproc-0.5.7 # ./configure CFLAGS="$(pkg-config --cflags --libs libftdi1)" --enable-libftdi --enable-drivers=i2500vfd Illegal variable name.
but i get illegal variable name…
so i try to fix that by modify the parameter:
/configure CFLAGS='pkg-config --cflags --libs libftdi1' --enable-libftdi --enable-drivers=i2500vfd checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... amd64-unknown-freebsd10.3 checking host system type... amd64-unknown-freebsd10.3 checking whether to enable debugging... no checking for gcc... no checking for cc... cc checking whether the C compiler works... no configure: error: in `/root/lcdproc-0.5.7': configure: error: C compiler cannot create executables See `config.log' for more details
seems i have no gcc…
root@freebsd-vm:~/lcdproc-0.5.7 # pkg install gcc Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 6 package(s) will be affected (of 0 checked): New packages to be INSTALLED: gcc: 5.4.0_2 gcc5: 5.4.0_3 mpfr: 3.1.5_1 mpc: 1.0.3 gcc-ecj: 4.5 binutils: 2.28,1 Number of packages to be installed: 6 The process will require 598 MiB more space. 101 MiB to be downloaded. Proceed with this action? [y/N]: y [1/6] Fetching gcc-5.4.0_2.txz: 100% 804 B 0.8kB/s 00:01 [2/6] Fetching gcc5-5.4.0_3.txz: 100% 81 MiB 2.3MB/s 00:37 [3/6] Fetching mpfr-3.1.5_1.txz: 100% 351 KiB 359.1kB/s 00:01 [4/6] Fetching mpc-1.0.3.txz: 100% 71 KiB 73.0kB/s 00:01 [5/6] Fetching gcc-ecj-4.5.txz: 100% 1 MiB 1.4MB/s 00:01 [6/6] Fetching binutils-2.28,1.txz: 100% 19 MiB 2.0MB/s 00:10 Checking integrity... done (0 conflicting) [1/6] Installing mpfr-3.1.5_1... [1/6] Extracting mpfr-3.1.5_1: 100% [2/6] Installing mpc-1.0.3... [2/6] Extracting mpc-1.0.3: 100% [3/6] Installing gcc-ecj-4.5... [3/6] Extracting gcc-ecj-4.5: 100% [4/6] Installing binutils-2.28,1... [4/6] Extracting binutils-2.28,1: 100% [5/6] Installing gcc5-5.4.0_3... [5/6] Extracting gcc5-5.4.0_3: 100% [6/6] Installing gcc-5.4.0_2... Extracting gcc-5.4.0_2: 100% Message from gcc5-5.4.0_3: To ensure binaries built with this toolchain find appropriate versions of the necessary run-time libraries, you may want to link using -Wl,-rpath=/usr/local/lib/gcc5 For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens transparently.
now again:
[root@freebsd-vm:~/lcdproc-0.5.7 # ./configure CFLAGS='pkg-config --cflags --libs libftdi1' --enable-libftdi --enable-drivers=i2500vfd checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... amd64-unknown-freebsd10.3 checking host system type... amd64-unknown-freebsd10.3 checking whether to enable debugging... no checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/root/lcdproc-0.5.7': configure: error: C compiler cannot create executables See `config.log' for more details /code] hmm my config.log states alot, i think this is important: [code]... gcc version 5.4.0 (FreeBSD Ports Collection) configure:3461: $? = 0 configure:3450: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3461: $? = 1 configure:3450: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:3461: $? = 1 configure:3481: checking whether the C compiler works configure:3503: gcc pkg-config --cflags --libs libftdi1 -O3 conftest.c >&5 gcc: error: pkg-config: No such file or directory gcc: error: libftdi1: No such file or directory gcc: error: unrecognized command line option '--cflags' gcc: error: unrecognized command line option '--libs' ...[/code] i dont know how to fix this. any help would be nice regards
-
I used this:
./configure CFLAGS="$(pkg-config --cflags --libs libftdi1)" --enable-libftdi --enable-drivers=i2500vfd
Then
$ make
Results in:
$ ldd server/drivers/i2500vfd.so server/drivers/i2500vfd.so: libftdi1.so.2 => /usr/local/lib/libftdi1.so.2 (0x801603000) libusb.so.3 => /usr/lib/libusb.so.3 (0x801810000) libkvm.so.6 => /lib/libkvm.so.6 (0x801a23000) libc.so.7 => /lib/libc.so.7 (0x800821000) libthr.so.3 => /lib/libthr.so.3 (0x801c2b000)
Check if the attached works for you. Let me know.