OpenWlanMapNlpBackend icon indicating copy to clipboard operation
OpenWlanMapNlpBackend copied to clipboard

OpenWLANMap API refusing connection

Open n76 opened this issue 10 years ago • 2 comments

Might be an issue with OpenWLANMap rather than this code but I am getting a connection refused error:

W/System.err(18039): java.net.ConnectException: failed to connect to api.openwlanmap.org/85.25.149.22 (port 10443): connect failed: ECONNREFUSED (Connection refused) W/System.err(18039): at libcore.io.IoBridge.connect(IoBridge.java:114) W/System.err(18039): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) W/System.err(18039): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) W/System.err(18039): at java.net.Socket.startupSocket(Socket.java:566) W/System.err(18039): at java.net.Socket.tryAllAddresses(Socket.java:128) W/System.err(18039): at java.net.Socket.(Socket.java:178) W/System.err(18039): at java.net.Socket.(Socket.java:150) W/System.err(18039): at com.vwp.libwlocate.WLocate.get_position(WLocate.java:172) W/System.err(18039): at com.vwp.libwlocate.WLocate.run(WLocate.java:297) W/System.err(18039): at java.lang.Thread.run(Thread.java:841) W/System.err(18039): Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused) W/System.err(18039): at libcore.io.Posix.connect(Native Method) W/System.err(18039): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85) W/System.err(18039): at libcore.io.IoBridge.connectErrno(IoBridge.java:127) W/System.err(18039): at libcore.io.IoBridge.connect(IoBridge.java:112) W/System.err(18039): ... 9 more D/org.microg.nlp.backend.openwlanmap.BackendService(18039): wloc_return_position ret=1 lat=0.000000 lon=0.000000 radius=10000.000000 ccode=0 cog=-1.000000

Looks like there is a newer libwlocate but the new one is now attempting to do more than just look up WiFi locations and includes GPS and IP location logic. If you attempt to simply use that in OpenWlanMapNlpBackend there is an error due to starting the GPS receiver in a different thread.

It looks like the new libwlocate uses the same port and IP address, so maybe the issue is with the server rather than this code. Or maybe they are blocking my IP address for some reason.

n76 avatar Dec 09 '14 21:12 n76

libwlocate from sf has changed the way pulling data from openwlanmap.org from using socket to http.

CokeFever avatar Jan 20 '15 02:01 CokeFever

So this is a libwlocate issue?

frazzmark avatar Nov 05 '15 22:11 frazzmark