Open Sylv41n opened 13 years ago
The scan also checks for other variables: the minimum noise of AP, and the GPS accuracy. The GPS may be detecting a position but if the accuracy isn't under the specified one (if i recall it's 50 meters) the scan doesn't even begin. Tried to turn on the 'notify' thing for new APs and see if that pops up?
Other than that, I'd need the logcat of the device to know what's happening.
Sadly I can confirm this issue. I'm using the HTC Sensation, Android 2.3.4 (4 days old). Tested to see if it was a connection issue.. went outside and stood still until it said it got my location from GPS then walked as opposed to driving. I walked because there are easily 15 different wifi networks close to my house. I ensured that the notify me of new unsecured wireless networks option was checked as you said. I'm fairly new to android but I will supply you with whatever you need. I really want it to work since it uses google maps. Which will make it far better than the wigle app. I'll pm you with my email address so we can get this small issue fixed, on what looks to be a super app!
EDIT Raffaeleragni I've solved the AP problem, but since I know nothing of how to code I'm not sure how to implement it. I read in a thread about this app that if you change any settings you have to restart the entire phone. So I powered off completely., powered it back on and tried and it is working. Something about changing a setting causes it to stop scanning. And it does not announce that it has stopped. So for Sylv41n I would recommend the same, adjust settings then power phone completely off then back on. Once the device is on try opening the app. That should resolve the issue. Thanks and enjoy.
It could be the WiFi disabling automatically. Try this: Settings -> Wireless & Networks -> Wi-Fi settings -> [menu key] -> Advanced Here, try setting the Wi-Fi sleep policy to either 'Never when plugged in' or 'Never'. In this way if you turn on the WiFi, the phone will keep it up unless you explicitly shut it off.
I'm not comfortable with making the code change this behavior, because it could possibily alter the behavior of the cell phone. Consider for example, that while you're scanning it detects an open wifi, and you set the phone to autoconnect... if you explicitly say the system to disable the wifi the program shouldn't return it up without your explicit consent, and it can't ask it all the times... it does only on startup in fact. So I'm unsure if this practice will be a 'bad practice' or bad behavior for the app. Not to mention I'm not even sure if those system behaviors can be overridden.
Neo210 is correct. On the Galaxy S2 you must power cycle the phone for the settings to take hold.
I also had to set the gps accuracy to 150 metres, but that may just have been my location or because I was indoors.
Sleep mode was not enabled on my phone. Wifi was set to never sleep.
I see that changing the code for this would actually cause more problems. I would say leave it the way it is and if you make another version just add a pop up stating that the program will need to be force closed to save all settings. From my understanding, to fix it we (the users) would have to actually tell the device to no connect everytime a wifi is detected. That seems like a lot more trouble then just activating program then adjust settings then restart program. As raffaeleragni said this would be a "bad practice" and if you have any wifi settings saved you would have to change them again after running the app if this problem is fixed. So I vote is leave it as it is. Just add a pop up reminding users to force close the app and restart after changing any settings. As for the GPS accuracy, when I'm outside the default of 50 seems to be fine for me. I wanted to take another chance to thank Raffaeleragni for this program it does everything I want.
This sounds a lot like my issue, except I've never seen Wardrive log any APs. I've killed both app and service, power cycled the phone, and tried in several locations at several times. It shows "ME" on the map to about ten feet, and setting the GPS accuracy to 150 didn't help. Minimum signal is set to -99.
WiGLE works properly on this phone, but your map does seem preferable.
SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(android_metadata); PRAGMA TABLE_INFO(networks); SELECT name, sql FROM sqlite_master WHERE type='index'
Well, that may be a fluke - the SQLite Browser doesn't seem to be working even on known good files today. Last time I tried it it had no problem showing my 300MB+ Chrome history file... With a hex editor the Wardrive database is all zeros after the initial structure section.
I don't see any signs of Wi-Fi activity in the aLogcat logs I just grabbed, but I have no idea what I'm looking for. Is there some way I could send them to you?
Loren
Wow! Sorry for the big type - I haven't a clue what I did to cause that,,, I had sets of five dashes around the database quote, that don't show in the post, but the divider lines that do show are not in the locations where the missing dashes were. I'm not finding any large type in the "markdown" doc...
I've restarted Win7 and the SQLite Browser is working again. Doesn't crash on your file, and shows the following queries: (no dividing dashes this time)
SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(meta); PRAGMA TABLE_INFO(urls); PRAGMA TABLE_INFO(visits); PRAGMA TABLE_INFO(keyword_search_terms); PRAGMA TABLE_INFO(downloads); PRAGMA TABLE_INFO(segments); PRAGMA TABLE_INFO(segment_usage); PRAGMA TABLE_INFO(presentation); PRAGMA TABLE_INFO(visit_source); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM meta ORDER BY rowid; SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(meta); PRAGMA TABLE_INFO(urls); PRAGMA TABLE_INFO(visits); PRAGMA TABLE_INFO(keyword_search_terms); PRAGMA TABLE_INFO(downloads); PRAGMA TABLE_INFO(segments); PRAGMA TABLE_INFO(segment_usage); PRAGMA TABLE_INFO(presentation); PRAGMA TABLE_INFO(visit_source); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM meta ORDER BY rowid; SELECT rowid, * FROM downloads ORDER BY rowid; SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(android_metadata); PRAGMA TABLE_INFO(network); PRAGMA TABLE_INFO(location); PRAGMA TABLE_INFO(sqlite_sequence); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM android_metadata ORDER BY rowid; SELECT rowid, * FROM network ORDER BY rowid; SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(android_metadata); PRAGMA TABLE_INFO(networks); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM android_metadata ORDER BY rowid; SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(android_metadata); PRAGMA TABLE_INFO(networks); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM android_metadata ORDER BY rowid; SELECT name, sql FROM sqlite_master WHERE type='table' ; PRAGMA TABLE_INFO(android_metadata); PRAGMA TABLE_INFO(networks); SELECT name, sql FROM sqlite_master WHERE type='index' SELECT rowid, * FROM android_metadata ORDER BY rowid; SELECT rowid, * FROM networks ORDER BY rowid;
The networks data is totally empty, as suspected.
Loren
Win7? Are you using a windows phone? This is android app. That might be your problem.
Wardrive is (sort-of) running on my Moto Electrify (like a Photon, but only CDMA) with Android 2.3.5. To see inside the wardrive.db3 file it makes, I copied that file to Win7 and opened it with SQLite Browser there.
I just tried OpenSignalMaps, and they also fail to find my Wi-Fi: http://opensignalmaps.com/forum/topic/wifi-mode-doesnt-work?replies=4#post-399 They actually force close when I try to turn it on inside the app (when it is already on). Several other users with different phones see the same issue there. I wonder if there is a connection...
Try to enable the notification for when it finds a new WiFi, helps to understand if it catches something. Check the WiFi power saving settings. The default has changed between android versions (and maybe keeps changing). On any exception or error, the WiFi scanner should show an error message (ScanService.java:378). I'm not sure if WiFi can scan if you're currently using it connected to something.
Raffaele,
Try to enable the notification for when it finds a new WiFi, helps to understand if it catches something.
Notifications have always been on.
Interesting I just noticed the Statistics said "Last app run" with the current date/time, but "Last service run" said Dec. 31! The service dot was green always, and the log showed the service already created. I stopped and restarted the service and the "Last service run" updated to just before "Last app run" (not the time I restarted it). No difference in operation.
Check the WiFi power saving settings. The default has changed between android versions (and maybe keeps changing).
Wi-Fi is clearly on and running, set to stay on if screen is on or charger is connected. I have seen updates arrive and data syncs take place while trying to run Wardrive.
On any exception or error, the WiFi scanner should show an error message (ScanService.java:378).
Only one item in the log under ScanService: 01-07 21:37:16.656 I/am_create_service( 1594): [1079027824,ki.wardrive/.ScanService,,324]
Later after quitting Wardrive there is a matching destroy_service... Nothing else.
I'm attaching some logs, from just now and from last time I tried this. I see all the GPS and program interface items, but I don't see any sign of any Wi-Fi scanning. If you tell me what logs and filters you would like to see, I can capture them.
I'm not sure if WiFi can scan if you're currently using it connected to something.
I've tried disconnecting from my AP and then starting Wardrive - no difference. Connecting then while Wardrive is running doesn't help either. The WiGLE program can scan while I'm connected and actually using the Wi-Fi - maybe they use a different method?
Curious why this doesn't work!
Loren
Reply to this email directly or view it on GitHub: https://github.com/raffaeleragni/android-wardrive/issues/1#issuecomment-33 74716
| Loren Amelang | loren@pacific.net |
The last service execution is intended from the last time you have last stopped the application. If it's been always running it's not updated. Fixed a warning, but that had nothing to do with that behavior.
I can't see your logs
Guess the eMail attachment didn't propagate to here. Logs are now at: http://www.psychoros.com/Wardrive_alogcat.zip
The OpenSignalMaps people dropped an update this morning and now they find my Wi-Fi just fine. They just say, "Fix to the wifi mode" so I have no idea what they did, but it seems to have worked.
Let me know if more logs or other filters would help.
Loren
On a Samsung Galaxy S2 (GT-I9100) Android 2.3.3
No access point is detected (there's plenty around, confirmed using different apps)
GPS works OK, the moving map also. Tiles are downloading, the Wardrive service is running. The "list current WiFis" page is empty.