lpdclient is a small line printer daemon (lpd) client program to enable an EPOC device with a TCP/IP network link to a Unix/Linux box to print via the Unix lpd service. (Dont forget the Internet Dialup link is a TCP/IP link so this is supported on all EPOC R5 platforms with web broswing or email capability.)
There are a number of solutions available to enable an EPOC device to transfer files with a *ix box for those who cannot/dont want to use a Windows machine to host the Symbian supplied EPOC Connect or PsiWin packages. However none of these seem to support a "Print-via-PC" option that PsiWin provides.
This is my attempt to add that functionality.
Once the lpdclient application is installed and running on the EPOC device, printing via lpd is supported using the print to file option provided by the standard EPOC print setup dialog box.
Any file which is saved as C:\queue@host.lpd will automatically be sent by the lpdclient to the specified "queue" on the specified *ix "host". Once the file is sucessfully queued it is automatically deleted from the EPOC device's C:\ directory.
The specified queue on the lpd host must be capable of handling the format of the print file. Normally this will be a "raw" queue and the printer type selected on the EPOC device should match the printer type on the lpd host.
Another, possibly better, option is to download Andrew Johnson's excellent PostScript driver for EPOC and use this to print to a PostScript compatible queue on the lpd host (if you dont have a PostScript printer most linux hosts support PostScript printer emulation - via GhostScript).
The TCP/IP network connection between the EPOC device and the lpd host relies on a working serial PPP connection and a minor addition to the lpd host's "hosts" and "hosts.lpd" files.
The lpd expects its clients to send their hostname. To enable the lpd to verify this the client's hostname must exist in the /etc/hosts file (or on the local dns service).
Add the following line to the /etc/hosts file: (You need to be root to do this.)
epocdeviceip         psion
|
Replace epocdeviceip with the ip adress you have assigned to the EPOC device.
lpd only allows jobs to be submitted from clients whose ips appear in hosts.lpd. The epoc device's ip address must exist in the /etc/hosts.lpd file to enable it to submit print jobs.
Add the following line to the /etc/hosts.lpd file: (You need to be root to do this.)
epocdeviceip
|
Replace epocdeviceip with the ip adress you have assigned to the EPOC device.
As always there are many ways to do this - this is just the way I do it so use at your own risk!
Most PC's only have two serial ports so its inconvenient to dedicate one to an always on PPP link. My approach is to configure a port as a serial terminal connection that can be used for any login. I then add a "ppp" user login account that will automatically start a PPP link over the same port.
I am assuming the pppd package is already installed on your machine.
You need to be root to do most of this.
To provide a serial terminal on a port I use agetty. This is part of most Linux distributions. Any *getty that will handle a hard wired serial terminal will do.
To add the agetty as a permanent service add the following line to your /etc/inittab file:
S0:123:respawn:/sbin/agetty -w -h 115200 ttyS0 xterm
|
ttyS0 is COM1:, if you are using COM2: use ttyS1 instead.
Use the useradd command to add your new "ppp" user:
useradd -d /home/ppp -s /usr/sbin/pppd ppp
|
The -s option connects this user directly to a new ppp daemon without a shell. As ppp has its own authentication system its not really necessary to add a password for this user. If you dont like this by all means add one and remember to add it in to the EPOC device dial in script - see below.
The /home/ppp/.ppprc file contains the settings for the pppd run by user ppp. You will need to create it. Its contents are as follows for a hard wired link to a Psion.
crtscts
|
Replace localip remoteip and dnsip with suitable ip addresses for your network.
Remember to set the file permissions so it can be read by user "ppp".
Sitewide pppd options are specified in /etc/ppp/options. Its worth a check that there is nothing in that which may conflict with .ppprc.
The /etc/ppp/pap-secrets file contains the authentication information required for the ppp link. You will need to add the following line to it
ppp hostname "password" localip
|
Replace hostname with the Linux box host name.
Replace password with a suitable password for your ppp link.
Replace localip with the localip ip address from /home/ppp/.ppprc above.
Select the Internet option on the control panel.
Press "New" to create a new service.
Select "Settings from file" in the "Based upon" option.
Select the linuxppp.isp file installed by the lpdclient SIS file.
Press "OK".
The new internet service dialog box will appear. Make the following entries in the "Account"
Tab:
Press "Done".
If you decided that you wanted ppp to have a login password as well as a pap password you will need to modify the script on the login tab.
When using this Internet Service select the "Direct cable connection" modem.