Score:0

Printer driver not working

cn flag

I'm trying to install the Datacard SP35 card printer drivers, the process to install them are these (the files to copy are from here):

/etc/init.d/cups stop
cp ./install/driver/datacard.ppd /usr/share/cups/model
cp ./install/driver/opd.convs /etc/cups
cp ./install/driver/opd.types /etc/cups
cp ./install/driver/rastertohif /usr/lib/cups/filter
cp ./install/driver/hifspooler /usr/lib/cups/filter
cp ./install/api/opdd /etc/init.d/
cp ./install/api/opdapid /usr/sbin/
cp ./install/api/opdhifd /usr/sbin/
/etc/init.d/cups start

Then I go to localhost:631 and add a printer with the driver

Then (from the manual):

1 Open the opdd file in the editor.

2 Save the file as opdd.[printername] where [printername] in the name assigned using the CUPS Browser interface.

3 Remove the comment (#) from the following lines: HIF_PORT=59100 API_PORT=59101

4 If this is the first card printer, use the default ports as shown above.

5 Choose the appropriate connection type and remove the comment (#) from one of the following lines: DEVICE_URI=”usb:[serial_number]” DEVICE_URI=”usb:[printer_device_path]” DEVICE_URI=”socket://[printer_ip_addr]:9100” For a printer connected using a USB cable, the “usb:[serial_number]” format is recommended. See "More about USB installation" for details.

6 Provide the correct value for the port, represented by the name in brackets [ ].

7 Save and close the file.

8 Set permissions for the file, so it can be run by printer users. For a printer named card_printer_1 on SUSE, a sample command is: chmod 755 opdd.card_printer_1

9 Start the bidirectional service. For a printer named card_printer_1 on SUSE, a sample command is:

/etc/init.d/opdd.card_printer_1 start

And here's the problem, when I run /etc/init.d/opdd.card_printer_1 start it gives me:

Starting opdd for usb:DA99262 ports 59100 59101: Failure

Unable to launch HIF daemon, see /var/log/opdhifd.59100.log for more information
Unable to launch API daemon, see /var/log/opdapid.59101.log for more information

nano /var/log/opdhifd.59100.log gives me:

/usr/sbin/opdhifd: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

and nano /var/log/opdapid.59101.log gives me:

/usr/sbin/opdapid: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

I installed libusb but it doesn't change anything. I'm stuck, I need help

Edit:

Version of libusb (using apt-cache search libusb)

libusb-0.1-4
libusb-1.0-0

apt-file search libusb-0.1.so.4 gives me:

libusb-0.1-4: /lib/x86_64-linux-gnu/libusb-0.1.so.4
libusb-0.1-4: /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4

Edit 2:

I tried to copy /lib/x86_64-linux-gnu/libusb-0.1.so.4 into /usr/sbin/opdhifd and when I run /etc/init.d/opdd.Datacard-sp35 start it's the same error, but if I run nano /var/log/opdhifd.59100.log it has changed, now it says:

/etc/init.d/opdd.Datacard-sp35: line 55: /usr/sbin/opdhifd: Permission denied

So I do chmod 775 opdd.Datacard-sp35 but still doesn't work

Edit 3:

I solved the "permission denied" error with chmod 777 opdhifd and I copied libusb into opdapid too and set the correct permissions, but now I have another error when I run /etc/init.d/opdd.Datacard-sp35 start:

Starting opdd for usb:DA99262 ports 59100 59101: /etc/init.d/opdd.Datacard-sp35: riga 32: 11857 Errore di segmentazione (core dump creato) /usr/sbin/opdhifd $HIF_PORT $LOCAL_SOCKPATH $DEVICE_URI $HIF_PIDFILE 1>&$HIF_LOGFILE
/etc/init.d/opdd.Datacard-sp35: riga 32: 11859 Errore di segmentazione (core dump creato) /usr/sbin/opdapid $API_PORT $LOCAL_SOCKPATH $API_PIDFILE 1>&$API_LOGFILE
Failure

    Unable to launch HIF daemon, see /var/log/opdhifd.59100.log for more information
    Unable to launch API daemon, see /var/log/opdapid.59101.log for more information

Both /var/log/opdapid.59101.log and /var/log/opdhifd.59100.log are empty.

Knud Larsen avatar
by flag
»»I installed libusb«« : `apt-cache search libusb` would have shown libusb versions. And `apt-file search libusb-0.1.so.4` will reply package name = *libusb-0.1-4* https://packages.ubuntu.com/search?mode=filename&suite=bionic&section=all&arch=amd64&keywords=libusb-0.1.so.4&searchon=contents
LiberoCarli avatar
cn flag
@KnudLarsen I edited the post with the output of your commands
Knud Larsen avatar
by flag
Well, then please install the package : `sudo apt install libusb-0.1-4`
Score:0
ga flag

If your running 64bit, you need to add the i386 arch.

For Devuan/Debian and probably ubuntu do: sudo dpkg --add-architecture <arch>

then you can install dependent libraries like libcups by adding the suffix ":i386" to the apt install command for the packages needed.

There is more work to do with modifying the ppd for the datacard printer to correctly process according to cups pdf based jobs (instead of postscript when the datacard printer drivers were written).

I'm very close now just needing to solve an output spooler file issue.

David avatar
cn flag
This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://askubuntu.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://askubuntu.com/help/whats-reputation), you can also [add a bounty](https://askubuntu.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/1288198)
LiberoCarli avatar
cn flag
Hello, I abandoned it for over a year but I am trying again, i added the i386 arch and installed cups, ghostscript, and libusb, but i still get the same error, have you found a way?
Score:0
us flag

pstoraster no longer exists. Create a symlink to gstoraster. That should resolve at least one of your issues.

My issue is that the rastertohif is failing due to a "file too large" issue.

My Datacard SP75 Plus is connected to Ubuntu 21.10 / CUPS via USB cable. I set it up with the serial number option in the manual. Not printing yet, but closer.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.