Firefox extension to xmit visible wifi ap's to central server

13 views
Skip to first unread message

samkeen

unread,
Apr 7, 2010, 5:47:33 PM4/7/10
to Geomena
Well, at least it did that in 2007

http://github.com/samkeen/wiffu

Hey Adam, here is that firefox addon i wrote many moons ago. I think
the concept could be useful for Geomena and maybe something useful
could be gleaned form this code (especially if I find the source for
the java files)

I'm pretty sure there are some FF addon rockstars on the list so we
could maybe build a generic addon that

- determined the OS it was running on.
- ran the appropriate command-line utility to get visible wifi access
points
Apple : /System/Library/PrivateFrameworks/Apple80211.framework/
Versions/A/Resources/airport
Windows : ?
Linux: iwconfig on others (http://wirelessdefence.org/Contents/
LinuxWirelessCommands.htm)
- sent that data through XHR to a central server

AdamD

unread,
Apr 9, 2010, 12:47:36 PM4/9/10
to Geomena
That's great, Sam. I started a page on the Wiki for the tracking these
command line utilities:
http://bitbucket.org/donpdonp/geomena/wiki/WiFiSniffing

Anybody have info on the Windows path(s)? I believe Dietrich Ayala (on
list) offered to put together the Firefox extension once we have "all"
the potential command line tools.

--Adam

Sam Keen

unread,
Apr 9, 2010, 5:00:10 PM4/9/10
to geo...@googlegroups.com
I ran a decompiler on those java classes.  Result is that there is not much useful there. Dietrich can come up with something better and more quickly. 
I'll see about hacking on that with him.

As for windows, I just remember pain when looking for simple DOS wifi commands...
I'll add to that wiki if i find anything

--
To unsubscribe, reply using "remove me" as the subject.



--
Sam Keen
@samkeen

Jorge Silva

unread,
Apr 10, 2010, 11:20:29 AM4/10/10
to geo...@googlegroups.com
We made a prototype port of iwlist for windows a while ago, should still
be functional:
http://tinyurl.com/yb9kdan

Re: firefox I am not sure what you are looking for, but maybe you'll
find this code useful:
http://tinyurl.com/yc4hb73

we use it in the firefox extension demo of our indoor positioning engine:
https://addons.mozilla.org/en-US/firefox/addon/13227
http://scyp.atrc.utoronto.ca/projects/tagin

hope it helps!
Jorge

Dietrich Ayala

unread,
Apr 10, 2010, 8:19:43 PM4/10/10
to geo...@googlegroups.com
Thanks Jorge! Those links help a lot.

I could definitely see an extension that uses the nsIWifiMonitor API
to enumerate access points, use the geolocation API for lat/lon, and
stays resident, constantly pushing data to Geomena.

Now, Sam brought up a good question: Using the Firefox geolocation
APIs basically means we're getting the data from Google, and pushing
that data to Geomena. There might be a legal issue there. Or maybe
not.

If there is, we could instead push the access point data to a page on
Geomena, which prompts the user to locate themselves on a map, and
make the association there. It's more manual for the user, but takes
Google out of the loop.

Jorge Silva

unread,
Apr 10, 2010, 8:59:10 PM4/10/10
to geo...@googlegroups.com
I think I would go with the safest latter option, but we can ask Doug
Turner <doug....@gmail.com> at Mozilla about it... he should know
better since he's been working on this. He will also be happy to learn
about Geomena if he doesn't already know it. Maybe he'll even have other
good suggestions.

Jorge

Jorge Silva

unread,
Apr 10, 2010, 9:12:23 PM4/10/10
to geo...@googlegroups.com
BTW, nsIWifiMonitor is supposed to work on all Windows, OSX and Linux,
but there is an annoying bug in Linux
(https://bugzilla.mozilla.org/show_bug.cgi?id=499666) that makes
nsIWifiMonitor spit out garbage. Also read
https://wiki.ubuntu.com/MozillaTeam/Specs/Karmic/FirefoxWifiScanning.
This also affects Fennec (at least on my N810)

I have been wanting to work on this but haven't had the chance. Maybe it
would be worth to take a look at it too because that could solve all
desktop clients at once.

Re: mobile, we also have code for Android here:
http://tinyurl.com/y8f4kbs

I think there will be a better chance to do the
wardriving/strolling/biking on mobile platforms because that would be
clean data directly from the hardware. I usually track my bike paths so
it would be easy for me to keep a geomena app on as well.

cheers!
Jorge

On 10-04-10 08:19 PM, Dietrich Ayala wrote:

Dietrich Ayala

unread,
Apr 11, 2010, 3:37:06 PM4/11/10
to geo...@googlegroups.com
I whipped up an addon that uses Firefox's geolocation API, put it
here: http://github.com/autonome/GeomenaFirefoxAddon

The addon does this:

1. listen for access point data
2. when received, get location
3. when we have coords, post each access point + coords to geomena.org

However, I'm not getting location data (filed
https://bugzilla.mozilla.org/show_bug.cgi?id=558681), so I've
commented out the actual sending for now, until I can test the rest of
the code.

I'll poke Doug for his thoughts on this scenario.

Don Park

unread,
Apr 11, 2010, 7:18:08 PM4/11/10
to geo...@googlegroups.com
Thanks for the contribution!

As brought up earlier in this thread, the defensibility and clarity of
license for the geomena database is central to the project. The
"clean" sources of data that I can think of are hand-entered address
data that is geocoded to a lat/long, and wifi loggers such as kismet.

I cant quite tell if the plugin (based on this description) assumes
google is the geolocation provider in which lat/long data would be
copied into geomena or if it assumes geomena is the location provider
in which case the value-add would be to create new near-by APs based
on the geomena-provided location of an existing AP. The later seems
like the safe move.

Don

Don Park

unread,
Apr 11, 2010, 9:07:44 PM4/11/10
to geo...@googlegroups.com
The plugin I'm referring to is Dietrich's. I think the best
description for "clean" data is a first-hand observation. Running
iwlist and its equivalents seem like a good way to do that.

linux: iwlist <device> scanning
os x: airport -I
windows: Jorge's Port

if nsIWifiMonitor is doing this already, then cool. The desktop apps
will need to make their own scans.

What I'm excited about as far as firefox internals is for it to be the
first browser to put all observed APs into the W3C location request
packet. The json blob is already setup to use an array value for the
access point list. My guess is that this hasnt been done to date
because of the extra time needed to do the scan, where as the
connected APs is immediately available.

Don

Dietrich Ayala

unread,
Apr 12, 2010, 12:30:50 AM4/12/10
to geo...@googlegroups.com
On Sun, Apr 11, 2010 at 6:07 PM, Don Park <don....@gmail.com> wrote:
> The plugin I'm referring to is Dietrich's. I think the best
> description for "clean" data is a first-hand observation. Running
> iwlist and its equivalents seem like a good way to do that.
>
> linux: iwlist <device> scanning
> os x: airport -I
> windows: Jorge's Port
>
> if nsIWifiMonitor is doing this already, then cool. The desktop apps
> will need to make their own scans.

The wifi data from Firefox's API is totally fine, comes directly from
the native APIs of the respective OS that Firefox is running on.

> What I'm excited about as far as firefox internals is for it to be the
> first browser to put all observed APs into the W3C location request
> packet. The json blob is already setup to use an array value for the
> access point list. My guess is that this hasnt been done to date
> because of the extra time needed to do the scan, where as the
> connected APs is immediately available.

Can you point me to the part of the spec that you're talking about?
That way I can file a bug on our end, to start supporting that if it
makes sense to do so.

Dietrich Ayala

unread,
Apr 13, 2010, 12:44:37 PM4/13/10
to geo...@googlegroups.com
Talked with Don IRL. Because of the unknown risks of using Google
data, the plan is to change the Firefox add-on to:

1. allow the user to set Geomena as the provider
2. have a status bar icon that lights up when there are APs not known by Geomena
3. allow the user to add those unknown APs to Geomena manually

The workflow might look like:

* user clicks on the lit-up status bar icon
* user is prompted with a list of APs, and: "would you like to add
these APs to Geomena?"
* click yes, a page on Geomena loads, where the user can input their
current address

I put up the TODO list for these changes on the wiki:
http://wiki.github.com/autonome/GeomenaFirefoxAddon/

If you're interested in working on it, let me know and I'll add your
github account to the project.

-d

Reply all
Reply to author
Forward
0 new messages