USB printer on embeded linux

Jan 28, 2008 2 Replies

Dear all, I want to transplant the programs to embeded linux on S3C2410 arm platform,but the original filesystem have no "usb/lp0" node,so I make a node using:



#mknod /dev/usb/lp0 c 180 0



In kernel config I set "usb printer" option on,so how can I opration the printer? just use open,write? how can I know the commands to drive the printer? I'm not sure there's drivers in linux kernel or not,but I can use it on redhat linux 9.The printer is HP laserjet 1300. Anyone help me? Best regards!


Printer drivers in linux are done in user space. Check out

formatting link
for one way to do it.

Thank you! But I don't know how to transplant CUPS to a embeded linux based on limited resource. When I plug the USB printer to the platform, kernel prints:

#ash-2.04# hub.c: USB new device connect on bus1/1, assigned device number 2 printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0

Do this means the driver is already exist? For a test, I typed these commands:

#touch test.txt #echo "Hello boys!" > test.txt #cat test.txt > /dev/usb/lp0

but that's no effect, nothing printed. So, anyone who knows how to do this help me?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required