我有一个激光切割器通过通用USB连接到并行适配器。激光切割机说的是HPGL,因为这是激光切割机而不是绘图仪,所以我通常想自己生成HPGL,因为我关心切割的顺序、速度和方向等等。
在Ubuntu的早期版本中,我可以通过将HPGL文件直接复制到相应的USB "lp“设备,将其打印到切割机上。例如:
cp foo.plt /dev/usblp1
嗯,我刚刚升级到Ubuntu11.10 oneiric,我在/dev中找不到任何"lp“设备。哦哦!
向Ubuntu中的并行口发送原始数据的首选方法是什么?我尝试过Settings > print >+ Add,希望我的设备能够与某种“原始打印机”驱动程序相关联,并使用以下命令进行打印
lp -d LaserCutter foo.plt
但是我的USB到并行适配器似乎没有出现在列表中。我看到的是我的HP彩色LaserJet,两个USB到串行适配器,“输入URI”和“网络打印机”。
同时,在/dev中,我确实看到了/dev/ttyUSB1 0和/dev/ttyUSB1 1设备,用于2 USB到串行适配器。我看不出与惠普打印机(升级之前是/dev/usblp0 0)有什么明显的对应之处,除了普通的USB。例如,sudo find /dev | grep lp
不产生任何输出。不过,我似乎确实能够在惠普打印机上打印得很好。打印机设置GUI为它提供了一个以"hp:“开头的设备URI,这对并行适配器没有多大帮助。
CUPS管理员指南使它听起来像是我需要将表单parallel:/dev/SOMETHING
的设备URI提供给它,但是当然,如果我有一个/dev/SOMETHING
,我可能会继续直接写入它。
在我从USB端口断开并重新连接设备后,dmesg
这样说:
[ 924.722906] usb 1-1.1.4: USB disconnect, device number 7
[ 959.993002] usb 1-1.1.4: new full speed USB device number 8 using ehci_hcd
下面是它在lsusb -v中的表现方式:
Bus 001 Device 008: ID 1a86:7584 QinHeng Electronics CH340S
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1a86 QinHeng Electronics
idProduct 0x7584 CH340S
bcdDevice 2.52
iManufacturer 0
iProduct 2 USB2.0-Print
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 96mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 7 Printer
bInterfaceSubClass 1 Printer
bInterfaceProtocol 2 Bidirectional
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
发布于 2011-11-20 00:06:12
您要查找的/dev/usb/lpX
设备文件由usblp
驱动程序提供。但在Ubuntu11.10中,这个司机似乎被列入了黑名单。请参阅/etc/modprobe.d/blacklist-cups-usblp.conf
文件:
# cups talks to the raw USB devices, so we need to blacklist usblp to avoid
# grabbing them
blacklist usblp
如果您仍然希望直接向设备发送数据,则可以使用modprobe usblp
临时加载驱动程序(黑名单只会阻止驱动程序自动加载)。完成之后,您可以使用modprobe -r usblp
卸载它。
https://askubuntu.com/questions/80879
复制相似问题