[HOWTO] - Willem PCB6.0E LPT EPROM Programmer

Share your own howto's etc. Not for support questions!

[HOWTO] - Willem PCB6.0E LPT EPROM Programmer

Postby lkraemer » 2017-11-13 22:47

This HOWTO: will explain how to Install a SYBA PCI NM9805CV Parallel Port, it's Software, and the Willem PCB6.0E Software for Debian 8.x (32 Bit)

It will be a multi part [HOWTO]. WORK in PROGRESS!

PART 1: - Preparing Debian for Hardware & Windows Software

Typically you need to install build-essential, and the headers for the kernel you are running.
Check what Version of Debian you are running:
Code: Select all
cat /etc/issue
cat /etc/debian_version
cat /etc/os-release
lsb_release -da

Debian (Ver 8.x - 32 Bit) Packages needed for any Software Compile:
1. Build-Essential
2. Linux Debian 8.x - 3.16.0-4-686-pae Headers (or the Headers for your current Version)
Code: Select all
uname -r

will tell you the kernel you are currently running.
Code: Select all
sudo apt-get install build-essential linux-headers-$(uname -r)

will install the software needed to successfully compile your code.

We will be using the 32 Bit version of Wine to run the (Windows Version) WILLEM PCB6.0E LPT version software, so Wine will also need to be installed.
We will also be building the software with winegcc, so the proper version of winegcc will be required. It is located in some development package. But,
how do we locate what exact package it is in? We can use the following URL to search for the package since we know the parameters of the search
which are: (Jessie (8.x), 32 Bit (i386), package contents (winegcc)).

which gives the following package information:

the proper package to install is: wine32-development-tools

Code: Select all
sudo apt-get install wine wine32-development-tools

Then run winecfg to let it set up the required files and configuration.
Code: Select all

Exit winecfg without installing Mono or any other additional software, and then update the system database. (or you can logout, reboot, and log back in)
Code: Select all
sudo updatedb

winegcc should now be installed, but since it's not in your path you can't locate it to execute it. Try typing winegcc in a Terminal
and see if it executes. If it doesn't, then edit your path to add the path to winegcc. To find where winegcc is located do the following
in a terminal as su- or root.
Code: Select all
#cd /
#find . -iname 'winegcc'

It should be found in some subdirectory. Mine was:

You will be adding this to the path a bit later.

You will be using the Parallel Port so you must have the correct Permissions to use the Port or become Superuser to use lp.

Check what groups you have as a logged in Linux user:
Code: Select all
groups <user>

In my case, I'm in the lp group, as shown here: (Debian has root & lp with rw permissions)
Code: Select all
groups larry

larry : larry dialout cdrom floppy sudo audio dip video plugdev netdev scanner bluetooth lp lpadmin vboxusers

If you are not a member of the group lp, then add yourself to the group.
Code: Select all
adduser <user-name> lp

In my case it would be:
Code: Select all
adduser larry lp

The next step you need to do is to find the "SHELL" and "env" you are using, and how many shells are installed and available.

1. env -- Display the current environment, find what Shell is being used with the following command.....
Code: Select all
env | grep SHELL=

To get a list of available shells on your system, look in the /etc/shells file. This will list the available shells with their complete
path names. You can see the list of available shells by running:
Code: Select all
cat /etc/shells

Additional shells may be available in your distribution's software repositories. Performing a search for the term "shell" in your
package manager should provide you with a list of alternative command line shells.

If you want to experiment with a shell, just for now, you can launch a shell from within the existing shell. For example, if you
ant to run the tcsh shell, you can run:
Code: Select all

When you are finished exploring tcsh you can type exit to return to the default shell. Once you have found a shell you want to continue using
you can switch to the default shell by running the chsh command. For example, if you want to switch to using the tcsh shell, you can run
Code: Select all
chsh -s /usr/bin/tcsh

Please note that you must provided the full directory path to the new shell.

2. locate .*rc -- Find the current logged in user's home shell Configuration file (*rc)... use:
Code: Select all
locate .*rc

Bourne shell (sh)
Almquist shell (ash)
Bourne-Again shell (bash)
Debian Almquist shell (dash)
Korn shell (ksh)
Z shell (zsh)
C shell (csh)
TENEX C shell (tcsh)
other shells..............

There may be a .bash_profile file in /home/loginuser along with .bashrc file. You can put configurations in either file,
and you can create either if it doesn’t exist. But, why two different files? What is the difference?

According to the bash man page, .bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

If .bash_profile exists in /home/user with the following information already inserted:
Code: Select all
export PATH

just append your path modifications here instead of the .bashrc file. (ie. CentOS 6)

You need to list the *rc file to verify the contents and set the PATHS. I'm ASSUMING a Bash shell......Your may be different!

3. cat .bashrc -- List the configuration file, then append the proper search paths for the users shell with edit.
Code: Select all
export LD_LIBRARY_PATH=????????????????????????????????
export LIBRARY_PATH=???????????????????????????????????
export C_INCLUDE_PATH=?????????????????????????????????
export CPATH=??????????????????????????????????????????

Mine happens to now be:
Code: Select all
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
export LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/lib64
export C_INCLUDE_PATH=./:/usr/include:/usr/local/include
export CPATH=./:/usr/include:/usr/local/include:/usr/include/i386-linux-gnu
export PATH=./:/usr/lib/i386-linux-gnu/wine-development:${PATH}

But, your's may vary accordingly. You won't be able to cut & paste mine, unless your system is built exactly like mine. It's up to you to locate
exactly where all the libs and includes are located. That is what all the previous commands should have helped you do. Just because you have
/usr/lib & /usr/local/lib included....doesn't mean your needed lib is in that path.

That is where your detective work comes to play. SEARCH and use grep to locate the libs.

Add the path by editing the .bashrc file to add /usr/lib/i386-linux-gnu/wine-development as a path.
Now, try the winegcc command in a Terminal Window:
Code: Select all

gcc: fatal error: no input files
compilation terminated.
winegcc: gcc failed

Telling you winegcc executed, but had no file to compile. It's now in your path, and functional.

Once you have the env set either reboot or reset the env. Once again, your system command for this can/may be different.

4. source .bashrc -- Reset the environment to what we need for Compiles, assuming the SHELL is bash. This may not be available on your system.....
Code: Select all
source .bashrc

PART 2: - Installing the SYBA PCI Parallel Port Card and copying the 32 Bit software to Linux

Install the SYBA PCI Parallel Port Card in a slot where no Capacitors are sticking up in the way, preventing the card from being installed.
I had to look over three PCI slots to locate one with enough clearance to allow the PCI card to fully seat in the PCI Connector.

The Documentation in the SYBA box states, "Please refer to installation document on the CD for installing these Operating systems."

Download the DLL source code:


Extract the files. If your parallel port is at an address other than 0x378, edit the io_main.c and update the LPT_BASE_ADDR define near the top
of the code to match your parallel port address. Now, try the make command from the subdirectory containing the source code:
Code: Select all
cd /path/to/your/source/code

winegcc -c -mno-cygwin -m32 -I. -D__WINESRC__ -o io_main.o io_main.c
In file included from io_main.c:18:0:
io_dll.h:13:24: fatal error: wine/debug.h: No such file or directory
#include "wine/debug.h"
compilation terminated.
winegcc: gcc failed
Makefile:87: recipe for target 'io_main.o' failed

I searched for debug.h from the root directory. It was found at: /usr/include/wine-development/debug.h
I just needed to add this path to the .bashrc file, or add it to the two source files: (I used the latter)

In both files, I changed #include "wine/debug.h" to:
#include "/usr/include/wine-development/debug.h"

and it built properly.
Code: Select all

winegcc -c -mno-cygwin -m32 -I. -D__WINESRC__ -o io_main.o io_main.c
winegcc -shared io.spec -mno-cygwin -m32 -o io.dll.so io_main.o -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid

Install the DLL:
Now, we’re going to put the io.dll.so file in a place where Wine can find it, and change the permissions of io.dll.so to 774.
User and Group have READ, WRITE, and EXECUTE Permissions and Other has READ ONLY.
Code: Select all
sudo chmod 774 io.dll.so
sudo cp io.dll.so /usr/lib/i386-linux-gnu/wine/wine/

Check to see if the permissions are correct:
Code: Select all
ls -alt io.dll.so

-rwxrwxr-- 1 root root 77448 Oct 25 20:43 io.dll.so

Execute the software with the wine command:
Code: Select all
cd ~/Downloads/Willem-Programmer/ver\ 6/PCB6.0LPT software
larry@debian:~/Downloads/Willem-Programmer/ver 6/PCB6.0LPT software$ wine pcb60\ lpt.exe

ioperm: Success

The Willem PCB6.0E LPT software Executes properly and looks correct. Exit the software and VERIFY the Parallel Printer Port.

PART 3: - Parallel Port Verification

Make sure that the KEE Willem PCB6.0E LPT EPROM Programmer is connected to your systems Parallel Port and powered on.
Open a Terminal Window and check if the lp, ppdev, and parport_pc kernel modules are loaded:
Code: Select all
lsmod | grep lp
lsmod | grep ppdev
lsmod | grep parport_pc

Check what modules are loaded on startup:
Code: Select all
cat /etc/modules

Check if the kernel detected the parallel port during bootup:
Code: Select all
dmesg | grep par
sudo lpinfo -v

Check if the device files of the parallel port(s) are created and have the correct permissions and ownerships:
Code: Select all
ls -l /dev/lp*

[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.016157] AppArmor: AppArmor disabled by boot time parameter
[ 3.420874] PM: Hibernation image partition 8:4 present
[ 7.394788] ppdev: user-space parallel port driver
[ 10.136236] parport0: PC-style at 0x9400, irq 17 [PCSPP,TRISTATE,EPP]
[ 10.232325] lp0: using parport0 (interrupt-driven).
[ 10.232337] parport_serial 0000:04:09.0: 0000:04:09.0: unknown NetMos/Mostech device

crw-rw---- 1 root lp 6, 0 Nov 14 01:14 /dev/lp0

network socket
direct parallel:/dev/lp0
network ipps
network ipp14
network http
network ipp
direct hp
network https
serial serial:/dev/ttyS0?baud=115200
network lpd
direct usb://Brother/HL-2140%20series?serial=M9J181811
direct hpfax

Posts: 169
Joined: 2011-02-09 05:02

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests