Hi,
I connected an usb printer port to my linux computer. After experimenting on an other computer with a 'normal' printer port, I wanted to try to extend the amount of I/O's using the usb solution.
The default address of the printer port is 0x378 (or 0x278 on some computers). Yes this is the old parallel port and it still works.
But my new computer doesn't have a parallel port. So I bought the usb printer/parallel port.
But now I have to find the address. Let's look at dmesg:
Code:
usb 1-3: new full speed USB device using ohci_hcd and address 3
usb 1-3: configuration #1 chosen from 1 choice
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Hmm, 0x067B is the vid (Vendor ID) and 0x2305 is the pid (Product ID).
OK, let's look at lsusb -v:
Code:
Bus 001 Device 003: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x067b Prolific Technology, Inc.
idProduct 0x2305 PL2305 Parallel Port
bcdDevice 2.02
iManufacturer 1 Prolific Technology Inc.
iProduct 2 IEEE-1284 Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 78
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 7 Printer
bInterfaceSubClass 1 Printer
bInterfaceProtocol 1 Unidirectional
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 7 Printer
bInterfaceSubClass 1 Printer
bInterfaceProtocol 2 Bidirectional
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
Hmm, a lot of info, but still no address.
Maybe:
Code:
cat /proc/ioports
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
03c0-03df : vesafb
03f6-03f6 : ide0
0cf8-0cff : PCI conf1
1000-101f : 0000:00:0f.0
6000-6007 : 0000:00:0f.0
6100-61ff : 0000:00:0f.0
6200-623f : 0000:00:0f.0
9c00-9c3f : 0000:00:0f.0
9c00-9c03 : ACPI PM1a_EVT_BLK
9c0c-9c0d : ACPI PM2_CNT_BLK
9c10-9c13 : ACPI PM_TMR
9c18-9c1f : ACPI GPE0_BLK
9c28-9c29 : ACPI PM1a_CNT_BLK
9d00-9d7f : 0000:00:0f.0
9e00-9e07 : 0000:00:01.0
ac1c-ac1f : 0000:00:01.0
fc00-fcff : 0000:00:0d.0
fc00-fcff : 8139too
fe00-fe7f : 0000:00:0f.3
fe00-fe7f : CS5535 Audio
ff00-ff0f : 0000:00:0f.2
ff00-ff07 : ide0
But no luck at all. I can't seem to find the address.
Program I used on the classic port:
http://tldp.org/HOWTO/IO-Port-Programming-9.html
If it's not possible to directly address the parallel port, I would like to receive some tips or a workaround.