4

My ultimate goal is to send a print job to a printer over the internet. The catch is that the printer is connected directly to a router, so I can't count on a computer processing anything.

The path a print job takes is: Computer -> Internet -> Router -> Printer

The printer is an Epson TM-T88V with the UB-E02 connect it module (it originally came with the 25-pin module).

The router is a D-Link DIR-655 with port 9500 redirected to LAN port 9100 and the LAN IP address of the printer. With this setup, I can enter the router's WAN IP address + port 9500 in a web browser and the printer spits out the HTTP request it receives.

From the terminal, if I use lpr (specifically lpr -h ip-address:9500 filename.txt), the printer prints the HTTP request it receives (not the file) and lpr appears to just be waiting for a response. According to the UB-E02 Technical Reference Guide, the Connect-It module supports lp/lpr.

Why is it that the printer prints the HTTP request and doesn't send a response back?

J.C.
  • 893
  • 14
  • 27
  • Sorry I have to "answer" the post since I can't comment now (new account). Did you have to install any driver for your printer? What device are you printing from? I am trying the same thing on an iPad. Not sure if I need to install any driver. – leo May 16 '11 at 04:25
  • No worries. I ended up setting up a central print server that receives print jobs from the iPad over the internet and forwards them to the appropriate printer. It _should_ be safer this way (with port knocking and etc). If you can set up printing over the internet with a computer, then you'll be able to write a script that uses lpr to forward the print job from the iPad to the printer. On the router connected to the printer, I had to forward an external port to internal port 515. So ip + port number = forwarded print job. Hope this helps. – J.C. May 18 '11 at 16:39
  • I want to connect a iOS device to a printer which is on another subnet. As the discussion may be bit long and as there is no place to continue talks here so can I talk to you over mail or facebook or linkedIn ? My email is "rppatnayak54@gmail.com" and you can find me on facebook n linkedIn with id "rameswar54". – Rameswar Prasad Nov 17 '14 at 08:50

1 Answers1

2

The port you opened is likely the raw data dump port for the printer. Likely there is a seperate port which speaks RFC1179 that will speak to your lpr client.

You should not be sending HTTP control to either of these ports.

Jé Queue
  • 10,359
  • 13
  • 53
  • 61
  • 1
    Forwarding port 515 was the key. Now I can print over the internet. Thanks! – J.C. Jan 11 '11 at 21:59
  • Do be careful, LPD is not an authenticating protocol and someone could print lots of full-black pages with little effort and waste lots of your resources. May want to wrap with SSH or a port-knocking `lpr`. – Jé Queue Jan 11 '11 at 23:24