Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

Lpr and Rndis


Recommended Posts


Env: Windows 7 enterprise x64 (SP1 + convenience rollup kb3125574)

i'm able to succesfully print to lacal device usign lpr

this command works

lpr -S -P HP filetoprint

when  i connect my laptop pc to internet using Android device USB tethering then lpr is unable to find printers 

i get the following message

Windows LPD ServerError: specified printer does not exist

i get the same message if i issue  "lpq -S -P HP"

i spent a lot of time isolating this error ...it is due 100% to RNDIS interface activation ...as i deselect "usb tethering" in the smartphone, lpr starts working correctly .....

thanks in advance for the support  


Link to comment
Share on other sites is "self".

Do you have an IP address when tethered (that you have not when not tethering)?

i.e. if you run IPCONFIG /ALL when tethered and not tethered do you see any difference?



Link to comment
Share on other sites

Hi Jaclaz

Thanks for the answer

Because the problem sounds STRANGE and hard to believe i create this batch file

@echo off
ipconfig  /all >rndis.txt
if %ERRORLEVEL%== 0 (
    lpq -S -P HP >>rndis.txt
if %ERRORLEVEL%== 0 (
    timeout /T 15
    ipconfig  /all >nocon.txt   
    lpq -S -P HP >>nocon.txt  

i launch the batch when Pc connect to internet via android usb tethering and i disconnect during timeout

i attach  rndis.txt and nocon.txt
as you can see when rndis is active lpq is unable to find the printer 

...mumble...mumble ....


rndis.txt nocon.txt

Link to comment
Share on other sites

Yep, good :) , what I suspect is not that the printer cannot be found, but rather that lpq wants the "real" IP address.

what happens (when you are connected) with a batch *like*:

SET myLocalIP=
FOR /F "tokens=2 delims=:(" %%A IN ('TYPE rndis.txt ^|FIND "IPv4 Address."') DO ( 
SET myLocalIP=%%A
ECHO Local IP is%myLocalIP%
ECHO Press a key to run command:
ECHO lpq -S%myLocalIP% -P HP
ECHO or press CTRL+C to terminate the batch
lpq -S%myLocalIP% -P HP

Of course, you can (should) replace the 

TYPE rndis.txt





Edited by jaclaz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...