Apr 7 14:45:50 lapfrost kernel: [ 1476.746966] usb 4-1: new full
speed USB device using uhci_hcd and address 3
Apr 7 14:45:50 lapfrost kernel: [ 1476.896270] usb 4-1: configuration
#1 chosen from 1 choice
Apr 7 14:45:50 lapfrost kernel: [ 1476.938188] usblp0: USB
Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x4348 pid 0x5584
With standard parallel ports I can access the IO lines with inb/outb
and a base address.
How do I achieve this with the USB-to-parallel cable? Are there calls
to the usblp subsystem then I can make to get direct access to the IO
lines?
I've had a look through the kernel source, which mentions
usblp_open(), the usblp struct etc - but I'm not sure how to call
these.
Any suggestions or (even better) examples would be appreciated.
Many thanks in advance.
| I have a USB-to-Parallel cable which successfully shows up as /dev/
| usblp0 under Ubuntu:
|
| Apr 7 14:45:50 lapfrost kernel: [ 1476.746966] usb 4-1: new full
| speed USB device using uhci_hcd and address 3
| Apr 7 14:45:50 lapfrost kernel: [ 1476.896270] usb 4-1: configuration
| #1 chosen from 1 choice
| Apr 7 14:45:50 lapfrost kernel: [ 1476.938188] usblp0: USB
| Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x4348 pid 0x5584
|
| With standard parallel ports I can access the IO lines with inb/outb
| and a base address.
How did you do inb/outb to a /dev/ based device for the original parallel
port? Or are you referring to inb/outb in the context of the parallel port
driver?
| How do I achieve this with the USB-to-parallel cable? Are there calls
| to the usblp subsystem then I can make to get direct access to the IO
| lines?
|
| I've had a look through the kernel source, which mentions
| usblp_open(), the usblp struct etc - but I'm not sure how to call
| these.
|
| Any suggestions or (even better) examples would be appreciated.
If you have done I/O to the /dev/ entry for the original parallel port,
have you tried doing things the same way for the USB based one using the
/dev/ entry you get for that?
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-200...@ipal.net |
|------------------------------------/-------------------------------------|
> I have a USB-to-Parallel cable which successfully shows up as /dev/
> usblp0 under Ubuntu:
>
> Apr 7 14:45:50 lapfrost kernel: [ 1476.746966] usb 4-1: new full
> speed USB device using uhci_hcd and address 3
> Apr 7 14:45:50 lapfrost kernel: [ 1476.896270] usb 4-1: configuration
> #1 chosen from 1 choice
> Apr 7 14:45:50 lapfrost kernel: [ 1476.938188] usblp0: USB
> Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x4348 pid 0x5584
>
> With standard parallel ports I can access the IO lines with inb/outb
> and a base address.
That isn't portable.
> How do I achieve this with the USB-to-parallel cable?
Many USB to parallel adapter can only use the printer protocols. You need to
use a suitable cable and driver, Linux has a driver for the Lucent
Technologies USS-720 chip.
Use the standard user mode parallel port interface, see:
http://people.redhat.com/twaugh/parport/html/x916.html
> Are there calls
> to the usblp subsystem then I can make to get direct access to the IO
> lines?
No, the concept does not exist in the USB printer protocol.
> Any suggestions or (even better) examples would be appreciated.
It will be slow, consider running (part of) the program in a microcontroller
or obtaining a PCI parallel port.
Kind regards
Jan