Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Laaca

Homepage

Czech republic,
27.02.2012, 20:14
 

Network printer in DOS (Users)

With normal LPT1 attached printer I can print the file by "copy file.txt prn"
Can I somehow in DOS send file for print to printer?
Maybe with network utility netcat?
Which protocal (besides TCP/IP) is used when transfering data into network printer?

---
DOS-u-akbar!

bretjohn

Homepage E-mail

Rio Rancho, NM,
28.02.2012, 01:48

@ Laaca

Network printer in DOS

What kind of network/servers are you using?

I'm no expert (not by a LONG shot) on networking, but here's my experience.

If you are using a commercial DOS networking product (I used to use LANtastic a lot), everything you need to set up one of the computers as a print server is included. This would even work with one of the computers DOS and the other Win (at least up through 9x with LANtastic).

There are also the "free" MS networking utilities, as well as some other free networks that you could download. This was way before "IP" and "networking" became somewhat synonomous -- I think they all used NETBIOS. There were also some utilties that would let you create a network with NULL Modem or direct parallel (InterLnk) cables.

I don't remember the names of the programs, unfortunately. You might still be able to find some of them on Garbo or someplace like that.

On modern systems, it's many times easier to use the old SneakerNet and copy the file to a flash drive.

Laaca

Homepage

Czech republic,
28.02.2012, 06:50

@ bretjohn

Network printer in DOS

I have no fullfeatured DOS network. I just have installed a packed driver and via local switch I connect to internet or send files between my two DOS computers when one configure as FTP server and the second one as FTP client.
I never installed LANtastic or MS network. Maybe I could try it.
However I am not sure whether it helps because eartlier was printers normally attached by LPT1 to server and client computers accesed the server which talked with printer. So from point of printer there was no diference when worked in network or not.

---
DOS-u-akbar!

Arjay

28.02.2012, 07:50

@ Laaca

Network printer in DOS

> I have no fullfeatured DOS network. I just have installed a packed driver
> and via local switch I connect to internet or send files between my two DOS
> computers when one configure as FTP server and the second one as FTP
> client.
If you have a printer with an IP card (not expensive these days). Have a look at going down the RAW port 9100 route which can be done with netcat, telnet. Search for "raw 9100 print".

> However I am not sure whether it helps because eartlier was printers
> normally attached by LPT1 to server
Correct. Later came boxes which allowed serial printers and then parallel printers to be connected. Then embedded IP cards.

> So from point of printer there was no diference
> when worked in network or not.
Well not fully. Most DOS printer redirectors replaced the value of LPT3 or LPT4 in the BDA which caused somme problems with other utils. Mostly the LPT3 one was used.

Laaca

Homepage

Czech republic,
28.02.2012, 15:44

@ Arjay

Network printer in DOS

Thanks!
I searched on internet and found this page: http://members.shaw.ca/nicholas.fong/printsrv/console.html

I tried NetCat from MTCP package and wrote "nc -target 192.168.4.102 9100 < file.txt"

but I hadn't success. Got this error:

Server resolved to 192.168.4.102 - connecting
Socket open failed
Tcp: Sent 1 Rcvd 1 Retrans 0 Seq/ack errs 0 Dropped 0
Ip: TcpRcv: 1 UdpRcv: 0 IcmpRcv: 0 Frags: 0 CSumE: 0 ProtE: 0
Packets: Sent: 2 Rcvd: 2 Dropped: 0 SndErrs: 0 LowFreeBufCount: 19


Then tried in Windows 7, none error message was written but nothing was print on printer.

---
DOS-u-akbar!

bretjohn

Homepage E-mail

Rio Rancho, NM,
28.02.2012, 19:35

@ Laaca

Network printer in DOS

I looked, and discovered an old reference I had to some free networking SW you can try if you want. Go to this page:

http://jumpjet.info/DOS_Lives/07/UNCONFIGURED.htm

and look for NEOS (Network Enhanced Operating System). It's a relatively simple DOS peer-to-peer network. I don't know if it will work for you or not, but it might since both of your computers are DOS.

Arjay

28.02.2012, 21:20

@ Laaca

Network printer in DOS

> but I hadn't success. Got this error:
>
> Server resolved to 192.168.4.102 - connecting
> Socket open failed
OK, looks like the port is unavailable to connect to. What printer is it? Have you checked if raw printing has been enabled on its built in or external network card? Have you checked if port 9100 is being blocked by a firewall etc.


> I tried NetCat from MTCP package and wrote "nc -target 192.168.4.102 9100 <
> file.txt"
Firstly I would suggest using -vv for extra verbose on netcat. Also be aware that command line help for nc is normally obtained via "nc -h" due to its Unix heritage. I would strongly suggest using the -w 1 option as that page refers to for a slight wait since it can make a big difference with netcat.

[edit] I suspect most likely "raw" printing is either not supported on the printer or more likely turned off hence question as to which printer make/model.
Many older printers also liked to get a CTRL ^L (line feed character) on the end of text files as a termination. Again unlikely to be the answer to this issue but worth trying if all else fails.

mbbrutman

Homepage

Washington, USA,
01.03.2012, 06:19

@ Laaca

Network printer in DOS

I think your netcat parameters are mostly correct. The error message is telling you that the target does not have port 9100 open for TCP/IP. There was probably one ARP packet sent, one ARP packet received, a TCP/IP packet to open the connection, and a TCP/IP reset received to tell you that 9100 was invalid.

I tried this against my recent Brother laser printer which is network connected. The first attempt was slightly off - I needed to add carriage return characters. That problem can be solved by using the -bin option to preserve the CR/LF pairs in the file, or by using the -telnet_nl option.

An important thing to note is that not all printers have the smarts to listen on port 9100 and accept raw input. I paid a little extra for a printer that has Postscript (BrotherScript), PCL6 and some old Epson emulation.

-Mike

---
mTCP - TCP/IP apps for vintage DOS machines!
http://www.brutman.com/mTCP

Rugxulo

Homepage

Usono,
02.03.2012, 06:37

@ mbbrutman

Network printer in DOS

(forwarding some useful info from resident FreeDOS guru, Eric Auer):

> Somebody ported Samba smbclient to DOS a while ago. It is
> mainly a command line FTP client style way to access Win
> network drives, but if the port is full-featured, it can
> also be used for printing, as decribed for example here:
>
> http://wls.wwco.com/lqh/sambaprint.php
>
> http://en.opensuse.org/SDB:Printing_via_SMB_%28Samba%29_Share_or_Windows_Share
>
> There is also something called Internet Printing Protocol
> (port 631) but the RFCs for that are sort of long...

Back to the board
Thread view  Mix view  Order
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum