in reply to use Perl With usblp Parallel Adapter

I might be telling you the obvious... but have you checked that you actually have access to the device?  Which user are you running this as?  Can you send stuff to the device from the commandline (e.g. "echo foo >/dev/usb/lp0")?

For example, on my machine (Ubuntu), the /dev/usb/lp0  is being created as  (for example when I plugin my printer):

$ ls -l /dev/usb/lp0 crw-rw---- 1 root lp 180, 0 2009-10-03 13:35 /dev/usb/lp0

but I'm not in group lp (by default), so I cannot access the device as my regular user. This is on purpose, because I'm not supposed to access the device directly, but rather go via the appropriate printing machinery, such as cupsd and friends.

Replies are listed 'Best First'.
Re^2: use Perl With usblp Parallel Adapter
by Morzilla (Novice) on Oct 03, 2009 at 13:04 UTC
    Thank you for the answer. Yes, I'm root on the machine where I run the script. This is the permissions of the special character device /dev/usb/lp0:
    crw-rw---- 1 root lp 180, 0 Oct 3 13:14 /dev/usb/lp0
    and yes, I can write into the device
    pbx:/usr/local/share/router# echo "test" > /dev/usb/lp0 pbx:/usr/local/share/router#
    I'm using Debian Lenny. Thank you again.