[Freedos-user] Print via USB

2021-04-20 Thread Bryan Kilgallin
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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Bryan Kilgallin
I had transferred data from my DOS PC to my Linux PC via a USB-2 stick. 
But I thought that I might do something as simple as printing text, 
directly from the DOS machine.


I wrote:

I have just connected my Brother HL-3150CDN laser printer to my Dell 
OptiPlex GX270.


My printer usually receives instructions from a Linux PC via an Ethernet 
cable. But it also has a USB B  port. So I used a USB cable to connect 
that to a spare USB A port on my old DOS PC.


I made a test text document, and I tried just to print 
it.


I used the FreeDOS "print" command, unembellished.


That didn't work,


The printer did not respond.


but I noticed the following advice:


The FreeDOS PC monitor listed the following line at the end of 
information after I unsuccessfully attempted to print.



 "Device to direct Print [PRN=0]".


I expect that no data went to the printer.


What do I need to do?


Please walk me through attempting to print from FreeDOS via USB.

{Microsoft did not include USB support in MS-DOS, even though they 
actually continued to make DOS for several years after USB came out 
(mid-1990s). No version of DOS (including FreeDOS) today has native 
support for USB devices: printers, mice, keyboards, etc.


There are only two possible solutions right now if you want to print to 
a USB printer in DOS (and not under a virtual "DOS Box" of some sort).


Bret Johnson is working on DOS USB drivers, but they are not in a 
finished state yet and may not work everywhere yet (depends on hardware).}


http://wiki.freedos.org/wiki/index.php/Printer
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Frantisek Rysanek
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 

Re: [Freedos-user] Print via USB

2021-04-20 Thread Frantisek Rysanek
On 20 Apr 2021 at 16:59, Thomas Desi wrote:

> 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?

Built-in fonts are obviously an option, there's always some plain
ASCII built in, and I believe in the old DOS era there used to be...
programs that you ran before printing your jobs, that would
pre-upload font sets or national character sets into the printer, so
that your print jobs could then refer to those fonts and produce the
desired output on paper.

Epson dot matrix printers (ESC*P language) were perfectly willing to
print individual characters, a line at a time I guess. They were
(are) line printers and the ESC*P "language" is little more than an
"extension" of raw ASCII + control characters (CR, LF, FF etc)
by "escape sequences on top" - for switching fonts and maybe more
complex tasks.
I mean to say that if you copy a flat ASCII File to an Epson printer,
you get some noise and some output on paper.

Laser printer formats are page-oriented, and are not "evolved from
plain ASCII" in the way that sending a paragraph of raw ASCII text
would yield visible output on paper, even if a "formfeed" provokes
the printer to load paper and print a page (not sure if this even
works). Even in PCL, you need to provide some commands to the
printer, to place some text on the page and get it "rendered on
paper". Let alone PostScript - quite a tightly specified "well
formed" format.

Obviously you can embed bitmaps in PCL and PostScript print jobs.
Esc*P can do it too. When printing from modern software, every page
can be just a huge embedded bitmap. And, there are printers that can
*only* print bitmaps, albeit in a thin wrap of some standardized
format: think PCLm (in spite of its name, it is a gutted / stripped
down version of PDF).

Umm... getting off topic, am I...

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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Frantisek Rysanek
...just to follow up on what others have said, Bryan's printer is too 
old to support PDF, but it is a pretty decent color laser apparently, 
likely supports PCL5 in "HP emulation" mode, and something called 
"BR-script (PostScript layer 3 emulation)" which I hope gets rendered 
in the printer too, rather than using a translation layer in Windoze 
:-)
The printer accepts jobs via IPP, LPR and JetDirect, therefore I 
don't think its a stupid super-cheap GDI printer.

Some modern super-cheap printers support the PCLm first and foremost. 
Some older super-cheap printers would accept PCL3...

Frank


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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Eric Auer

Hi Thomas,

> 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.

The trick would be to write a batch file (filename loadusb.bat,
content simply the commands you want to run, one per line) and
then run the batch file (by typing "loadusb" and hitting enter)
to run all commands as one sequence. After that, you should be
able to use your keyboard and other USB things, as long as you
load Bret's USB drivers for all things you want to support :-)

> 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“)

Of course that is a possibility - if you HAVE a PS/2 keyboard
and PS/2 connectors in your system. For other people, it is not.

> As Eric et 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.

But even on the system where you try to print things, the KEYBOARD
already works with the USB support of your BIOS, so that is more or
less the same. I just say that your BIOS is unlikely to help at all
for serial or parallel (printer) port simulations or for example
for printers or external modems or similar. So you still have to
use USB drivers for USB printers.

As you already say, only EITHER the BIOS OR the DOS USB driver
can manage one USB controller. You can either tell the driver
to manage only some, but not all of your USB ports/controllers,
or you will have to load DOS USB drivers for everything and no
longer use BIOS USB support at all, as in the "loadusb.bat" way.

> 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  :) 

As explained here earlier, printers differ in what they accept
as input. Some accept plain text. Some accept PDF or Postscript.
Some accept ESC/P or other "printer languages". Some actually
do NOT accept plain text. Some do not accept any "normal" file
format: Those can ONLY print graphics, which means you must use
special drivers which turn everything into graphics first. Your
printer luckily does not have that problem. So as Frantisek said,
your chances are quite okay to use the MTCP NETCAT trick to send
a TEXT (or at least PDF) file from DOS to the printer by network.
That could actually be easier than using USB, even when this is
counterintuitive for you. Not sure which network chip your PC has?

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

That would of course be the EASIEST option as long as your PC
and your printer both still have Centronics connectivity :-)

Regards, Eric


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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Thomas Desi
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 :
> 
> 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 printi

Re: [Freedos-user] Print via USB

2021-04-20 Thread Frantisek Rysanek
On 21 Apr 2021 at 0:00, Bryan Kilgallin wrote:

> I had transferred data from my DOS PC to my Linux PC via a USB-2
> stick. But I thought that I might do something as simple as printing
> text, directly from the DOS machine.
> 
So there's another solution, one I already hinted at:

Install Samba on your Linux PC. It may take a wee bit of learning to 
configure, but it does not bite back. I can help with snippets of 
config to make it accept ancient DOS clients.

Install the Microsoft Network Client for MS-DOS. You can install this 
from scratch, or you can try using/refactoring the NetBootDisk:
https://www.netbootdisk.com/floppy/download.htm

...and then redirect the LPT device:

NET USE LPT1: \\my_samba_server\printer_queue

Actually I hope I'm not kidding here... most of the howtos mentioning 
this command are actually about doing this in a Windows command 
prompt = a more modern version of the MS Network stack... I've never 
tried this myselfs in pure DOS.

Frank


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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Ralf Quint

On 4/20/2021 7:59 AM, Thomas Desi wrote:


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“)
Using a USB keyboard (and/or mouse) is likely to work in +90% of all 
cases, as most computer BIOS support that at the hardware level, without 
the need of any USB drivers for those devices. All the computers that I 
have so far tried to install DOS on (and that have USB ports to begin 
with) are doing this just fine.


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.

see above


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?


Well, when printing from DOS, there are actually two and a half hurdles.

The first one is at the software level. Without any additional software, 
a printer being used from DOS needs to be able to receive plain text, 
with additional capabilities either through the industry standard ESC/P 
(developed by Epson, who was for a long time the leader in printers 
before laser printers started to show up, then they kind of missed the 
bus) or by being "LaserJet II" (PCL3) compatible. An additional hurdle 
is that a lot of (El Cheapo) printers these days aren't actually 
processing "text/graphics into pixel" themselves anymore, but just 
expect to get all the final pixel data from the OS, which is not a 
problem for GUI OS like Windows or macOS, but pretty much is a no-go 
when printing from DOS. Full stop.


The second one is the physical connection between the computer and the 
printer. And here's most likely where today soft brown matter hits a 
fast rotating appliance. DOS as designed only supports good old parallel 
(as in Centronics) or RS-232 type serial connections. Both of those are 
rare as hen's teeth on both newer computers and/or printers. But this 
will likely to 99.9% work right out of the box. Another possibility is 
printing on a networked printer, if that printer is accessible through 
an established network connection. Used to be a breeze back in the days 
on a Novell network, is a bit harder these days when you require SMB 
(and likely the nowadays frowned upon SMB 1.x protocol). But the whole 
networking on DOS these days is lik going down a really dark rabbit hole...
That leaves us once again with the dreaded (from the viewpoint of 
operability in DOS) USB connected printers. Finding USB drivers, given 
that the printer is software compatible with DOS as mentioned above, 
will likely be an exercise in futility. If someone has a surefire way of 
doing that (where I personally would even except non-FOSS solutions), 
specially one that wouldn't interfere with any other USB drivers, like 
for storage media, I would be happy to hear about it. And just to cover 
all bases, the "serial" in USB has absolutely nothing to with the old 
and venerable RS-232 style serial connections, it is something that is 
FAR more complex...


Ralf



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



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


Re: [Freedos-user] Print via USB

2021-04-20 Thread Frantisek Rysanek
On 20 Apr 2021 at 10:41, Ralf Quint wrote:

> dreaded (from the viewpoint of operability in DOS) USB connected
> printers. Finding USB drivers, given that the printer is software
> compatible with DOS as mentioned above, will likely be an exercise in
> futility. If someone has a surefire way of doing that (where I
> personally would even except non-FOSS solutions), specially one that
> wouldn't interfere with any other USB drivers, like for storage media,
> I would be happy to hear about it.
>
oh that's right. Suppose that you have good support in the BIOS for 
your USB keyboard, USB mouse and USB mass storage. Then you install 
the USB LPT driver by Bret Johnson, which takes over the whole UHCI, 
and may render your BIOS support for KB + Mouse + mass storage dead 
in the water :-/

Frank


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


Re: [Freedos-user] Print via USB

2021-04-21 Thread Bryan Kilgallin

So, Frank:


...just to follow up on what others have said, Bryan's printer is too
old to support PDF, but it is a pretty decent color laser apparently,
likely supports PCL5 in "HP emulation" mode, and something called
"BR-script (PostScript layer 3 emulation)" which I hope gets rendered
in the printer too, rather than using a translation layer in Windoze
:-)
The printer accepts jobs via IPP, LPR and JetDirect, therefore I
don't think its a stupid super-cheap GDI printer.


How can I get some of that magic to send data from my FreeDOS PC to the 
laser printer? I keep the PC's serial port connected to my old 
heart-monitor's receiver. Which latter is my main reason for using DOS!


Both the DOS PC and laser printer have USB and Ethernet ports.
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-04-21 Thread Bryan Kilgallin

Eek, Frank:


oh that's right. Suppose that you have good support in the BIOS for
your USB keyboard, USB mouse and USB mass storage.


Yes, I have a KVM switch driving both a keyboard and mouse from the DOS PC!


Then you install
the USB LPT driver by Bret Johnson, which takes over the whole UHCI,
and may render your BIOS support for KB + Mouse + mass storage dead
in the water


I have unzipped USBDOS to a directory on a stick, that is now plugged 
into my DOS PC. And I'm reading the "readme" document.

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-04-21 Thread Frantisek Rysanek
On 21 Apr 2021 at 19:46, Bryan Kilgallin wrote:

> Eek, Frank:
> 
> > oh that's right. Suppose that you have good support in the BIOS for
> > your USB keyboard, USB mouse and USB mass storage.
> 
> Yes, I have a KVM switch driving both a keyboard and mouse from the
> DOS PC!
> 
> > Then you install
> > the USB LPT driver by Bret Johnson, which takes over the whole UHCI,
> > and may render your BIOS support for KB + Mouse + mass storage dead
> > in the water
> 
> I have unzipped USBDOS to a directory on a stick, that is now plugged
> into my DOS PC. And I'm reading the "readme" document. --
> members.iinet.net.au/~kilgallin/
> 
I've forgotten to add, that there's no risk of permanent damage of 
any kind. If you try to load the USBDOS driver stack, and you end up 
with an unresponsive system (keyboard and mouse stop working), you 
can always just press RESET to reboot your machine, and get keyboard 
and mouse working again. Unless that loading of the driver is already 
in your autoexec.bat/config.sys :-)

Frank


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


Re: [Freedos-user] Print via USB

2021-04-21 Thread Bret Johnson
I've only a few things to add to this discussion about printing in USB -- most 
everything has already been said.  But, I will summarize. USB support in the 
BIOS (for computers that even still have a BIOS) is usually limited to some 
subset of mouse, keyboard, and/or mass storage (disk drives).  Some BIOSs will 
support all three, others only one or two.  Most BIOSs also do NOT support 
"live" connects or disconnects of the USB devices --- the devices must be 
plugged in when you boot the computer or they will not be recognized by the 
BIOS at all.  The same problem also exists with most (if not all) DOS USB 
drivers except mine.  BTW, supporting live connections and disconnections in 
DOS is a pretty significant feature in itself -- DOS was never designed to 
support it and it's far from trivial to implement. I have never seen a BIOS 
that supports USB printers, serial ports, Ethernet NICs, joysticks, etc.  I've 
also never seen a BIOS that has a way to "extend" it to add new types of USB 
devices or features.  My driver architecture provides a way to add new types of 
USB devices. Specifically regarding printing, I do provide a USB print driver.  
But what it does is virtualize the printer port (usually LPT1) so that anything 
that DOS normally sends to LPT1 gets sent instead directly to the USB-attached 
printer.  It does not do any type of protocol conversion -- it acts just like 
your printer is attached to a parallel centronics port.  As has been noted, a 
lot of modern printers can't handle regular text being sent to them -- they 
don't know what to do with that.  You have to send the data to the printer in a 
format the printer can understand.  As has also already been noted, other than 
plain ASCII text the most common types of printer commands that some of the 
more "sophisticated" DOS programs can send out are Epson ESC/P, HP PCL3, and 
PostScript.  Most modern printers won't accept any of those (including modern 
Epson and HP printers).  Modern Brother printers are usually pretty good about 
accepting these "old" protocols, as may a few other brands, but that is far 
from universal. The other thing with USB is that it is pretty much an "all or 
nothing" scenario when it comes to BIOS support.  That is, for each USB Host 
Controller, only one piece of software can be controlling it -- it must either 
be the BIOS or it must be an OS-specific driver.  When you boot, the BIOS will 
normally be controlling the keyboard, mouse, and/or disks.  If you have any 
other USB devices besides those (including printers), the BIOS completely 
ignores them and you cannot use them in DOS.  You can install drivers for those 
other devices if drivers are available.  But in order to install the DOS 
driver, you need to disconnect the BIOS.  The good thing is that you can do 
this for each individual host controller.  So, you can leave your mouse and 
keyboard and disks plugged into the host controller(s) that are being 
controlled by the BIOS and plug the other devices (printers or joysticks or 
whatever) into the host controller(s) that are not controlled by the BIOS. I 
also provide mouse and keyboard and disk drivers (though the disk driver 
admittedly doesn't work all that well) so you don't need to let the BIOS 
control anything if you don't want to.  The problem with that scenario is that 
if your keyboard is being controlled by the BIOS, when you install a DOS driver 
for the host controller that keyboard is plugged into your keyboard will stop 
working (because it has been disconnected from the BIOS).  So, you can't 
install the keyboard driver using the keyboard because you keyboard has stopped 
working.  As mentioned earlier in this thread, the way around this is to run 
some sort of "LOADUSB.BAT" batch file that will install everything you need 
(including the USB keyboard driver) without ever needing to type anything on 
the keyboard.  This is the way I need to set up my computers for testing. USB 
in DOS is challenging, but possible.


Choose to be safer online.
Opt-in to Cyber Safety with NortonLifeLock.
Plans starting as low as $6.95 per month.*
https://store.netzero.net/account/showService.do?serviceId=nz-nLifeLock&utm_source=mktg&utm_medium=taglines&utm_campaign=nzlifelk_launch&utm_content=tag995&promoCode=A23457
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Print via USB

2021-04-25 Thread Bryan Kilgallin

Thanks, Frank, for the long reply:


But, yours is a different problem: your printer does not even have
LPT "input".


It has USB and Ethernet. At the moment, I have just the latter wired to 
my router.



Technically, a USB printer shows up on the USB bus as a "USB LPT
device", or "USBLP".


How can I find that? My FreeDOS PC has the USBDOS directory in C:. 
Though I'm not confident of how to use the stuff in it!



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.


The FreeDOS PC has these Peripheral Component Interconnect (PCI) USB 
controllers.


Bus 0   0
Dev 1D  1D
Func0   1
Slot1D  1D
Vend80868086
Dev.24D224D4
Class Name  Serial Bus  Serial Bus
Subclass Name   USB USB


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.


I'm told that the USB controllers are UHCI.
The FreeDOS PC has the DOSUSB20 directory in C:. Though I'm not 
confident of how to use the stuff in it!



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:


As above, I have his directories USBDOS and DOSUSB20 installed in C:. 
But I don't know how to use what's in them!



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


I have bookmarked that page, to be read.


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).


I understand that I'm in-luck there.


Apparently, you are lucky, because the OptiPlex GX270 appears to be a
Pentium 4 generation PC.


{Microprocessor type

Intel® Pentium® 4 and Celeron®; design provides for future 
Dell-supported upgrades. A slower compatibility speed can be set through 
system setup.}


http://gosrock.com/mygx270/ug/specs.htm


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).


{Bus type

PCI 2.2
AGP 3.0
USB 2.0}


So I suggest that you give Brett's
driver a try.


As above, I need walking-through this!


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.


Ugh: I don't have the Work of the Devil!


But, you need to be able to configure
the networking stuff, preferably over TCP/IP nowadays.


My broadband gateway is a Technicolor TG-789. I log in to it from a Web 
page, on my Linux PC.



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).


My Linux PC distro is Ubuntu.


Your printer apparently also supports network printing: via IPP (too
modern), JetDirect style raw TCP port 9100, and UNIX standard LPR.


Yes, I see "LPR/LPD", "Custom Raw Port/Port9100", and "IPP/IPPS" listed 
below!


{Protocols
IPv4
ARP, RARP, BOOTP, DHCP, APIPA(Auto IP), WINS/NetBIOS name
resolution, DNS Resolver, mDNS, LLMNR responder, LPR/LPD, Custom
Raw Port/Port9100, IPP/IPPS, FTP Server, TELNET Server,
HTTP/HTTPS server, TFTP client and server, SMTP Client,
SNMPv1/v2c/ v3, ICMP, Web Services (Print), CIFS client, SNTP client}

Manual Appendix p. 191


Unfortunately, it does not contain a Microsoft Network stack
(samba/CIFS) so you cannot map the printer directly by "net use ..."


Hey, "CIFS client" is listed above!


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


It's on my Linux PC Desktop, to be read.


...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.


This is beginning to look hard!


How about using a Raspberry PI to build a Samba printserver for your
USB/LAN-attached printer?


Since a community workshop kicked me out, I haven't done any electronics.


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.


I might as well 

Re: [Freedos-user] Print via USB

2021-04-25 Thread Bryan Kilgallin

G'day Thomas:


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.


I hadn't got so much as a grunt out of the printer, from my FreeDOS PC!

I 
wonder if you attempt to print out graphics or some special fonts or so?


My printer's manual says that it emulates GDI. Which Wikipedia says 
means Graphics Device Interface.

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-01 Thread Bryan Kilgallin

So, Frank:


Install Samba on your Linux PC. It may take a wee bit of learning to
configure, but it does not bite back. I can help with snippets of
config to make it accept ancient DOS clients.

Install the Microsoft Network Client for MS-DOS. You can install this
from scratch, or you can try using/refactoring the NetBootDisk:
https://www.netbootdisk.com/floppy/download.htm

...and then redirect the LPT device:

NET USE LPT1: \\my_samba_server\printer_queue
I take it the DOS PC will tell the Linux PC to print! This seems a bit 
complicated.

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-01 Thread Bryan Kilgallin

G'day Eric:


Not sure which network chip your PC has?


networkNetLink BCM57788 Gigabit Ethernet PCIe


That would of course be the EASIEST option as long as your PC
and your printer both still have Centronics connectivity


The PC does, but the printer doesn't. Hm, I found the following.
{USB to Parallel Bi-Directional Cable

USB to Parallel Bi-Directional Cable

USB to Parallel Bi-Directional Cable
CAT.NO:XC4847
Parallel printer ports have disappeared from most modern desk top 
computers and virtually all new notebook computers. This is not a problem}

https://www.jaycar.com.au/usb-to-parallel-bi-directional-cable/p/XC4847
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-01 Thread Bryan Kilgallin

Thanks, Frank:


Epson dot matrix printers (ESC*P language) were perfectly willing to
print individual characters, a line at a time I guess. They were
(are) line printers and the ESC*P "language" is little more than an
"extension" of raw ASCII + control characters (CR, LF, FF etc)
by "escape sequences on top" - for switching fonts and maybe more
complex tasks.


Back in the day, I wrote in PROLOG, a custom word-processor outputting 
from my DOS palmtop to a dot-matrix printer.



Laser printer formats are page-oriented, and are not "evolved from
plain ASCII" in the way that sending a paragraph of raw ASCII text
would yield visible output on paper, even if a "formfeed" provokes
the printer to load paper and print a page (not sure if this even
works). Even in PCL, you need to provide some commands to the
printer, to place some text on the page and get it "rendered on
paper". Let alone PostScript - quite a tightly specified "well
formed" format.

Obviously you can embed bitmaps in PCL and PostScript print jobs.
Esc*P can do it too. When printing from modern software, every page
can be just a huge embedded bitmap. And, there are printers that can
*only* print bitmaps, albeit in a thin wrap of some standardized
format: think PCLm (in spite of its name, it is a gutted / stripped
down version of PDF).


Is there some DOS software package that can take an input text file and 
output formatted for a modern laser printer?

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-01 Thread Eric Auer

G'day Bryan,

>> That would of course be the EASIEST option as long as your PC
>> and your printer both still have Centronics connectivity
> 
> The PC does, but the printer doesn't. Hm, I found the following.
> {USB to Parallel Bi-Directional Cable
> 
>     USB to Parallel Bi-Directional Cable   
> 
> USB to Parallel Bi-Directional Cable
> CAT.NO:XC4847
> Parallel printer ports have disappeared from most modern desk top
> computers and virtually all new notebook computers. This is not a problem}
> https://www.jaycar.com.au/usb-to-parallel-bi-directional-cable/p/XC4847

That sounds more like a cable for printers which have
Centronics and PC which have none. You would need the
other way round, but I think that would not help much.

Probably better to use network or USB :-)

Let us see what others say about your network chip in DOS.
Note that if your printer is of the GDI variety, you will
not be able to print from DOS *at all* without adding a
computer with GDI drivers as translator between your DOS
computer and your printer. If the printer understands
a language for which you have a DOS tool which speaks
it, such as HP PCL, ESC/P, PostScript, PDF or plain
text, you CAN print directly from DOS as soon as you
find a way to send data through suitable communication
channels between the two: Network drivers and netcat
or MS CLIENT, USB drivers and TYPE, COPY or similar?

Regards, Eric

PS: We have GhostScript for PostScript processing and
our "print screen hotkey" TSR exist for HP PCL, ESC/P
and PostScript output. We have PDF viewers and it might
be possible to use GhostScript to create PDF? Not sure.
Some text editors also have built-in output converters.



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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Bryan Kilgallin

You are right, Eric:


That would of course be the EASIEST option as long as your PC
and your printer both still have Centronics connectivity


The PC does, but the printer doesn't. Hm, I found the following.
{USB to Parallel Bi-Directional Cable

     USB to Parallel Bi-Directional Cable

USB to Parallel Bi-Directional Cable
CAT.NO:XC4847
Parallel printer ports have disappeared from most modern desk top
computers and virtually all new notebook computers. This is not a problem}
https://www.jaycar.com.au/usb-to-parallel-bi-directional-cable/p/XC4847


That sounds more like a cable for printers which have
Centronics and PC which have none.


A local retired-technician agrees with you.


Probably better to use network or USB


I vaguely recall having read here that if I could find a PS2 keyboard 
and mouse, then I might be able to print from USB. Perhaps then I might 
ask the above techie to rummage through his containers of old stuff?



Note that if your printer is of the GDI variety, you will
not be able to print from DOS *at all* without adding a
computer with GDI drivers as translator between your DOS
computer and your printer.


{Print Languages  GDI (host based)}
file:///tmp/mozilla_bryan0/HL-3150CDN_Brochure.pdf


If the printer understands
a language for which you have a DOS tool which speaks
it, such as HP PCL, ESC/P, PostScript, PDF or plain
text, you CAN print directly from DOS as soon as you
find a way to send data through suitable communication
channels between the two: Network drivers and netcat
or MS CLIENT, USB drivers and TYPE, COPY or similar?


Apparently not!

Does this offer any hope?

{HX DOS Extender

[Update: This program is no longer available.] HX DOS extender is a 
32-bit and 16-bit DOS extender that not only provides DPMI services for 
DOS programs but also provides a Win32 API layer that enables many Win32 
console programs to work under DOS. It even provides limited support for 
DirectDraw, GDI and OpenGL graphics. It supports the Windows PE file 
format as well as the DOS MZ executable file format. Source code is 
provided. At the time this review was written, it is one of the few, if 
not the only, DOS extender still being maintained.}


https://www.thefreecountry.com/programming/dosextenders.shtml
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Robert Riebisch
Hi Eric,

> PS: We have GhostScript for PostScript processing and
> our "print screen hotkey" TSR exist for HP PCL, ESC/P
> and PostScript output. We have PDF viewers and it might
> be possible to use GhostScript to create PDF? Not sure.
> Some text editors also have built-in output converters.

I vaguely remember using ps2pdf in plain DOS 15 years ago.

https://geos.fandom.com/de/wiki/PDF-Erzeugung_mit_Geos_unter_DOS (in German)
http://www.nomdo.dds.nl/gs.htm

Cheers,
Robert
-- 
  +++ BTTR Software +++
 Home page: https://www.bttr-software.de/
DOS ain't dead: https://www.bttr-software.de/forum/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Bryan Kilgallin

Thanks, Ralf:

Without any additional software, 
a printer being used from DOS needs to be able to receive plain text, 
with additional capabilities either through the industry standard ESC/P 
(developed by Epson, who was for a long time the leader in printers 
before laser printers started to show up, then they kind of missed the 
bus) or by being "LaserJet II" (PCL3) compatible.


That rules out my Brother HL-3150CDN colour laser printer.

An additional hurdle 
is that a lot of (El Cheapo) printers these days aren't actually 
processing "text/graphics into pixel" themselves anymore, but just 
expect to get all the final pixel data from the OS, which is not a 
problem for GUI OS like Windows or macOS, but pretty much is a no-go 
when printing from DOS. Full stop.


Yes, my printer is GDI only!

DOS as designed only supports good old parallel 
(as in Centronics) or RS-232 type serial connections. Both of those are 
rare as hen's teeth on both newer computers and/or printers.


I do have both parallel and serial ports on my Dell OptiPlex GX270 
running FreeDOS. I currently use the serial port for my POLAR Sport 
Tester PE4000 heart-monitor receiver-box.

https://www.suchebiete.com/foto_Polar-Sport-Tester-PE4000-Pulsuhr_Interface,15849589.html

Another possibility is 
printing on a networked printer, if that printer is accessible through 
an established network connection. Used to be a breeze back in the days 
on a Novell network, is a bit harder these days when you require SMB 
(and likely the nowadays frowned upon SMB 1.x protocol). But the whole 
networking on DOS these days is lik going down a really dark rabbit hole.


:(

That leaves us once again with the dreaded (from the viewpoint of 
operability in DOS) USB connected printers. Finding USB drivers, given 
that the printer is software compatible with DOS as mentioned above, 
will likely be an exercise in futility.


:(

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Bryan Kilgallin

G'day Robert:


I vaguely remember using ps2pdf in plain DOS 15 years ago.


All is more complex now!
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Robert Riebisch
Hi Bryan,

>> Without any additional software, 
>> a printer being used from DOS needs to be able to receive plain text, 
>> with additional capabilities either through the industry standard ESC/P 
>> (developed by Epson, who was for a long time the leader in printers 
>> before laser printers started to show up, then they kind of missed the 
>> bus) or by being "LaserJet II" (PCL3) compatible.
> 
> That rules out my Brother HL-3150CDN colour laser printer.
> 
>> An additional hurdle 
>> is that a lot of (El Cheapo) printers these days aren't actually 
>> processing "text/graphics into pixel" themselves anymore, but just 
>> expect to get all the final pixel data from the OS, which is not a 
>> problem for GUI OS like Windows or macOS, but pretty much is a no-go 
>> when printing from DOS. Full stop.
> 
> Yes, my printer is GDI only!

If there's no problem of shelf space, get a used HP LaserJet 4 printer
on eBay.

Cheers,
Robert
-- 
  +++ BTTR Software +++
 Home page: https://www.bttr-software.de/
DOS ain't dead: https://www.bttr-software.de/forum/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Bryan Kilgallin

Thanks, Robert:


If there's no problem of shelf space, get a used HP LaserJet 4 printer
on eBay.
I've made such an inquiry of the charity from which I got my refurbished 
(Linux PC) and laptop.

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-02 Thread Frantisek Rysanek
On 2 May 2021 at 10:24, Bryan Kilgallin wrote:

> So, Frank:
> 
> > Install Samba on your Linux PC. It may take a wee bit of learning to
> > configure, but it does not bite back. I can help with snippets of
> > config to make it accept ancient DOS clients.
> > 
> > Install the Microsoft Network Client for MS-DOS. You can install
> > this from scratch, or you can try using/refactoring the NetBootDisk:
> > https://www.netbootdisk.com/floppy/download.htm
> > 
> > ...and then redirect the LPT device:
> > 
> > NET USE LPT1: \\my_samba_server\printer_queue
>
> I take it the DOS PC will tell the Linux PC to print! This seems a 
> bit complicated. 
> 
Yes, the Linux PC is an extra step - but probably the only way for 
you to go forward, if you still aim to print from your DOS box to 
your GDI printer. And it's not overly complicated, though it may 
require a little bit of extra learning...

As I've already written, I myself have investigated the dark rabbit 
hole of MS-DOS networking for you:
http://frantisek.rysanek.sweb.cz/FD_NET.zip
Unzip the three directories to your DOS hard drive, take a look at 
the config.sys suggested, and see if you can get your DOS box to take 
a breath of your LAN. Get an IP address from DHCP and ping something 
on the LAN. Chances are that this part will work right off the bat.

I'm fairly confident about the follow-up technologies in Linux (for 
your printing intermediate box). It doesn't look like a headache to 
set up, but it may require some tinkering and back-n-forth e-mail 
communication. 

If you have time and you're still curious about stuff, you might 
actually find that tech entertaining. It's not gonna clog your Linux 
printing setup or swamp your network or anything. Then again, if this 
kind of stuff just gives you a headache, never mind, go focus on 
something that makes your day brighter :-)

Frank



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


Re: [Freedos-user] Print via USB

2021-05-11 Thread Bryan Kilgallin

Dear Frank:


As I've already written, I myself have investigated the dark rabbit
hole of MS-DOS networking for you:
http://frantisek.rysanek.sweb.cz/FD_NET.zip
Unzip the three directories to your DOS hard drive, take a look at
the config.sys suggested, and see if you can get your DOS box to take
a breath of your LAN.


I have unzipped your package and copied MSNET, MTCPAPPS, and PKTDRV to 
my FreeDOS PC's C: directory. The latter contains FDCONFIG.SYS. 
Incidentally, in the page whose URL follows, I have difficulty reading 
because of the background fish logo!


http://www.bootablecd.de/fdhelp-internet/en/hhstndrd/cnfigsys/fdconfig.htm

My FreeDOS PC's FDCONFIG.SYS file contents follow.

{SET DOSDIR=C:\FDOS

!COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS
!LASTDRIVE=Z
!BUFFERS=20
!FILES=40
!MENUCOLOR=7,0

MENUDEFAULT=1,5
MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free
MENU 2 - Load FreeDOS with EMM386 (Expanded Memory) and SHARE loaded
MENU 3 - Load FreeDOS without drivers (Emergency Mode)
MENU 4 - Load FreeDOS low with some drivers (Safe Mode)

124?DOS=HIGH
12?DOS=UMB
124?DOSDATA=UMB
1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG
234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE
2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG
34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT
12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT}

I found `!' and `?'.

{? (DR DOS 3.41 and higher, Embedded DOS[nb 2] and FreeDOS only)
Displays a Yes/No query and (since DR DOS 5.0) optional message to 
ask the user for confirmation to execute the following CONFIG.SYS 
directives.[14] (FreeDOS does not support optional messages, but 
optional conditions in conjunction with boot menus defined with MENU and 
MENUDEFAULT.) (DOS 6.0 and higher supports a similar feature by adding a 
? after the corresponding CONFIG.SYS directive, f.e. DEVICE? or DEVICE?= 
instead of ?DEVICE. This variant is also supported by DR DOS.)}


{! (FreeDOS only)
Unconditionally execute the following CONFIG.SYS directive.}

https://en.wikipedia.org/wiki/CONFIG.SYS

Whereas in your FD_NET, CONFIG.SYS contains this.

{device=DOS\JEMMEX.EXE X=TEST NOEMS

files=40
break=off
buffers=30
lastdrive=z
stacks=0,0
dos=high,umb

SHELLHIGH=C:\COMMAND.COM /E:4096 /P}

But I am unfamiliar with interpreting .SYS files. And so I need to do 
some reading!


I take it that I am to merge the contents of your CONFIG.SYS into my 
FreeDOS PC's FDCONFIG.SYS. But I am shy of doing so, and request 
hand-holding guidance!


Bryan.
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-12 Thread Eric Auer


Dear Bryan,

feel free to notify the bootablecd.de maintainer that you
would prefer less contrast for the Blinky mascot background
to distract visitors less from reading the text on the page.

> My FreeDOS PC's FDCONFIG.SYS file contents follow.

That seems to be one of the default versions. Indeed ! marks
a line as "always use" while ? marks it as "ask user". Note
that there are a few bugs in the config, which I have listed
in a mail about 1.3rc3 or rc4 recently.

> 1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG
> 2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG

> device=DOS\JEMMEX.EXE X=TEST NOEMS

You could edit the "1..." line above by removing I=TEST NOVME NOINVLPG
to make it match the FD_NET example, while still being menu-driven: It
will still only be loaded when you select menu option 1 at boot.

Other differences worth copying are:

> break=off
> buffers=30
> stacks=0,0

You can add those lines to your config, at any place, but for
readability, I recommend "nearby the old settings for those".
Of course, you remove the "!buffers=20" in the old config.

> SHELLHIGH=C:\COMMAND.COM /E:4096 /P

That actually makes a big difference to your old

12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT

The old line expects command.com to be in c:\fdos\bin\
while the FD_NET line has it in c:\ so only change the
old line if you want to use the command.com in the new
location.

Also note the different /E: values: They define how
much space you want for environment variables and you may
have to go from 1024 to 4096 if the network config needs
that much space.

Apart from that, I think you can keep your existing config.

I assume you have already added things from the FD_NET
autoexec to your existing autoexec? Which changes have
you applied to load the network things? Any other config
sys or fdconfig sys changes not mentioned in your mail yet?

Note: When FreeDOS finds a fdconfig.sys file, it will use
that and ignore config.sys, but if it does not find one,
it will use config.sys like any other DOS. So it will not
use both files at the same time. Check which one you use.

Eric



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


Re: [Freedos-user] Print via USB

2021-05-14 Thread Bryan Kilgallin

Dear Eric:


feel free to notify the bootablecd.de maintainer that you
would prefer less contrast for the Blinky mascot background
to distract visitors less from reading the text on the page.


Yes, I've sent an e-mail request there.


Indeed ! marks
a line as "always use" while ? marks it as "ask user". Note
that there are a few bugs in the config, which I have listed
in a mail about 1.3rc3 or rc4 recently.


1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG
2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG



device=DOS\JEMMEX.EXE X=TEST NOEMS


You could edit the "1..." line above by removing I=TEST NOVME NOINVLPG
to make it match the FD_NET example, while still being menu-driven: It
will still only be loaded when you select menu option 1 at boot.

Other differences worth copying are:


break=off
buffers=30
stacks=0,0


You can add those lines to your config, at any place, but for
readability, I recommend "nearby the old settings for those".
Of course, you remove the "!buffers=20" in the old config.


SHELLHIGH=C:\COMMAND.COM /E:4096 /P


That actually makes a big difference to your old

12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT

The old line expects command.com to be in c:\fdos\bin\
while the FD_NET line has it in c:\ so only change the
old line if you want to use the command.com in the new
location.

Also note the different /E: values: They define how
much space you want for environment variables and you may
have to go from 1024 to 4096 if the network config needs
that much space.


My FreeDOS PC's FDCONFIG.SYS file now says this. Should I put `!' before 
the BREAK and STACKS statements?


{SET DOSDIR=C:\FDOS

!COUNTRY=061,858,C:\FDOS\BIN\COUNTRY.SYS
!LASTDRIVE=Z
BREAK=OFF
!BUFFERS=30
!FILES=40
STACKS=0,0
!MENUCOLOR=7,0

MENUDEFAULT=1,5
MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free
MENU 2 - Load FreeDOS with EMM386 (Expanded Memory) and SHARE loaded
MENU 3 - Load FreeDOS without drivers (Emergency Mode)
MENU 4 - Load FreeDOS low with some drivers (Safe Mode)

124?DOS=HIGH
12?DOS=UMB
124?DOSDATA=UMB
1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST
234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE
2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG
34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT
SHELLHIGH=C:\COMMAND.COM /E:4096 /P}


I assume you have already added things from the FD_NET
autoexec to your existing autoexec?


You are ahead of me! I need to hunt for such unknown magic
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-14 Thread Bryan Kilgallin

Further, Eric:


I assume you have already added things from the FD_NET
autoexec to your existing autoexec?


Frank's package at this address--doesn't contain "autoexec"!
http://frantisek.rysanek.sweb.cz/FD_NET.zip

Whereas my FreeDOS PC's C: directory has an AUTOEXEC.BAT file. It 
contains this.


{@ECHO OFF
SET DOSDIR=C:\FDOS
SET LANG=EN
SET TZ=UTC
SET PATH=%dosdir%\BIN
if exist %dosdir%\LINKS\NUL SET PATH=%path%;%dosdir%\LINKS
SET NLSPATH=%dosdir%\NLS
SET HELPPATH=%dosdir%\HELP
SET TEMP=%dosdir%\TEMP
SET TMP=%TEMP%
SET BLASTER=A220 I5 D1 H5 P330
SET DIRCMD=/P /OGN /Y
SET COPYCMD=/-Y

IF "%config%"=="4" GOTO END
DEVLOAD /H /Q %dosdir%\BIN\UDVD2.SYS /D:FDCD0001

LH FDAPM APMDOS
IF "%config%"=="2" LH SHARE
rem IF EXIST %DOSDIR%\BIN\DOSLFN.COM LH DOSLFN
REM NLSFUNC %dosdir%\BIN\COUNTRY.SYS
REM DISPLAY CON=(EGA),858,2)
REM MODE CON CP PREP=((858) %dosdir%\CPI\EGA.CPX)
REM KEYB US,858,%dosdir%\bin\keyboard.sys
REM CHCP 858
REM MKEYB UK


REM MOUSE
CTMOUSE

SHSUCDX /QQ /D3
REM LH SHSUCDHD /QQ /F:FDBOOTCD.ISO
REM DEVLOAD /H /Q %dosdir%\BIN\UIDE.SYS /H /D:FDCD0001 /S5
SHSUCDX /QQ /~ /D:?SHSU-CDR,D /D:?SHSU-CDH,D /D:?FDCD0001,D 
/D:?FDCD0002,D /D:?FDCD0003,D


MEM /C /N
SHSUCDX /D

:END
SET AUTOFILE=%0
SET CFGFILE=C:\FDCONFIG.SYS
alias reboot=fdapm warmboot
alias reset=fdisk /reboot
alias halt=fdapm poweroff
alias shutdown=fdapm poweroff
alias cfg=edit %cfgfile%
alias auto=edit %0

set OS_NAME=FreeDOS
set OS_VERSION=1.2

if exist %dosdir%\bin\fdnet.bat call %dosdir%\bin\fdnet.bat start
if exist %dosdir%\bin\welcome.bat call %dosdir%\bin\welcome.bat}

 Which changes have

you applied to load the network things? Any other config
sys or fdconfig sys changes not mentioned in your mail yet?

Note: When FreeDOS finds a fdconfig.sys file, it will use
that and ignore config.sys, but if it does not find one,
it will use config.sys like any other DOS. So it will not
use both files at the same time. Check which one you use.

Eric



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



--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-14 Thread Frantisek Rysanek
Bryan thanks for your progress reports :-)
Nice to see how you have cartographed your local network, and that 
you're showing quite a bit of understanding.

Your existing autoexec looks pretty harmless to me.
I don't have any demands on what to put in there, that's why I didn't 
provide an example. Feel free to tweak the PATH variable to your 
liking. Let me know if you don't know what the %PATH% is good for. 
For instance, the pktdrv/start.bat modifies the %PATH% accordingly to 
fit its own needs = no need to do that in the autoexec.

Basically I'd say you're all set to try and load the DOS network 
stack, and see if that works :-) Again there are two alternative 
flavours of the DOS TCP/IP stack, one tastes of Microsoft, the other 
one of "independent open-source stuff" (the CRYNWR packet driver 
API). This is what you should try next - either A) or B), reboot 
inbetween A) and B) when you want to switch to the other:

A.) the one Microsoft way:

  cd msnet
  start
  ping 10.1.1.1
  ping 10.1.1.2
  ping 10.1.1.92

B.) the CRYNWR packet driver:

  cd pktdrv
  start
  ping 10.1.1.1
  ping 10.1.1.2
  ping 10.1.1.92
  
I suggest that you also try 
  mem /c /p
after A) and B) in turns for comparison. Look at the "largest 
executable program size" at the end of the listing :-)

If you get bored before I end up sending further "printing" 
instructions to you, try tcpdump or Wireshark on the Linux box :-) 
The output probably won't make much sense to you for a start, but it 
may open your eyes a little, to how chatty your local network is. 
Obviously plenty more info is available from me on that topic, and 
questions are welcome.
Only we're getting off topic in this list.

Maybe one small thing to test on your Ubuntu box: if you open a 
terminal window, and type 
which lpr
what do you get?
If you get something like /usr/bin/lpr, could you also try this?
which lpq
lpq -a
Explanation:
lpr   is a command-line program that allows you to copy/send a file 
to a print queue, locally within your Linux box. The file = print job 
is expected at standard input.
lpq   is a print queue "manager" command, for your overview of the 
jobs being printed, and the queues present in the system.
Not sure if your CUPS comes with those utilities included.

Frank



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


Re: [Freedos-user] Print via USB

2021-05-14 Thread Frantisek Rysanek
Oops. I've goofed up by running the last message throught the list. 
Already. For more than one reason, and going off topic being the 
least important. Apologies. Such an example of bad taste on my part. 
I should know better. I'll keep the possible networking follow-ups in 
private messages.

Frankq


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


Re: [Freedos-user] Print via USB

2021-05-14 Thread Eric Auer
Dear Bryan,

> My FreeDOS PC's FDCONFIG.SYS file now says this.
> Should I put `!' before the BREAK and STACKS statements?

That is not necessary. Actually I find it a bit odd that
the default config used ! so frequently. Tastes differ :-)

Eric




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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Bryan Kilgallin

Thanks, Eric:


Which changes have
you applied to load the network things?


Upon Frank's following package, I used Ubuntu's Archive Manager to 
extract the contents. Then I used a USB stick to transfer the 
directories to my FreeDOS PC. So in the latter's C: directory, are 
MSNET, MTCPAPPS, and PKTDRV.


http://frantisek.rysanek.sweb.cz/FD_NET.zip

Following Frank's later advice, on my FreeDOS PC, I dropped the cursor 
to C:\MSNET>, and typed "start". After seeing a couple of screens of 
stuff fly past, I was able to ping my router! Similarly I have been able 
to ping devices from each other. Thus my FreeDOS PC can minimally 
communicate with the printer.

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Bryan Kilgallin

Thanks again, Frank:


As I've already written, I myself have investigated the dark rabbit
hole of MS-DOS networking for you:
http://frantisek.rysanek.sweb.cz/FD_NET.zip
Unzip the three directories to your DOS hard drive, take a look at
the config.sys suggested, and see if you can get your DOS box to take
a breath of your LAN.


As you had suggested, on the FreeDOS PC, in C:\MSNET\ I entered "start".


Get an IP address from DHCP and ping something
on the LAN.


Then I could ping from that PC to my printer, Ubuntu PC and Ubuntu laptop.


Chances are that this part will work right off the bat.


It worked fine. I haven't yet tried to do the same from C:\PKTDRV>. And 
I don't know what MTCPAPPS is for.



I'm fairly confident about the follow-up technologies in Linux (for
your printing intermediate box). It doesn't look like a headache to
set up, but it may require some tinkering and back-n-forth e-mail
communication.

If you have time and you're still curious about stuff, you might
actually find that tech entertaining.


I appreciate learning basics as I go.


It's not gonna clog your Linux
printing setup or swamp your network or anything.


I had worried that the DOS machine on my network, would give easy access 
from the Internet for gremlins!

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Eric Auer


Hi Bryan & Frank,

> As you had suggested, on the FreeDOS PC, in C:\MSNET\ I entered "start".
> Then I could ping from that PC to my printer, Ubuntu PC and Ubuntu laptop.

Cool! Thanks for creating the network zip :-) What is
in that start bat file and which packages with which
licenses are required to make this become a reality?

> I had worried that the DOS machine on my network, would 
> give easy access from the Internet for gremlins!

Because DOS normally does not run any servers, there is
not much which the gremlins could access. So it depends
on which servers you manually start on DOS: I guess the
plans to talk to your printer will not require anything
server-style to run on DOS, so you should be safe :-)

Regards, Eric



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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Bryan Kilgallin

Eric:


As you had suggested, on the FreeDOS PC, in C:\MSNET\ I entered "start".
Then I could ping from that PC to my printer, Ubuntu PC and Ubuntu laptop.


Cool! Thanks for creating the network zip :-) What is
in that start bat file and which packages with which
licenses are required to make this become a reality?


{REM set PATH=C:\MSNET;%PATH%

REM   Uncomment the following line if you want mTCP enabled as well,
REM   under the MS Network Client environment. See also system.ini,
REM   one line there is relevant as well (to load the packet driver shim.)
REM set MTCPCFG=C:\mtcpapps\mtcp.cfg
REM   Then, either CD into C:\mtcpapps, or add that directory to your path.
REM   And, you probably need to run the DHCP.EXE to initialize mTCP.

devload /H IFSHLP.SYS
REM pause

net initialize
REM pause

NETBIND.COM
REM pause

umb.com
REM pause

LH tcptsr.exe
REM pause

tinyrfc.exe
REM pause

nmtsr.exe
REM pause

emsbfr.exe
REM pause

dnr.exe
REM pause}
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Ralf Quint

On 5/15/2021 4:56 AM, Eric Auer wrote:



I had worried that the DOS machine on my network, would
give easy access from the Internet for gremlins!

Because DOS normally does not run any servers, there is
not much which the gremlins could access. So it depends
on which servers you manually start on DOS: I guess the
plans to talk to your printer will not require anything
server-style to run on DOS, so you should be safe :-)


If a DOS machine on a local network gets "accessed by gremlins from the 
Internet", you are already in rather deep sh!t. That DOS machine would 
be the last of your worries at that point...


Ralf



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



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


Re: [Freedos-user] Print via USB

2021-05-15 Thread Frantisek Rysanek
On 15 May 2021 at 10:40, Ralf Quint wrote:
>
> On 5/15/2021 4:56 AM, Eric Auer wrote:
> >
> >> I had worried that the DOS machine on my network, would
> >> give easy access from the Internet for gremlins!
> > Because DOS normally does not run any servers, there is
> > not much which the gremlins could access. So it depends
> > on which servers you manually start on DOS: I guess the
> > plans to talk to your printer will not require anything
> > server-style to run on DOS, so you should be safe :-)
> 
> If a DOS machine on a local network gets "accessed by gremlins from the 
> Internet", you are already in rather deep sh!t. That DOS machine would 
> be the last of your worries at that point...
> 
> Ralf
> 
I second that. In more detail:

As for DOS in the hypothetical role of an "entry point" (security 
hole): DOS is such an ancient and nowadays exotic platform, and 
relatively uncomfortable to program networking pranks for, that 
hardly anyone would waste the programming effort required to write 
modern malware for it. In its heyday, there were certainly viruses 
for DOS, but I don't recall any notable DOS virus that would spread 
specifically in a network environment (which one, in DOS at that time 
Novell was much more popular than MS Networking etc.) I can imagine 
"social engineering malware" spreading by just copying its funny 
executable binary to any network volumes it can find, and thus infect 
more modern platoforms... but again, making this kind of sotware 
compatible with DOS would nowadays mean pretty much unnecessary 
baggage :-)

And, yes, as the DOS machine is client only, it can hardly be 
attacked via the network (by feeding a crafted buffer overflow attack 
to some network service interface, or SQL injection, or some such).
It's just much too dumb to be eligible as a victim of a sophisticated 
network-borne attack.

As for the MS Network Client for DOS, it is true that it requires 
ancient authentication methods with weak ciphers and whatnot, which 
might make it easier for an attacker to glean passwords from the 
traffic or some such (and then maybe log in to the server and try 
pulling off further mischief). But, for that, the attacker would have 
to be present in your local network already = you'd have a more 
serious problem in the first place :-)

I do believe that your DOS machine on the LAN is really a non-target 
nowadays.

I'll try to provide you with a rudimentary Samba config in a private 
e-mail.

Frank



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


Re: [Freedos-user] Print via USB

2021-05-16 Thread Bryan Kilgallin

Thanks again, Frank:


Basically I'd say you're all set to try and load the DOS network
stack, and see if that works


I take it that means entering "start", in either MSNET OR PKTDRV.

 :-) Again there are two alternative

flavours of the DOS TCP/IP stack, one tastes of Microsoft, the other
one of "independent open-source stuff" (the CRYNWR packet driver
API). This is what you should try next - either A) or B), reboot
inbetween A) and B) when you want to switch to the other:

A.) the one Microsoft way:

   cd msnet
   start
   ping 10.1.1.1
   ping 10.1.1.2
   ping 10.1.1.92

B.) the CRYNWR packet driver:

   cd pktdrv
   start
   ping 10.1.1.1
   ping 10.1.1.2
   ping 10.1.1.92
   



I suggest that you also try
   mem /c /p
after A) and B) in turns for comparison. Look at the "largest
executable program size" at the end of the listing


In MSNET, that's "510K (522,512 bytes)".
In PKTDRV, it's ""628K (643,024 bytes).


If you get bored before I end up sending further "printing"
instructions to you, try tcpdump or Wireshark on the Linux box


OK, in a terminal window, I entered "sudo tcpdump -A". I see reports of 
the router. These entries mention:

* HOST;
* CACHE-CONTROL;
* LOCATION;
* SERVER;
* NT;
* USN;
* NTS;
* OPT;
* 01-NLS;
* BOOTID.UPNP.ORG; and
* CONFIGID.UPNP.ORG.

Ubuntu Software installed the Qt version of the Wireshark sniffer. In a 
terminal window, I launched it via sudo. But I didn't understand the 
reportage. I need to read the documentation!



Maybe one small thing to test on your Ubuntu box: if you open a
terminal window, and type
 which lpr
what do you get?


/usr/bin/lpr


If you get something like /usr/bin/lpr, could you also try this?
 which lpq


/usr/bin/lpq


 lpq -a


no entries


lpr   is a command-line program that allows you to copy/send a file
to a print queue, locally within your Linux box. The file = print job
is expected at standard input.
lpq   is a print queue "manager" command, for your overview of the
jobs being printed, and the queues present in the system.
Not sure if your CUPS comes with those utilities included.


Yes.
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB

2022-09-27 Thread Aitor Santamaría
Hello,

On Tue, 20 Apr 2021 at 17:19, Frantisek Rysanek 
wrote:

> Built-in fonts are obviously an option, there's always some plain
> ASCII built in, and I believe in the old DOS era there used to be...
> programs that you ran before printing your jobs, that would
> pre-upload font sets or national character sets into the printer, so
> that your print jobs could then refer to those fonts and produce the
> desired output on paper.
>

DEVICE=PRINTER.SYS
MODE PRN CODEPAGE...
MODE PRN SELECT...

Creating a FD-PRINTER out of DISPLAY would not be hard.
The problem is that I don't have printer-specific language codes for
changing codepage that we would embed on a "printer-like CPI file". Such a
program would be the body of such a "CPI" file, and MODE would just let
PRINTER handle it.

Aitor


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


Re: [Freedos-user] Print via USB - licensing

2021-05-15 Thread Frantisek Rysanek
On 15 May 2021 at 13:56, Eric Auer wrote:
> 
> Hi Bryan & Frank,
> 
> > As you had suggested, on the FreeDOS PC, in C:\MSNET\ I entered "start".
> > Then I could ping from that PC to my printer, Ubuntu PC and Ubuntu laptop.
> 
> Cool! Thanks for creating the network zip :-) What is
> in that start bat file and which packages with which
> licenses are required to make this become a reality?
>
I haven't bothered to investigate in detail. Licensing is likely a 
can of worms in that ZIP of mine.
Hence my offer to withdraw that zip if anyone happens to object.

The MS Network client (containing a flock of binaries) has some 
license of its own, I'm almost sure I am not allowed to re-distribute 
this.
The config files for the MS Network client borrow heavily from the 
NetBootDisk.com project.
Then there's the mTCP package.
And the dis_pkt.com (v11).
And probably some binaries coming from FreeDOS.

The top-level README contains a list of URLs to where I got all the 
bits and pieces (at least I'm trying to give credit where credit is 
due).

I'm not all that excited about the zip I have created.
It's very bare bones, and it contains HW support for just one 
specific NIC (a family of Intel PRO 1000 within some timespan of 
their evolution). It is meant to be simple and to show the very 
basics. I meant this as a starting point.

Frank


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-20 Thread Eric Auer

Hi Bryan,

I believe you have to install DOS USB drivers first. And actually
it could work better to use the NETWORK for printing, because DOS
(wired LAN) network drivers are more evolved than DOS USB drivers
and you can use DOS versions of NETCAT or other tools to copy the
contents you want to print to the IP and port of your printer as
hopefully listed in your printer documentation or visible in some
status information screen when you print from Linux :-)

>> I have just connected my Brother HL-3150CDN laser printer to my Dell>> 
>> OptiPlex GX270.
> I used the FreeDOS "print" command, unembellished.

That is only needed for background printing. A more straightforward
way is to send the printer data to the printer port: COPY x.txt PRN
or COPY x.pdf LPT1 or similar.

> The FreeDOS PC monitor listed the following line at the end of
> information after I unsuccessfully attempted to print.
> 
>>  "Device to direct Print [PRN=0]".

This message seems to have the purpose of giving feedback regarding
which output device the background printing tool PRINT is using.

Unfortunately, there is no PRINT.TXT and only a PRINT.ASM about
James Tabor's PRINT 1.02 tool, but it seems to support only:

PRINT /1 file.txt

Which means "send file.txt to LPT1 in the background" where you
can also use /2 or /3 to use LPT2 or LPT3 instead. The MS PRINT
tool would also support /S:ticks /M:ticks /U:ticks /Q:count /B:size
and /D:device. For things which MS PRINT would support directly,
you need the separate PRINTQ tool in FreeDOS: Clear the queue or
add more files to the queue later. The whole toolkit seems to be
rather minimal in FreeDOS, probably because printing things in
the BACKGROUND has been a rarely used feature in the last decade.

This tool could use a lot of improvement, but maybe we could just
warn people that it is not really necessary and the current tool
version is only the most minimal implementation of the feature.

> I expect that no data went to the printer.

I agree, in particular if you have not loaded USB drivers.

>> What do I need to do?

Please try via network, or load USB drivers. Also, please use
COPY filename LPT1 or COPY filename PRN or similar instead of
using PRINT: Background printing adds complexity and gives you
less clear view on potential transfer errors.

Regards, Eric

> http://wiki.freedos.org/wiki/index.php/Printer

PS: PRINTQ is a small public domain tool by Robert Mashlan to
add or cancel files on PRINT (MS, FreeDOS, etc.) print queues.



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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-20 Thread Frantisek Rysanek
On 20 Apr 2021 at 16:21, Eric Auer wrote:
> 
> Hi Bryan,
> 
> I believe you have to install DOS USB drivers first. And actually it
> could work better to use the NETWORK for printing, because DOS (wired
> LAN) network drivers are more evolved than DOS USB drivers and you can
> use DOS versions of NETCAT or other tools to copy the contents you
> want to print to the IP and port of your printer as hopefully listed
> in your printer documentation or visible in some status information
> screen when you print from Linux :-)
>
Eric has cracked it :-) There appears to be a version of Netcat for 
DOS, even including an example of how to copy a file to the printer:
https://www.brutman.com/mTCP/mTCP_Netcat.html
It requires just a packet driver for your NIC.

So if printing into a file and copying that by an extra command is 
not a problem, there's your solution Bryan...

Frank


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-20 Thread Adam Nielsen via Freedos-user
> I believe you have to install DOS USB drivers first.

It's worse than that.  I've tried to get many different printers
working under Linux (which generally has pretty good hardware support)
and it turns out that a lot of manufacturers cut corners on their
devices and don't support standard print protocols like PostScript or
PCL, and instead use a lightweight translation layer to pass the
drawing calls in the Windows API over to the hardware.

It basically means there are a number of (usually cheap) printers out
there that will only work under Windows.

So even if you do manage to get USB drivers, chances are slim you can
get it to print.  If you can find a modern printer that supports both
PostScript and PCL, there's a fair chance that you can still get a
parallel port interface adapter for it too so you won't need the USB
drivers anyway.  They're usually aimed at industrial/point-of-sale type
users where the modern equipment still all uses the traditional
interfaces.

Cheers,
Adam.


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-20 Thread Ralf Quint

On 4/20/2021 8:24 AM, Adam Nielsen via Freedos-user wrote:

I believe you have to install DOS USB drivers first.

It's worse than that.  I've tried to get many different printers
working under Linux (which generally has pretty good hardware support)
and it turns out that a lot of manufacturers cut corners on their
devices and don't support standard print protocols like PostScript or
PCL, and instead use a lightweight translation layer to pass the
drawing calls in the Windows API over to the hardware.

It basically means there are a number of (usually cheap) printers out
there that will only work under Windows.

Correct.

So even if you do manage to get USB drivers, chances are slim you can
get it to print.  If you can find a modern printer that supports both
PostScript and PCL, there's a fair chance that you can still get a
parallel port interface adapter for it too so you won't need the USB
drivers anyway.  They're usually aimed at industrial/point-of-sale type
users where the modern equipment still all uses the traditional
interfaces.
If you are talking laser printers,  then that might exclude printers 
that are Postscript only, as they require some software on the computer 
side to translate plain text into a Postscript data stream that the 
printer understands. Not such a big deal for simple text files, I have 
written such a tool in the past in less than an afternoon, but it is 
still an additional step to be taken, unless you are printing from a DOS 
application that by itself is capable of printing in Postscript (AFAIK, 
both Word for DOS and WordPerfect for DOS come with Postscript printer 
drivers).


A printer that natively understand PCL3 (PCL5 or PCL6 is nowadays not a 
sure thing of support anymore, specially on non-HP printers) will 
commonly understand plain text and can be used just fine, as long as you 
can physically connect it...


Ralf



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-20 Thread Frantisek Rysanek
On 20 Apr 2021 at 10:49, Ralf Quint wrote:

> If you are talking laser printers,  then that might exclude printers
> that are Postscript only, as they require some software on the
> computer side to translate plain text into a Postscript data stream
> that the printer understands. Not such a big deal for simple text
> files, I have written such a tool in the past in less than an
> afternoon, but it is still an additional step to be taken, unless you
> are printing from a DOS application that by itself is capable of
> printing in Postscript (AFAIK, both Word for DOS and WordPerfect for
> DOS come with Postscript printer drivers).
> 
Bryan says he's got a Linux computer. I've never seen a build of 
"mpage" for MS-DOS, but I recall old howto's for lpd / printcap and 
using scripts as filters. I'd just set up an extra queue for plain 
ASCII input and use a2ps or mpage to convert on the fly into 
postscript. 

> A printer that natively understand PCL3 ... will commonly understand plain 
> text.
>
thanks for correcting me, my memory is flakey :-)

Frank


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-25 Thread Bryan Kilgallin

Thanks, Eric:


And actually
it could work better to use the NETWORK for printing, because DOS
(wired LAN) network drivers are more evolved than DOS USB drivers
and you can use DOS versions of NETCAT or other tools to copy the
contents you want to print to the IP and port of your printer as
hopefully listed in your printer documentation or visible in some
status information screen when you print from Linux


I gather that Ethernet is a better bet than USB.


Please try via network, or load USB drivers.


Now I understand that I need to visit a friend with a Windows PC, in 
order to get an NDIS driver for DOS!

--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-04-26 Thread dmccunney
On Tue, Apr 20, 2021 at 10:23 AM Eric Auer  wrote:

> >> I have just connected my Brother HL-3150CDN laser printer to my Dell>> 
> >> OptiPlex GX270.
> > I used the FreeDOS "print" command, unembellished.
>
> That is only needed for background printing. A more straightforward
> way is to send the printer data to the printer port: COPY x.txt PRN
> or COPY x.pdf LPT1 or similar.

The PRINT command installed as a resident TSR.  It provided the
earliest  example I am aware of of time slicing under DOS.  (If memory
serves, you could specify the number of foreground and background
ticks for fine tuning. I believe the default was 6 and 2.)  It was
intended to ease the lives of folks doing writing they needed to
print, like secretaries,  so they didn't have to stop and sit in their
hands waiting  for a print job to finish before they could work again.
Programmers disassembled MS's code to see how they did that, and a new
class of TSR got  created.

I ran the MKS Toolkit under DOS, which provided the most complete
implementation of all the Unix commands that made sense in a single
taking environment.  When I was booted in the Toolkit, I could use
Korn shell aliases and shell functions to duplicate the functionally
of the unix lp command, including adding, stopping, and deleting print
jobs. Fun. :-)


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-05-02 Thread Bryan Kilgallin

Thanks, Adam:


It's worse than that.  I've tried to get many different printers
working under Linux (which generally has pretty good hardware support)
and it turns out that a lot of manufacturers cut corners on their
devices and don't support standard print protocols like PostScript or
PCL, and instead use a lightweight translation layer to pass the
drawing calls in the Windows API over to the hardware.


I've read that my Brother HL-3150CDN laser printer only does GDI!


It basically means there are a number of (usually cheap) printers out
there that will only work under Windows.


Ubuntu Linux prints to it OK. But apparently not my old PC running FreeDOS!


If you can find a modern printer that supports both
PostScript and PCL, there's a fair chance that you can still get a
parallel port interface adapter for it too so you won't need the USB
drivers anyway.


So what is a purchasable printer suitable for printing from FreeDOS on 
bare-metal?



They're usually aimed at industrial/point-of-sale type
users where the modern equipment still all uses the traditional
interfaces.


I suppose something like this could list text.

{This is a thermal printer like you would find on a cash register or 
adding machine. It will print simple strings passed to it via TTL 
serial, bitmap images (poorly) and it can generate several different 
formats of barcodes. This model can even print QR Codes!


The thermal printer takes 2.25" (57mm) wide thermal paper with a max 
roll diameter of 1.5" (39mm). Thermal paper is inexpensive and commonly 
found in most office supply stores in 85ft lengths. You may have to 
remove some paper from these rolls in order for it to fit into the 
printer. But, you can always use the excess paper in the printer, since 
you don’t need to have a ‘core’ in the paper for it to work.


The back panel has 2 3-pin connectors; one for power and one for serial 
communications. The thermal printer ships with default 19200bps baud rate.}


https://www.littlebird.com.au/products/thermal-printer-84b894b4-36b0-4928-a565-421143317622
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-05-02 Thread Bryan Kilgallin

Thanks, Frank:


Bryan says he's got a Linux computer.


My main workhorse is a Dell OptiPlex GX270 running Ubuntu 20.04.2 LTS. I 
also have networked a Lenovo Thinkpad L430, also running Ubuntu.



A printer that natively understand PCL3 ... will commonly understand plain text.

I'll ask around for ancient printers.
--
members.iinet.net.au/~kilgallin/


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


Re: [Freedos-user] Print via USB / deprecate or improve PRINT queue tools?

2021-05-02 Thread Bryan Kilgallin

I wrote:


My main workhorse is a Dell OptiPlex GX270 running Ubuntu 20.04.2 LTS.


That is incorrect. My Linux PC is a Dell XPS 8300.
--
members.iinet.net.au/~kilgallin/


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