June 27, 20206 yr Hi 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 127.0.0.1 -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 127.0.0.1 -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 Maurizio
June 27, 20206 yr 127.0.0.1 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? jaclaz
June 27, 20206 yr Author 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 127.0.0.1 -P HP >>rndis.txt ) if %ERRORLEVEL%== 0 ( timeout /T 15 ipconfig /all >nocon.txt lpq -S 127.0.0.1 -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
June 28, 20206 yr 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*: @ECHO OFF SETLOCAL SET myLocalIP= FOR /F "tokens=2 delims=:(" %%A IN ('TYPE rndis.txt ^|FIND "IPv4 Address."') DO ( SET myLocalIP=%%A ) IF NOT DEFINED myLocalIP SET myLocalIP= 127.0.0.1 CLS ECHO Local IP is%myLocalIP% ECHO. ECHO Press a key to run command: ECHO lpq -S%myLocalIP% -P HP ECHO. ECHO or press CTRL+C to terminate the batch ECHO. PAUSE lpq -S%myLocalIP% -P HP Of course, you can (should) replace the TYPE rndis.txt with IPCONFIG /ALL jaclaz Edited June 28, 20206 yr by jaclaz
June 28, 20206 yr 4 hours ago, bong.mau said: WORKS !! JACLAZ...GREAT SUPPORT !! Ciao ...Maurizio Good . Another happy bunny in the basket. jaclaz
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now