IIT Delhi, India
Offline
Newbie
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
|
 |
« on: August 08, 2011, 03:13:18 am » |
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
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #1 on: August 08, 2011, 05:20:28 am » |
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
Newbie
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
|
 |
« Reply #2 on: August 10, 2011, 10:33:58 am » |
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
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #3 on: August 10, 2011, 10:46:46 am » |
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)
Online
Brattain Member
Karma: 279
Posts: 15312
Measurement changes behavior
|
 |
« Reply #4 on: August 10, 2011, 11:39:31 am » |
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/ArduinoBoardADKLefty
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 87
Posts: 9371
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #5 on: August 10, 2011, 01:16:52 pm » |
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
|
|
|
|
|
IIT Delhi, India
Offline
Newbie
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
|
 |
« Reply #6 on: August 11, 2011, 03:33:54 am » |
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
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #7 on: August 11, 2011, 05:04:13 am » |
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
Newbie
Karma: 0
Posts: 4
Indian Institute Of Technology Btech Student
|
 |
« Reply #8 on: August 11, 2011, 02:04:30 pm » |
I am intending to use LaserJet P4015x printer.
|
|
|
|
|
Logged
|
|
|
|
|
East Coast USA
Offline
Newbie
Karma: 0
Posts: 16
Hands in the air!
|
 |
« Reply #9 on: October 08, 2011, 05:22:31 pm » |
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
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 87
Posts: 9371
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #10 on: October 09, 2011, 05:48:21 am » |
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
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 209
Office meets Adruino
|
 |
« Reply #11 on: October 09, 2011, 04:51:16 pm » |
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
|
|
|
|
|
|