Detect the location of the spark

can i detect the location of the spark using google maps?
- i want to make a netbeans desktop application, can i embed google maps to netbeans to use it
to detect the location of the spark?

is there any way that i can detect the location of the spark using any map? i want to use it in a desktop application, or can it be that website with google maps to detect its location?

1 Like

Do you want to let the Core tell you where you are (use it like a gps) or do you want to find a Core using a map (like ‘find my phone’)?
Both applications would require a data connection (gsm shield perhaps) and most likely some sort of GPS transceiver.
I don’t see a reason why it wouldn’t be possible. If you get a gps unit, you could use it to get the coordinates, which you can then transmit through the cloud, to be used by an application of your choice (as long as you can program it).

For a “more or less” location that nevertheless gives me self-gratification to see my application actually being used in other places, I use the free service provided by http://freegeoip.net They also let you query using JSON so you can easily integrate their service into your Web page assuming that you only do a handful of queries per hour.

2 Likes

Hi @paolosofio01,

You can detect the location of the core very accurately using WiFi geolocation. You just need a geolocation service (like Google’s, or Firefox’s), and some code to generate a list of nearby networks. I was working on this for fun, and got really close, but I haven’t released the project yet. Is that something that people would want to play with?

Thanks,
David

2 Likes

Yes @Dave I’d love to play with that. Not really familiar with Google geoloc service that has to be better than my source I mentioned above because Google seems to know where I live, where I work, and of course, where I shop :slight_smile:

1 Like

@Dave, I would also! :smile:

@Dave, I too like what you did and love to play with it :smile:

1 Like

Hey @peekay123, @krvarma, @adrian,

Here’s a repo of how far I got: https://github.com/dmiddlecamp/wifi_geolocation

The firmware folder contains an app that scans for nearby networks, and occasionally publishes JSON snippets with the mac address / signal strength. I started a small server app that watches the SSE stream of those events, and then packages them into requests to the location service. It’s really important whatever you build / do that you are really good citizens with the Mozilla Geolocation service. We want them to continue to offer that awesome service for free, so please be really mindful of how often you send requests to it, etc.

edit: I will eventually write that server app to collect and get location info since I want to use it at home, please share any improvements / things you discover. :slight_smile:

Enjoy!

Thanks,
David

3 Likes

I’ve messed around with the Google wifi geo stuff before. It’s a little creepy. I don’t remember off the top of my head, but they somehow can pull the SSID of your wifi network and your MAC address (or the MAC address of your router–something along those lines) to make your SSID+MAC unique for future lookups. Failing the MAC address, they can look up the owner if you public IP using ARIN and use the SWIP’ed info to get your city. If your phone (or other computing device) has location services available from GPS/cell tower, they will store that data with your SSID.

At one point, they bought a company named Meraki (now owned by Cisco) who did easy-to-setup wifi mesh networking. When network admins placed the Meraki units on the map in their dashboard, Google would use that info to figure out your location using the Meraki dashboard data!

Even Apple uses Google to look up geoIP information from an iOS device. I discovered this while developing a canvassing iOS app. It took some snooping, but I discovered it would ping Google when the app did a geo lookup to get its location when on a wifi network. At one point, Google’s service went down for about 10-15 minutes, which is why I had to look it up in the first place!

2 Likes

@Dave

We’re setting up multiple spark cores in various locations throughout the United States. Our project streams sensor data to SparkFun’s Phant database, and it would be ideal if we could track geolocation.

Do you have an update on the development of your wifi_geolocation library? We’d like to use it as soon as the end of this month. If its not finished, perhaps you can point out what needs to be done and we may be able to finish it.

2 Likes

Hi @Amakaruk,

Good question! I’d love to finish up my geolocation library and get it into the build IDE so people can use it if they want. I started this here: https://github.com/dmiddlecamp/wifi_geolocation – but I need to put some more work into it to finish it and spin up a server to help perform the geolocation lookups. I would certainly welcome contributions, but otherwise I’ll keep plugging away. :slight_smile:

Thanks,
David

Any updates on showing photon location?

@winstonford, have you tried @Dave’s code?

I made a few hackster projects to help illustrate how to do this

code here:

hackster projects here:

Thanks!
David

4 Likes