Hi, Bryan,

because I am fiddling with similar questions.
(Can’t compete anywhere near to the proficient replies of Eric and Frantisek 
though!)

If using a USB keyboard (and USB mouse), there is the problem that when 
starting the USB driver (USBUHCI from Bret Johnsons USButils collection), the 
Keyboard stops working. So you can’t start the keyboard driver next, which 
seems should done to get somewhere. Mr. Johnson was kindly replying to my 
inquiry on this. 
So my approach at the moment ist using a PS/2 Keyboard and Mouse to avoid this 
problem. („Hardware solution“)

As Eric ed. al. are pointing out, I have to agree that USB isn’t at all what I 
thought it was: neither „Universal“ in the sense of „easy“ nor „universal 
including DOS".
On my ITX with a recent Bios. that Bios lets me use USB mouse and keyboard 
nicely right from booting, also a trackpad with no problem. So it also seems to 
be much a question what the inbuilt BIOS supports.

Regarding printing I think there are two basic concepts: 
Using fonts from the printer (I call this „generic“, but maybe this is my 
private lingo)
or using graphics from the computer. 
As I am only interested in printing out pure text (A-Z, 1-0  :)  I wonder if 
you attempt to print out graphics or some special fonts or so?
Might make a difference, too?

I also had tried printing using the Centronics cable/port. Thanks to Eric for 
COPY x.txt PRN
or 
COPY x.pdf LPT1


I will try again ;)

Just a user experience… 
regards, 
Th.

> Am 20.04.2021 um 16:37 schrieb Frantisek Rysanek <frantisek.rysa...@post.cz>:
> 
> Dear Mr. Kilgallin,
> 
> your request is less obvious than may have initially seemd to you.
> 
> DOS knows an OS-level "device" called LPT1. And, most software for 
> DOS that needs to print, can use this software-level LPT1 device 
> (using a DOS service to print).
> 
> DOS and BIOS work together to forward data from LPT1 to the physical 
> parallel port (i8255 compatible hardware, if my memory serves).
> To this day, most PC's still contain SuperIO chips (on LPC bus, 
> backward compatible with ISA) that still have the ability to 
> implement the LPT, but few modern motherboards actually have a 
> physical LPT... (and therefore the SuperIO chips aren't even 
> configured to decode the addresses anymore, 0x378 and whatnot. No 
> use.)
> But, yours is a different problem: your printer does not even have 
> LPT "input". You really do need to somehow spoonfeed the data into 
> the USB port. 
> Technically, a USB printer shows up on the USB bus as a "USB LPT 
> device", or "USBLP". The USB standard has a "device class" for this, 
> and modern operating systems have a generic class-based driver for 
> this... which is not the case of MS-DOS.
> 
> Effectively, you need a stack of USB drivers for DOS, that will make 
> use of a USB host controller (UHCI / EHCI / XHCI), enumerate the bus, 
> and upon encountering a USBLP device, load a generic class-based 
> driver for that device. Presenting a legacy LPT1 software device in 
> MS-DOS, and feeding the data to the USB LPT physical port.
> 
> To the best of my knowledge, there's a single driver package of this 
> kind that I know about, working on bare metal in pure old DOS - the 
> one by Bret Johnson:
> http://bretjohnson.us/
> 
> More prose about USB printing in DOS:
> https://www.wpuniverse.com/vb/showthread.php?38551-Print-to-USB-printe
> r-in-pure-MS-DOS-system/page2&s=8f49961ada033bce8d27f50b29967cd1
> 
> Bret Johnson's driver only supports UHCI controllers, which were only 
> included in the PC chipsets up to and including Intel 4x series 
> (coming with the 45nm Core2 generation of CPU's). After that, it's 
> pure USB EHCI 2.0 only. Until about Skylake, which is USB 3.0 XHCI 
> only...
> 
> Apparently, you are lucky, because the OptiPlex GX270 appears to be a 
> Pentium 4 generation PC. Already supporting USB 2.0 and having an 
> EHCI, but in addition to that, all the USB ports are also available 
> via an UHCI (USB 1.1 controller). So I suggest that you give Brett's 
> driver a try.
> 
> An alternative approach might be, to attach the USB printer to a 
> Windows PC and share the printer on the network, and install a 
> Microsoft Network client for MS-DOS on your DOS-only PC, and map the 
> LPT1 over the network to your Windows PC. This LPT mapping is done 
> using the "net use" command. But, you need to be able to configure 
> the networking stuff, preferably over TCP/IP nowadays. Note that 
> making the MS Network client from the DOS era talk to a modern 
> Windows machine in the server role can be a challenge in itself. If 
> you're lucky, you can learn about registry entries that dumb down the 
> security mechanisms in Windows enough to accept the shitty ancient 
> security model used by the DOS client... I don't promise that this 
> still has a chance of success in Windows 10. I believe it does have a 
> chance against Samba in Linux, which I'm still using to serv8e 
> PXE-booted diskless clients (for disk mapping, not for printing, but 
> the auth is the same I guess).
> 
> Your printer apparently also supports network printing: via IPP (too 
> modern), JetDirect style raw TCP port 9100, and UNIX standard LPR.
> Unfortunately, it does not contain a Microsoft Network stack 
> (samba/CIFS) so you cannot map the printer directly by "net use ..."
> 
> I've found hints that Xerox or Sun used to have an implementation of 
> the command-line LPR client for MS-DOS:
> http://download.support.xerox.com/pub/docs/DC240_DC250/userdocs/any-os
> /en/Using_lpr_Utilities_for_DOS_and_Unix.pdf
> ...apparently dependent on some "very own" TCP/IP stack for DOS, and 
> not hooking LPT1 = you could print from your software into a file and 
> then copy that file to the network printer using the LPR utility.
> 
> I haven't found any resident driver for pure MS-DOS to capture LPT1 
> and print to LPR or even just JetDirect (raw TCP port).
> 
> How about using a Raspberry PI to build a Samba printserver for your 
> USB/LAN-attached printer? :-D
> 
> Or, if you resort to running your DOS software in Windows or even 
> some kind of DOS PC emulator on any modern OS, your goal to forward 
> jobs from LPT1 to any miscellaneous printer would be much easier to 
> achieve. If all else fails, there is commercial software for Windows 
> to help you with that.
> 
> 
> So... suppose that you've built a path for your data from the LPT1 
> abstraction to your actual USBLP printer.
> The next question is: print job format. The printer language. Looking 
> into the docs of your printer, it's new enough to support "laserjet 
> emulation" (read: HP PCL at some older version) and apparently 
> PostScript as well :-) This sounds good. Don't expect the printer to 
> print a plain ASCII file for you - but if you can produce or copy a 
> PCL or PostScript formatted print job to LPT1, you're good to go.
> 
> So if your software can produce HP PCL (methinks at the level of 
> LaserJet III or some such) or any kind of ancient PostScript, you 
> should be able to print some stuff to your printer. I would be 
> surprised if your DOS software could produce color PCL or color 
> PostScript, because PCL printers in the early nineties did not 
> support color, and PS was the DTP snob end / UNIX toy at that time... 
> but you should get some black and white output from WordPerfect or 
> some such. Pretty much any software with print output, made in early 
> nineties, should have an option to print to an HP LaserJet.
> 
> I know that my response is not step by step straightforward. 
> Apologies. There are too many variables, I have never trodden the 
> whole path, namely USB printing. See for yourself if you can make it 
> work. You have my respect for playing with this classic stuff :-)
> 
> Frank
> 
> 
> On 20 Apr 2021 at 22:36, Bryan Kilgallin wrote:
> 
>> I have just connected my Brother HL-3150CDN laser printer to my Dell
>> OptiPlex GX270. I made a test text document, and I tried just to print
>> it. That didn't work, but I noticed the following advice:
>> "Device to direct Print [PRN=0]".
>> What do I need to do?
>> -- 
>> members.iinet.net.au/~kilgallin/
>> 
>> 
>> _______________________________________________
>> Freedos-user mailing list
>> Freedos-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freedos-user
> 
> 
> 
> 
> _______________________________________________
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
> 

_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to