Tried it with ESCUtil off Aminet (although i'm not sure, if it's able to talk to the usbprinter.device and it didn't work...still blaming the printer :-/
Hi I'm trying to get a Epson Stylus C88+ to work. < EHandler = L:Port-Handler Priority = 5 StackSize = 2000 GlobVec = -1 Device = printer.device Unit = 0 Flags = 0 Control = "PAR" < You want a 'usbprinter.device' !
From Scabit's messages at AmigaWorld:
1) Make a copy of the PRT: device and icon found in DEVS:DOSDrivers and rename them to USBPRT ... 2) Edit the USBPRT driver so that device = usbprinter.device and save... 3) Go to prefs/printers and set up your printer prefs by selecting your proper printer and then changing the port device to usbprinter.device. Set the unit name box at the top to USBPRT: be sure to have the ":". Save
New Shell process 7 7.OS4:> echo to usbprt: "test"
Doesn't do anything! Even Sys:Prefs/Printer 'TEST' doesn't do anything. I can't even get error.
Some of my messages at Yahoo Groups: amiga OS4 28377 28401 28420
1) Make a copy of the PRT: device and icon found in DEVS:DOSDrivers and rename them to USBPRT ... 2) Edit the USBPRT driver so that device = usbprinter.device and save... 3) Go to prefs/printers and set up your printer prefs by selecting your proper printer and then changing the port device to usbprinter.device. Set the unit name box at the top to USBPRT: be sure to have the ":". Save
Doesn't do anything! Even Sys:Prefs/Printer 'TEST' doesn't do anything. I can't even get error.
From TetiSoft's (one of the OS4 devs) message (#7)
> 2) Change the PRT file to indicate "device = usbprinter.device"
DONT DO THAT. It will succesfully break all existing programs which send control codes to PRT: because usbprinter.device can NOT be used as replacement for printer.device.
> You wrote "Have you looked in at the documentation that is on the OS4Final CD," > Yes...I have. It is very small....but nontheless it turns out to be all I really need.
Then READ IT AGAIN. Especially this part: ----snip---- After installation your printing system must be set to use usbprinter.device as transport layer rather than e.g. a1parallel.device or a1serial.device. This is done using the AmigaOS Printer preferences program. ----snip----
This part doesnt say that you shall hack the PRT mountlist. Please re-install the original PRT mountlist from the CD, thanks.
Quote:
New Shell process 7 7.OS4:> echo to usbprt: "test"
Doesn't do anything! Even Sys:Prefs/Printer 'TEST' doesn't do anything. I can't even get error.
For me neither, i tried with PRT, though
I COULD use the parallel cable that came with the printer, but why should i? I want to be able to use it with USB, damn.
Modern Epson printers require an init sequence to be sent before they will respond. This sequence drops them out of a communication mode that only Epson's own drivers support (it's proprietary and they won't share the docs). After that, it will respond to whatever you send it.
Just not that we have no printer driver that supports these printers. The old EpsonColor driver will print in B&W after you've sent the init string.
To find the init string you'll have to search the web for Linux drivers for Epson printers. I can't remember what it was. If you have linux installed on your machine you can test it by printing in Linux first and then trying to print from OS4 (without reseting the printer).
The bottom line is, WE NEED NEW PRINTER DRIVERS. Turboprint offers up-to-date drivers, but it's too pricey for me (i.e., it costs more than my printer is worth).
BTW, I have my Epson connected to my A1 and use LPR from os4depot to print from my winXP laptop via the network. It prints fine.
Thanks, that clears it and brings the worst situation to live...i read about that init on the OS4 forums, they did it by first letting a Win PeeCee do the initialization and use the Epson on Amiga afterwards.
Not the way i wanna take...
About new printer drivers, yeah, i really hope there will be some, otoh, if the manufacturers don't share the docs there is no way to get them.
I presume porting Linux drivers to OS4 is impossible?*
*in more than the actual porting way (time, possibility etc.)
No need to let a win PC do the initialization. The following code will send the init code, print "Blah" at the top of the page and eject the page.
#include <stdio.h>
int main(){ FILE *printer = fopen("USBPRT:", "w+b"); if(!printer){ printf("ERROR: Could not open printer DOS device"); return 10; } fwrite("\0\0\0\033\001@EJL 1284.4\n@EJL \n\033@", 1, 29, printer); fprintf(printer, "\033@"); fprintf(printer, "blah\n"); fprintf(printer, "\014"); fprintf(printer, "\033\030R"); fprintf(printer, "\033@"); fclose(printer); return 0; }
I called my printer DOS device USBPRT:. This can be simplified to
#include <stdio.h>
int main(){ FILE *printer = fopen("USBPRT:", "w+b"); if(!printer){ printf("ERROR: Could not open printer DOS device"); return 10; } fwrite("\0\0\0\033\001@EJL 1284.4\n@EJL \n\033@", 1, 29, printer); fprintf(printer, "\033@"); fclose(printer); return 0; }
That will send the init string to the printer. After that, it will respond. I was going to have a go at writing a driver myself, but gave up. At that stage the printer drivers were all 68k, so I would have had to set up a cross-compiler. It would have taken too much time and I have other projects that have a higher priority. Maybe after they release the new SDK, and privide some nice example code, I might have another go. One of the problems is, the AmigaOS printer API is not very good. Thay didn't aim very high in terms of what it was supposed to do.
So I'm bypassing the printer device altogether. The printer driver is obviously swallowing up the control codes my little program sends and spitting somthing out.
I know that you should use "printer.device", however, all the control codes are manipulated by the specific printer driver that you've set up for that unit in the printer prefs. Seeing as you don't have a proper printer driver for your Epson printer, that's as good as useless. The printer is likely to understand many of the control codes anyway.
So I'm bypassing the printer device altogether. The printer driver is obviously swallowing up the control codes my little program sends and spitting somthing out.
printer.device uses the drivers to convert the generic printer.device sequences (check the printer.doc autodoc, CMD_WRITE) to printer specific ones, change it back to printer.device and use the aRAW sequence (\e[Pn"r with n = number of raw chars following) in front of your command.
So I'm bypassing the printer device altogether. The printer driver is obviously swallowing up the control codes my little program sends and spitting somthing out.
printer.device uses the drivers to convert the generic printer.device sequences (check the printer.doc autodoc, CMD_WRITE) to printer specific ones, change it back to printer.device and use the aRAW sequence (\e[Pn"r with n = number of raw chars following) in front of your command.
Thanks for that info. That's a better way to do it. The program listing I gave was just a quick test I did a year ago.
@all
If you're going to use this hack, I suggest you install the EpsonColor printer driver off the aminet. It will translate the control codes to Epson control sequences. It will even print graphics in black and white. It can't do colour because the control codes for colour have changed since the printers that driver was written for.
The source code for EpsonColor is available so someone with a 68k compiler could always hack it to send the init string, thus removing the need for the program I listed above. I don't have a 68k compiler set up right now so I'm waiting for an updated SDK. Printer drivers are now PowerPC native.
I can't find any info on that printer. You sure it's not an HP printer? HP usually uses the term Laserjet. If you have the OS3.5/3.9 install disks, you can always look to see if there is a driver. It should work with OS4.
If it is an HP laserjet, you might be able to find the driver. IIRC, there are more drivers for HP printers for the Amiga than Epson ones. If it is an Epson, I can't seem to find any information about it so I don't know what the printing protocol is.