Pages: [1]   Go Down
Author Topic: Interfacing Mega ADK with HP usb printers  (Read 1286 times)
0 Members and 1 Guest are viewing this topic.
IIT Delhi, India
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

guys I was wondering if Hp usb controlled printers can be interfaced using mega ADK.
I know that we can use PCL5 for communicating with the hp printers...can it be implemented in arduino?
if someone has done something similar then please help me out with this.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 616
Posts: 49452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A USB printer is a USB slave device. An Arduino is a USB slave device. Two slaves can not talk to each other. You need a USB master/host.

Fortunately, there is a USB Host shield available for the Arduino. Unfortunately, writing a driver for the printer(s) is not a trivial task.
Logged

IIT Delhi, India
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there any way of sending PCL commands to my printer using USB host included in arduino_adk....
can someone please attach a sample code of arduino_adk that uses usb host ?
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 616
Posts: 49452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'd like someone to develop a generic USB driver for any HP printer, that fits on an Arduino with USB Host shield, and still leaves room for my sketch.

Is that what you are asking?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A USB printer is a USB slave device. An Arduino is a USB slave device. Two slaves can not talk to each other. You need a USB master/host.

Fortunately, there is a USB Host shield available for the Arduino. Unfortunately, writing a driver for the printer(s) is not a trivial task.

Paul, the new Arduino ADK board is a 2560 based board with an on-board USB host chip, so a USB host shield would not be required. However as you said developing the nessessary software to interface with a HP printer is indeed not a trivial task, unless the HP printers will respond to some very basic HID type drivers that should be avalible for this chip.

 http://arduino.cc/en/Main/ArduinoBoardADK

Lefty
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The original HP printers had a serial port that accepted ASCII (subset of HP-PCL  printer control Language). It is a pity that interface has gone...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

IIT Delhi, India
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually I haven't used the new arduino adk board, so I am not familiar with sending commands via the usb host controller embedded on the board...maybe using this host I can then send some basic commands to the printer...?
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 616
Posts: 49452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your going to need to quit beating around the bush and identify, at a minimum WHICH printer you are talking about.

Even then, it is not all that likely that you will be able to do something as simple as Serial.print() to send it data.
Logged

IIT Delhi, India
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am intending to use LaserJet P4015x printer.
Logged

East Coast USA
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Hands in the air!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If the printer has a Parallel Port, you can use that to print with an Arduino. I have some code that does this.
cheers
Logged

Build your own sentry gun! http://psg.rudolphlabs.com

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Only if you want the most out of your printer you need to know the type. If a printer supports PCL you can do several things as most commands are upwards compatible.
OK every printer has some features not supported on others but if you want just print text or an image that is possible with PCL.

PCL is not too difficult, see - http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl02705 - most commands are sending a few byte codes to switch internal modi.

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Office meets Adruino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

the 4015n?

HP PCL 6, HP PCL 5e, HP postscript level 3 emulation, direct PDF (v 1.4) printing (with at least 128 MB printer memory)


I am not sure about the USB port or if it would work. you can send PCL commands to port 9100 and they will print over a network though. I never got real robust or even finished my project but I have got characters to print or sentences.
Logged

Pages: [1]   Go Up
Jump to: