Does the Linux ieee1284 library work with USB parallel port adapters?

407 views Asked by At

I'd like to do bidirectional IEEE 1284 communication between a PC running Linux and external devices. Receiving data from the device doesn't have to be particularly fast; nibble mode would be fine.

The PC I'm currently using is a modern small form factor PC, a Livia Z N4200, which as far as I know has no traditional PC parallel ports on it. (There are certainly no connectors for a parallel port, just USB, Ethernet, and video and audio output.) It's running Debian 9.

I've written a simple program to call ieee1284_find_ports() and print the information in the resulting struct parport_list. The function returns 0 (success) and fills the struct with information about three ports:

ieee1284_find_ports=0
portc=3
  name=0x278 base=278 hibase=0 filename=/dev/port
  name=0x378 base=378 hibase=0 filename=/dev/port
  name=0x3bc base=3bc hibase=0 filename=/dev/port

This seems odd because my machine has no parallel ports, as far as I know.

When I plug in a cheap USB to IEEE 1284 parallel port adapter (this one) with no device plugged into the parallel I/O connector, /dev/usb/lp1 appears and I see the following in my kernel log:

usb 1-4: new full-speed USB device number 11 using xhci_hcd
usb 1-4: New USB device found, idVendor=1a86, idProduct=7584
usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 1-4: Product: USB2.0-Print 
usblp 1-4:1.0: usblp1: USB Bidirectional printer dev 11 if 0 alt 1 proto 2 vid 0x1A86 pid 0x7584
usbcore: registered new interface driver usblp

However, re-running my program still produces the same results shown above.

Is the ieee1284 library the correct one to use if I want to use this USB parallel port adapter, or should I be using something else?

Also, why might I be seeing those three more traditional-looking parallel port devices when I query with ieee1284_find_ports()?

0

There are 0 answers