USB Parallel port on host - cannot get it to work on guest

Discussions about using Linux guests in VirtualBox.
Post Reply
RC54
Posts: 1
Joined: 7. Nov 2018, 01:47

USB Parallel port on host - cannot get it to work on guest

Post by RC54 »

I have a Prolific Technology USB to parallel adapter on my host (Linux Mint 19) computer. VendorID 0x067b, ProductID 0x2305. Guest is also Linux Mint, but 18.3

First hurdle was getting this to pass through to the guest. All my attempts to do so failed, including making sure I was in the vboxusers group and logging out and back in (and verifying that I was in the vboxusers group). Nothing worked.

I'd like to fix that, but for now I've switched to running the guest from Root user (BAD, yes, but at least I can see the stupid USB to Parallel converter on the guest now! Originally when I went to look under usb devices nothing showed up. In fact, using VBoxManage list usbhost gave me an empty list unless I ran as root.)

The problem that i want to address here is, while the device is SEEN in the guest, after hacking around with udev rules I managed to get it to be seen as a device, and I called it parport0, but it has major 189, which means usb serial if I've decoded it right. In addition, it doesn't work as a parallel port - writing to it does nothing useful.

Here's the udev rule:

SUBSYTEMS=="usb",ATTRS{idVencdor}=="o67b",ATTRS{idProduct}=="2305",SYMLINK+="parport0",MODE='0660",GROUP="engineer"

Here's what I think are the only 'interesting' syslog entries from the guest:

Nov 6 15:44:24 quigon3 kernel: [ 1.808954] usb 1-1: New USB device found, idVendor=067b, idProduct=2305
Nov 6 15:44:24 quigon3 kernel: [ 1.808957] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 6 15:44:24 quigon3 kernel: [ 1.808959] usb 1-1: Product: IEEE-1284 Controller
Nov 6 15:44:24 quigon3 kernel: [ 1.808961] usb 1-1: Manufacturer: Prはlific Technology Inc.
...
Nov 6 15:44:25 quigon3 systemd[1]: udev-configure-printer@-devices-pci0000:00-0000:00:06.0-usb1-1\x2d1.service: Unit entered failed state.
Nov 6 15:44:25 quigon3 systemd[1]: udev-configure-printer@-devices-pci0000:00-0000:00:06.0-usb1-1\x2d1.service: Failed with result 'exit-code'.

I need it to work, so that writing hex ff to it results in the parallel port getting ff (or maybe 00, whichever is fine, I can invert). I'm currently assuming this is because the major device value is 189, but I could be wrong there.

Any ideas on how to get the device configured as /dev/parport0 with the correct major/minor device values?
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: USB Parallel port on host - cannot get it to work on guest

Post by andyp73 »

Buried deep in the user manual are some commands that will setup a virtual parallel port in your guest which can be mapped to the USB device on the host. Details can be found in Enabling and Configuring Parallel (LPTx) Ports.

If you do have to stick with passing the USB device through to the guest then the device major number should be 6 for a parallel printer device (/dev/lp0) or 99 for a raw parallel port (/dev/parport0)

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
Post Reply