n76 / wifi_backend Goto Github PK
View Code? Open in Web Editor NEWLocal (phone only) WiFi AP location provider for microG project's unified network location provider
License: GNU General Public License v3.0
Local (phone only) WiFi AP location provider for microG project's unified network location provider
License: GNU General Public License v3.0
Since I have updated from 0.9.91
to 1.0.0
(F-Droid) unifiedNlp crashes from time to time (the android alert "unifiedNlp stopped" appears) even if I did nothing...
It's a popular wardriving app, which saves observations to a sqlite database. Would be nice to use its local DB seamlessly as it grows. There are two tables, one with a single row per network, and second with all the observations ( >=1 per network).
Some windscreens obscure GNSS more than others. Is there some fun way to change "required accuracy"
The export and import database functionality is great. But I never had import database working. Exporting the database creates wifi.json file. Then when tried to import, the wifi.json file is grayed out just like all other unimportant files. Tapping on that grayed out file does nothing. Please fix this.
Hey, first, cool app and works great.
I've wanted to visualize my collected APs. So I first used jsawk to only select the coordinates and then hamstermap.com to show them on the map.
Next step I did was to use pygmaps to write a simple html which shows points (or circles) of the coordinates.
For now I export my wifi cells, run a script on my PC to see the map with all my collected locations.
It would be cool to have this option directly in the app, so that I don't need to use the export function.
Pygmaps is more or less just doing some html writing. So it should be possible without any helper modules (maybe a json parser because it's easier).
I could help if wanted, but my java times are long time ago and I haven't written any Android App.
But I could show my crude way to display the coordinates now.
Greets
Is there a way to edit (or add/remove) entries in the database?
I have found the wifi.db which i can edit under Windows. But the .db-shm and .db-wal are deleted by that sqlite-programm and the database is broken for the wifi_backend.
I tried to export the database, but the app crashed.
I see that there's no authorization to write to sdcard, is that normal?
I use the 1.1.4 version from F-droid.
I've compiled and tested with API level 17 on an Android 4.2 device, and it seems to work without a problem.
Gathering lots of APs and loosing them accidentally looks to be a major problem. Thanks to the backup/restore functionality, added recently.
It would be nice to have personal database synced to personal storage like google drive, dropbox etc., . Whenever APs get added to database, it need to be synced to online storage. And whenever app is freshly installed and online storage provider is added in its settings (or whenever database is changed online), the personal database need to be pulled to the phone.
Helps lot in not loosing the hard work in collecting APs. Also helps to share and contribute some common database between a group of people (say friends living in approximate same location).
I have this issue on a Samsung Galaxy SIII Mini (i8190N).
I tested the location with a little app, "Here GPS Location" that shows separately the (phisical) GPS coords and the network coords. On about 10% of the location update (randomly) gives me:
Latitude = NaN
Longitude = NaN
Accuracy = 20.412215
I used CyanogenMod 11 (kk4.4.4) and I thought it was some kind of OS incompatibility.
Today I installed the CM12, I installed xposed, unified nlp, and the last version of the personal WiFi backend (v1.0.1).
The % of the NaN events has decreased, but sometimes it still appears.
this is the logcat file (I hope I did it well...)
logcat1.txt
a "NaN" event is on line 11123
are there some informative guidelines for configuring parameters [numeric values]?
some default to 0 [zero]
I have played around with the import/export function in version 1.0.0. However, it only seems to understand .json files. That probably means, it is rather a backup function, allowing to backup collected data and to reload it back into the backend at a later time.
It would be nice, however, if one could add additional data from an external database such as from radiocells.org. They provide their database either in .sqlite or .csv format. It would be great if one could add those data (and even upload the collected data back to radiocells.org).
Wouldn't a cooperation between this project and radiocells.org / openbmap.org be a nice idea?
By the way, when I use the import function, will the existing data be overwritten or appended?
given
microg/UnifiedNlp#124
Which mock setup would allow this?
Battery stats show that Local WiFi backend is second in power consumption after the screen (~20%), although I had the location disabled on the phone.
I am using OMNI Kitkat 4.4.4
With the latest updated to UnifiedNlp I've been able to get the local gsm back end to run. But I'm unable to get the local WiFi back end to record any access points. I've biked/driven around town running MozStumbler, which is recording WiFi and cell tower info just fine.
So 2 questions:
I know that this is strange but I delete the known APs database frequently.
I have to go into the android setting, and manually clear the app data.
Would it be possible to add a simple "Delete database" button inside in the app itself instead of the raw "clear data"?
I would be very grateful! (Actually I should say "I would be even more grateful" XD I'm using this backend every day since about 2 year and I have to say THANK YOU, and GOD BLESS YOU for this beautiful app, I'm already grateful :)
Thanks for this great app! I've been wanting to look into writing such a thing, and it's a gift to find it here.
There's a feature I have in mind - seeding the database with public AP data. I haven't thought this through completely yet, but as a first step I'm thinking of either
Both would require some scripts to keep the datasets updated, but I'd be happy to look into that. Both would require some UI to ask the user what to download. When the datasource is stored in the local db as well, this would allow updating as a later improvement.
Known services with open AP-position data:
Is there any interest in such a feature? Does it belong here or in another app (if possible at all)?
I think the database only uses the fields bssid , lat , lon , ssid .
I would like to request to include more wifi parameters like
channel
speed - 54 / 54e .
encryption - open / wep / wpa / wpa2 .
cipher - TKIP / CCMP .
auth - psk .
gps accuracy.
Since there is no in-app option to contribute the data to a centralized server, I think its safe to include those parameters. So, people can know better about the wifi networks around them.
Thanks.
Please guide me away from accuracy detrimental fiddling of settings, but also help me understand how to evaluate settings changes. I have read the settings change description in the editor, however I cannot grasp the implications.
I want to start by requiring a higher gps accuracy. My handset is frequently capable of 3 meter precision.
Would be useful for people to know how well this is working. Just display the total number of APs and/or samples being stored as well as the last time that database was updated with new ones.
Since this works passively and requires the phone to have an accurate GPS lock, which may require an app starting this process, it'll help users make sure the app is working.
It would be useful if this project separate out the UI components and services such that it can be re-used in other Android apps as a library module.
This would be for doing location lookups without utilizing Google Play on non-rooted Android phones. Basically, using the local wi-fi database and gps to determine location.
Now I understand how it works.
This backend is great and gives much much better accuracy than other wifi location providers.
I wish there is database collection from this app and contributing to a common database available publicly under some open license. So one can download much wider accurate data, filter it and import it into this app for a better location. Later maybe someone will split up the data and provider as regional database, like in LocalGsmBackend. If it bloats this, maybe as a separate wifi stumbler application with accuracy and other parameters same as this app.
Helps a lot. Any plans?
Similar to your GSM Location Provider, support downloading and use of external databases for offline use. Is this practical?
Hi there,
Is there an option to see what APs are stored in the local DB ? And, if appropriate, delete some or all of them ?
On my Galaxy Nexus (maguro) with CyanogenMod 11 M12, I sometimes get less accurate position when using "high precision" location rather than GPS only (about 50-200m off when I'm at home :-( ), and I believe I might be able to help troubleshoot that issue which such a feature.
While debugging a bit, I noticed that the WiFiSamplerService:WifiSampleReceiver receives a lot of wifi samples, but often isScanStarted() returns false. I guess this is because GPS location and wifi scanning is asynchronous and other apps on the phone initiate wifi scans.
Depending on what applications are running or which other UnifiedNLP plugins you have running one might miss quite a few samples.
So I was thinking: Can't we save the time of the GPS fix and for the next X seconds, we take all the samples we get and add them to the database? Not sure what X should default to, but I guess a few seconds won't hurt.
What do you think?
I am not really sure I am describing this precisely and correctly, but it seems that access points from the currently connected SSID are not used. Or maybe no access points are used when connected. I am often in a place with a handful of APs on one SSID, and no other APs in range. Here, I get no location. If I move several hundred meters and pick up an AP from a network that I don't associate with, it works. Or it works with the APs I use as I approach. Again, take details with a grain of salt.
I wonder if no one else notices because the idea of not picking up foreign APs just doesn't happen in the city.
Yes, I know I should run adb.
use quickfilter to search/filter database for ssid, bssid or any other fields.
So, we can search the access points we already know within the huge database.
I'm using this backends with microg on cm13 and I have two questions:
As the title says an option to export the database to a file and import it again.
Other options like resetting the db would be nice too. I can also take a look at it and try it if you're busy.
Normally my mobile is in nongps-location-state. I switch gps on and off with e-robot when certain apps are opened. When I want to collect APs I start a gps tracking activity. Most of the time I need to switch the backend off and on again after my gps is switched on. Otherwise no new APs are collected. Haven't found useful things in logcat.
This app was built for an older version of Android and cannot be updated automatically.
OS version: Funtouch OS 14
Model: Vivo T1 4G (V2153)
Hardware version: MP_0.1
Build number: PD22010F_EX_A_14.2.7.12.W20
Baseband version: S.HA.1.1.c2-00054-DIVAR_GENSP_PACK-1.29062.88
Kernel version: 4.19.157-perf+, 1 Wed Jun 5 10:25:33 CST 2024
Compile time: 5 Jun 2024 05:20:41
Android security update: 1 June 2024
Google Play system update: 1 May 2024
Issue related to #56?
Hi there,
I started using µg Unified NLP Provider last week (using the XposedUnifiedNlp module since I also have GApps installed) and set up both your GSM and wifi backends.
I also use Mozstumbler from time to time, and I read about their "_nomap" opt-out mechanism here : https://location.services.mozilla.com/optout
My question is : how does Local WiFi Backend handle SSIDs that end in "_nomap" ? Are they stored ? Are they discarded ? Maybe only store "_nomap" SSIDs that I'm actullay connected to (such as my own) ?
Hardware is OnePlus 5T dumpling, running microG lineageOS 16.
The default value for "moved threshold" is 1250m which feels a bit excessive. Fairly often, I've run into situations where my GPS is giving a false location because wifi_backend has collected some bogus data somehow, but won't change it even when the actual hardware GPS is giving the correct location, because the bogus data is within 1250m of the new correct data.
I suppose 1250m perhaps was chosen for the case when you're in a large building where the same wifi network stretches a long distance. But even in this case I'd argue the current behaviour is confusing, since it will pinpoint you at a particular point in the building even if you're somewhere else. Also, I've never needed this functionality - generally buildings block GPS and I have to lean by the windows to get a signal anyway. If I'm sitting in an office, I'd rather lean against my own window and have wifi_backend use the location of my window, rather than the location of the entrance I entered the building through. (And I stress again, I have not actually encountered this situation IRL.)
I am now getting reasonable results when I set "moved threshold" to 50m (down from 1250m) and "moved guard" to 100 samples (down from 500), with the minimum distance remaining at the default value of 25m.
Another thing is the "required accuracy" might be better set as 15m - I've been in a fair number of situations where the GPS signal is not that great, but 15m is achievable.
Generally, since we're continuosly collecting data anyway, there is no reason we should make it "too hard" to move an AP location when we get new data. The only purpose of this feature should be to avoid moving the AP location by tiny amounts every millisecond which might waste power - not to blindly believe that old data is somehow more valid than new data, and block updates.
It seems that the project can not compile scessfully on new AndroidStudio now.
Can help to solve it ?
ERROR: Could not find method apt() for arguments [build_59rwz939v5z30osmtyqj8znry$_run_closure3@437bac72] on project ':app' of type org.gradle.api.Project.
I have translated your application into fr
(French). Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<resources
xmlns:tools="http://schemas.android.com/tools";
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
tools:ignore="MissingTranslation">
<string name="app_name">WiFi Location Service</string>
<string name="app_title">Service de localisation Wi-Fi</string>
<string name="summary">Géolocalise en utilisant une base de données des antennes Wi-Fi générée et stockée sur le téléphone</string>
<!-- GPS preferences -->
<string name="gps_config">Paramétrage GPS</string>
<string name="gps_accuracy">Précision exigée</string>
<string name="gps_accuracy_description">L\'erreur de précision GPS ne doit pas dépasser cette valeur (en mètres).</string>
<string name="gps_min_distance">Distance entre les enregistrements</string>
<string name="gps_min_distance_description">Distance minimale entre les enregistrements GPS (en mètres)</string>
<string name="gps_min_time">Intervalle entre les enregistrements</string>
<string name="gps_min_time_description">Intervalle de temps entre les enregistrements GPS (en secondes)</string>
<string name="gps_valid_time">Temps de validité de la position GPS</string>
<string name="gps_valid_time_description">Temps pendant lequel la dernière position GPS est valide (en secondes)</string>
<!-- AP preferences -->
<string name="ap_config">Paramétrage des points d\'accès Wi-Fi</string>
<string name="ap_min_range">Portée minimale du point d\'accès Wi-Fi</string>
<string name="ap_min_range_description">Portée minimale présumée pour un point d\'accès Wi-Fi (en mètres).</string>
<string name="ap_moved_range">Seuil de déplacement</string>
<string name="ap_moved_range_description">Portée maximale présumée pour un point d\'accès Wi-Fi (en mètres).</string>
<string name="ap_moved_guard">Protection contre le déplacement</string>
<string name="ap_moved_guard_description">Nombre de détections à une nouvelle position avant de déplacer le point d\'accès Wi-Fi.</string>
<string name="db_size_label">Nombre de points d\'accès Wi-Fi connus</string>
<string name="db_change_label">Nombre de points d\'accès Wi-Fi (nouveaux ou mis à jour)</string>
<!-- Generic suffix strings -->
<string name="pref_meters">xliff:g id=\"number of meters\" exmaple=\"42\" >%s</xliff:g> mètres</string>
<string name="pref_seconds"><xliff:g id=\"number of seconds\" exmaple=\"42\" >%s</xliff:g> secondes</string>
<string name="pref_samples">xliff:g id=\"number of meters\" exmaple=\"42\" >%s</xliff:g> enregistrements</string>
<string name="statistic_records"><xliff:g id=\"number of APs\" example=\"12\" >%1$d</xliff:g> APs</string>
<string name="statistic_changed"><xliff:g id=\"number of new or updated APs\" example=\"12\" >%1$d</xliff:g> APs</string>
<string name="drawer_settings">Paramètres</string>
<string name="drawer_advanced">Avancé</string>
<string name="drawer_libraries">Bibliothèques externes</string>
<string name="drawer_website">Site internet</string>
<string name="preference_grant_permission">Taper pour autoriser la permission de localisation (nécessaire)</string>
<string name="title_wifi_list">Wi-Fi</string>
<string name="title_wifi_detail">Détails Wi-Fi</string>
<string name="wifi_detail_accuracy">Portée observée : %s</string>
<string name="wifi_show_map">Voir sur la carte</string>
<string name="data_export_all">Exporter toutes les données</string>
<string name="data_export_changed">Exporter les données modifiées</string>
<string name="data_export_error">Impossible d\'exporter les données</string>
<string name="data_import">Importer les données</string>
<string name="data_import_error">Impossible d\'importer les données</string>
</resources>
Translation made with Stringlate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.