I uploaded my
wi-fi network scanner to the network , suddenly someone will come in handy.
You can use, for example, to determine the geographical coordinates of the nearest wi-fi networks in conjunction with the services
wi2geo or
skyhookwireless .
Works (at least, should) in all versions of windows with NT kernel. Tested on XP SP3 and Vista. In Vista +, Wi-Fi Native API is used, in XP and earlier, a survey of the wi-fi card driver through NDIS is used.
')
I will be glad to reviews and bug reports.
Sources in C are attached, license: BSD-like.
UPD: requests for revision are accepted.
UPD2: for those who were wondering why such a thing might be needed:
an example of using this code to determine the current location via the wi2geo service, console / VBS (run run.bat; keep in mind, the example uses a test API key, which is necessary replace with your own).
UPD3: added a
module to get a list of wi-fi networks in Python
UPD4: one more
example , similar to the first one, but for positioning the skyhookwireless service is used. Keep in mind, an example also with a test API key, do not forget to get your key and update it in the source code before using them.
UPD5: fixed a bug in the scanner and examples, because of which the scanner did not work if more than 10 networks were detected, thanks, deniamnet :)
UPD6: Dear wi2geo administration! Some ideas for your service:
- Please add on labs. the logout button - if I want to log in as a different user, I need to restart the browser or clean the cookies - this is wrong.
- There is a lack of a form in which you can enter the coordinates of your home access point - the lat, lon, mac fields and the submit button. And also - the city, street, house, building and submit, the address can be converted into coordinates via Yandex or Google geocoder.
- And it would be great to make an API for bulk fill points. Suppose I write a client program that will work on devices with GPS and wi-fi, and may well collect points for you at the same time (which I am indirectly interested in, because on those devices where there are no gps, you would use your service). Now I would have to force her to send me reports, and upload them manually to your service. Inconvenient.
- It would be great to include scaling the map on labs with the mouse wheel
(you need to add just one line - map.enableScrollWheelZoom (); - to the load_map_all () function) .
Thank you for quickly fixing the errors found earlier :)