microg / microg/OpenWlanMapNlpBackend

OpenWLANMap API refusing connection

Open
#3 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
39
Forks
12
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing OpenWlanMapNlpBackend and the libwlocate calls around WLocate.get_position at line 172. Reproduce the connection failure to api.openwlanmap.org on port 10443 and verify whether the newer library's GPS-thread behavior is involved. Done means identifying a confirmed project-side cause and fix, or documenting that the external server is responsible.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.