Content uploaded by Varun Pande
Author content
All content in this area was uploaded by Varun Pande
Content may be subject to copyright.
Content uploaded by Khaled Elleithy
Author content
All content in this area was uploaded by Khaled Elleithy
Content may be subject to copyright.
Content uploaded by Khaled Elleithy
Author content
All content in this area was uploaded by Khaled Elleithy
Content may be subject to copyright.
Mobile and Wi-Fi Geo location Using Google
Latitude
Varun Pande, Wafa Elmannai, Khaled Elleithy
Department of Computer Science and Engineering
University of Bridgeport
Bridgeport, CT 06604, USA
{vpande, welmanna, elleithy}@bridgeport.edu
Abstract—The development of Geographical location standards has
opened the doors for new strategies and ideas for location based
services, specifically for wireless mobile devices. With the help of
Geo location, it has become easy to get information of specific
location or find the current locations on our mobile devices. Using
networks like Wi-Fi, Cellular networks or GPS positions, it has
become a function of second nature for letting our wireless mobile
devices know our locations. However, if a wireless mobile device
does not support GPS service, we cannot access Wi-Fi data.
Therefore, in this paper we present an application as a proof of
concept (POC), with the help of Google Latitude to define the
location of a specific Wi-Fi tower that in turn enables us to locate
the approximate location of the wireless mobile devices without
GPS support.
Key Words- Geo location; Wi-Fi position; Google Latitude.
I. INTRODUCTION
The most commonly used location based service application for
the wireless mobile devices is the Google latitude, which is
provided by Google. With the use of a Google account, the user
can set his location on the Google map, view location of other
people or businesses and have control over his privacy of
location. The privacy option enables a user to hide his location
for specific users or even specify the city or the country where
his information can or cannot be seen.
In order to get any wireless mobile device’s (mobile phones or
laptops in our example) location; we need to have GPS position
of that wireless mobile device. This information is based on
calculating the mobile devices’ position out of the GSM’s
geographic location data [1]. Hence, the infrastructure is already
provided in the current world using GPS satellites for location-
based services throughout the world. Though this method
revolutionized the location-based services, the downfall is that
we still need access to GPS data every time we are looking for
our location. Also, the synchronization between the satellites
and our application fails sometimes; thus, taking more time to
define a location (happens mostly in car based GPS systems). If
we don’t have wireless network, we cannot get the location data.
Also, to access the GPS or search for GPS satellites, we need a
lot of precious power resources that is the most challenging
issue with wireless mobile devices. In other words, many of us
must use Google location services using mobile phones to
display our location. For example the Facebook application
could be used to check in our location using the Google location
services. On an observational standpoint, we cannot use this
application on our desktop system or laptops that are connected
to a LAN or wired connection for defining our locations. In this
case, we have to reenter our location that is the address every
time we need just in order to define our location or find an
address. But if we access the Internet or the application on a
laptop or desktop via a wireless signal, we should able to define
the location. This is quite extraordinary but the reason behind
this is that the IP address cannot alone determine the location of
our device.
Thus, to understand the concepts presented in this paper we will
need to explain in this introduction what is an IP address, how
the IP address is assigned and finally how can the IP address be
used in defining the location of wireless mobile devices. After
this overview, we are going to explain how Google Gears Geo
location technique works.
A. Over iew of IP Address:
IP address is the address of the Internet protocol. Each device on
a specific network has its own IP address, for example: laptop,
PC or printer within a network [2].
Figure1: The identification of the network and addressing the location
192. 168. 255. 255
11000000 10101000 11111111 11111111
Network Address Host Address
The IP address of any device identifies two parts: the
identification of the network and addressing the location as
shown in Figure 1. So, from the IP address we can know the
name of the host or the network, its location and the router to
being there [3]. IANA has the responsibility of managing the
address spaces that are distributed globally in accordance with
the hierarchical structure shown in Figure 2. First, the IPv4
address was assigned as 32bits number [2]. But due to the rapid
growth of the Internet, the Internet Engineering Task Force
(IETF) proposed IPv6 in 1995 [3]. An IPv6 address consists of a
128bits. Then 1998, IPv6 became RFC 2460 standard.
Furthermore, this IP address usually appears in readable text file.
It contains binary numbers and each part of these bits meets a
specific need as explained above.
Figure2: The hierarchical structure of IANA
However, the Internet Assigned Numbers Authority (IANA)
internationally allocates these IP addresses. Then, IANA helps
in assigning these IP addresses with local entities as shown in
Figure 2.
In general using the IP address we can know the location in case
we know the ISP (internet service provider) and how the ISP
works on assigning IP to their individual devices.
B. Position Calculation:
There are three basic methods that are used to calculate the
position of the device [5].
1. Triangulation: We consider this method exactly as the
triangle in the mathematical rule. So, the query is to
find the location that is between two angles of two
positions (S1, S2) as shown in figure 3. If we know the
distance of the two sites, then easily we can calculate
the location by using the two angles.
Figure 3: Triangulation method for measuring question location between two
sites.
2. Lateration: This method can be used if we have more
than one site that surrounds the query location. Then
we need to measure the distance between those
positions as shown in Figure 4. First, we need to get
from each position the minimum of its three signals.
Then, either we calculate the difference in the time of
the signals or the difference of signal runtime.
However, if the surrounding positions are three we call
this method Trilateration. Furthermore, if we have more
positions that are pinpointed for the queried location,
we call it Multilateration.
Figure4: example of measuring the position using the
Lateration
3. Centroid Localization: This method also considers the
triangle shape. The query location should be centralized
and the important function is to know the received
signaled sites. Based on this sited we can get the
measurement or the desired position. The method is
shown in figure 5 which demonstrates how based on
the giving signals of other position, we can calculate
the centralized one.
Figure 5: Centroid Localization method to measure the centroid
position
II. RELATED WORK
In order to eliminate the estimation of noisy location, the
algorithm of orientation filter and a Newton Trust Region (TR)
was applied in [6]. Their implementation was based on one of
the Wi-Fi devices along with a digital scope that is called
P1 P2
P3
Questioned position
S1
S2
Distance
S3: Question Location
Google Nexus One. The results of their experiment lead to 90%
positive results within 2.45m while the distance’s average error
is 1.82m.
To generate the position signature from the party of the raw
signals of GPS from different numbers of satellites, Denning and
MacDoran proposed a new location-based authentication
mechanism [7]. The authors relied in their experiment on one
concept which is those signatures are hard to forge. That was
based on random received signals. This paper is efficient but the
technique validation was missing.
Similarly in [8, 9] in order to prove the location of wireless
nodes, such response schemes were proposed. These techniques
proved that the AP could measure the wireless nodes location
with retorting to a node that sent if the specific range of an
actual AP was provided. These papers could efficiently use the
numbers of receivers to measure the wireless nodes’ positions
with the help of characteristics of RF propagation.
The access control scheme that is “Lockr” was introduced in
[10] depending on the relationship of the metadata. The users are
able to exchange the metadata between each other; that could
emphasize the social verifications of this scheme. However, the
experiment required that both sides should sign a digital consent
in order to prove the right information. This can provide the
location evidence. Hence, to provide better security on
exchanged information, the protocol was developed based on the
verification mechanisms. It is concluded that the authors were
working to introduce a scheme that provides a social relationship
for getting location proof.
III. PROPOSED WORK
Figure6: Flow chart of our proposed application
In this section we are explaining the proposed system’s
architecture as shown in Figure6.
1. This sample C# code is explaining how we can get
access to the Wi-Fi adapter which is required since we
need a static location in the network and a Wi-Fi
adapter connected to a LAN cable which is always a
static location:
2. Enumerate the available Wi-Fi towers and concatenate
the JSON string The JSON strings allows us to
decipher the WI-FI network towers. This shows the
signal strength of multiple WI-FI networks, which
allows us to justify the location of a wireless mobile
device.
Start
Stop
Get the Wi-Fi
adapter
Enumerate the
available Wi-Fi
towers
HTTP request
and parse the
response
Location
Json = @"{ ""host"" : ""Test"", ""radio_type"" :
""unknown"", ""request_address"" : true,
""version"" : ""1.1.0"",wifi_towers"" : [
";lstWifi.Items.Clear();
System.Text.StringBuilder SB = new StringBuilder();
foreach (var oWlan in lstWlanBss )
{
ListViewItem lstItem =
lstWifi.Items.Add(System.Text.Encoding.UTF8.GetString
(oWlan.dot11Ssid.SSID));
lstItem.SubItems.Add(CalculateSignalQuality(oWlan.lin
kQuality).ToString());
string MAC = ConvertToMAC(oWlan.dot11Bssid);
lstItem.SubItems.Add(MAC);
SB.Append(@"{""mac_address"" :""");
SB.Append(MAC);
SB.Append(@"""");
SB.Append(@", ""signal_strength"" :");
SB.Append(CalculateSignalQuality(oWlan.linkQuality).
ToString());
SB.Append(@", ""ssid"" : """);
SB.Append(System.Text.Encoding.UTF8.GetString(oWla
n.dot11Ssid.SSID, 0,
(int)oWlan.dot11Ssid.SSIDLength));
SB.Append(@""" },");
}
Json += SB.ToString().Substring(0, SB.Length - 1); //
copy all except last ","
Json += "]}";
textSent.Text = Json;
3. The second part is to form an HTTP request and parse
the response This is the request which allows us to get
the IP address of the static location and the response
lets us confirm if our mobile device is connected to that
wireless network:
IV. MOBILE AND WI-FI GEO LOCATION USING GOOGLE
LATITUDE EXPERIMENTAL
In this section we are introducing our system that is based on
providing a new concept on Google latitude to prove that we can
use the Wi-Fi information to define a device location without
accessing GPS data on each query. This approach is currently
possible since most the developed cities provide Wi-Fi service
all around. This application can reduce a lot of energy
consumption used on wireless mobile devices each time they are
accessing the GPS data and connecting to the satellites’ signal.
For the first step, we are going to use same steps as Google
Latitude does for measuring the location. Instead, we are using
Wi-Fi information data to measure the static tower locations. In
our implementation, we are measuring each Wi-Fi tower
position separately as shown in Figure 7. By measuring the Wi-
Fi relative location, we can also know the absolute device
location.
Figure 7: Mobile and Wi-Fi Geo location scheme
In the Second step of our implementation, we need to have
information like the device address and SSID stored in the
server database. Accordingly, we do not need to access GPS
data anymore. In case we need any location in a certain Wi-Fi
network, we can approximately estimate the location of the
device based on the static locations of three WI-FI towers. All
this can be accomplished on a WI-FI network without accessing
the GPS data. The user in an automated can update this
information way if a new location is not yet stored on the
database. Therefore, the device automatically sends the location
information accessing the GPS data only once. The future quires
of any other wireless mobile devices can define the location just
by accessing the Wi-Fi network.
V. EXPERIMENT
The desktop-based application that is shown in Figure8 executes
the queries based on Wi-Fi networks. We have made this
application as a POC (proof of concept) that was explained in
the previous section, and it is pretty simple. It works in two
steps:
1. Get Wi-Fi data from PC.
2. Send this information to Google and wait for response.
The first step is possible to access the Wi-Fi information using a
useful programming library to in C#, which was shown in the
system flow chart in Figure 6.
However, if we turn on the laptop and then connect to Google
Latitude, Google using the Wi-Fi towers information will detect
Google using the Wi-Fi towers information. This also happens
for the first instance we are using this application. Google
measures the Wi-Fi data based on the GSM and GPS
information.
The developed application acts like this; since each user can
detect his/her location then our application gets the information
HttpWebRequest request =
(HttpWebRequest)HttpWebRequest.Create(@"http://w
ww.google.com/loc/json");
request.ContentType = "application/json; charset=utf-
8";
request.Accept = "application/json, text/javascript,
*/*";
request.Method = "POST";
using (StreamWriter writer = new
StreamWriter(request.GetRequestStream()))
{
writer.Write(textSent.Text);
}
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
string json = "";
using (StreamReader reader = new
StreamReader(stream))
{
while (!reader.EndOfStream)
{
json += reader.ReadLine();
}
}
txtResponse.Text = json;
ParseLocation(json);
for all the relative Wi-Fi towers and stores them in the database.
The Second instance if the same user or another user wants to
know any location close to this Wi-Fi tower, the user can access
the application that will provide the user the absolute address.
The novelty here is that we are not going to lose any energy for
GPS access neither any synchronization time in trying to find
the triangulation location of the Wi-Fi devices.
Figure 8: The application to calculate the absolute device location based on
relative Wi-Fi data.
However, there are still some challenges for this concept to work
without issues in the real world:
Similar Wi-Fi names
There is no chronological order or a certain protocol that is
followed in the naming conventions of the Wi-Fi networks.
Therefore, it is difficult to recognize the different location on
network name basis alone.
Changing IP-addresses
The IP address frequently changes especially on Wi-Fi
networks. It is important that we try to incorporate a
methodology to have a list of MAC addresses for the various
Wi-Fi routers
Wi-Fi turning on/off
The Wi-Fi networks are not a standardized networks and the
turning on and off of these networks is user controlled. That is if
a user turns off a key Wi-Fi network, then the application can
face some challenges in defining a location. Thus a key issue is
the continuous broadcast of a Wi-Fi network.
VI. CONCLUSION
In this paper we introduced an important concept by
implementing the methodology of Mobile and Wi-Fi Geo
location Using Google Latitude. This approach could present
itself as a new universally acceptable location service without
having a huge cost to incur on the deployment, as Wi-Fi
networks are already established. We are planning in the future
to address the challenges presented in the previous section in
order to successfully implement a Wi-Fi PS (Wi-Fi Positioning
System).
REFERENCES
[1] Willaredt, Jonas. "WiFi and Cell-ID based positioning
Protocols, Standards and Solutions." SNET Project WT (2011),
2011.
[2] Hinden, Robert M. "IP next generation overview."
Communications of the ACM 39, no. 6 (1996): 61-71.
[3] Information Sciences Institute University of Southern
California, “INTERNET PROTOCOL”, Defense Advanced
Research Projects Agency, 1981.
[4] M. Siegler, “While people worry about Facebook photos, a
million users let Google know exactly where they are,”
VentureBeat, Feb. 2009.
[5] Pu, Chuan-Chin, Chuan-Hsian Pu, and Hoon-Jae Lee.
"Indoor location tracking using received signal strength
indicator." Emerging communications for wireless sensor
networks (2011).
[6] Eddie C.L. Chan, George Baciu, S.C. Mak, “Orientation-
based Wi-Fi Positioning on the Google Nexus One”, IEEE 6th
international conference on wireless and mobile computing ,
networking and communication, 2010.
[7] Denning, Dorothy E., and Peter F. MacDoran. "Location-
based authentication: Grounding cyberspace for better security."
Computer Fraud & Security 1996, no. 2, 1996.
[8] Capkun, Srdjan, and J-P. Hubaux. "Secure positioning of
wireless devices with application to sensor networks." In
INFOCOM 2005. 24th Annual Joint Conference of the IEEE
Computer and Communications Societies. Proceedings IEEE,
vol. 3, pp. 1917-1928. IEEE, 2005.
[9] Y. Zhang, Z. Li, and W. Trappe. Power-Modulated
Challenge-Response Schemes for Verifying LocationClaims. In
Proc. of IEEE Globecom, Nov. 2007.
[10] A. Tootoonchian, K. K. Gollu, S. Saroiu, Y. Ganjali, and A.
Wolman. Lockr: Social Access Control for Web 2.0. In Proc. of
the 1st ACM SIGCOMM Workshop on Online Social Networks
(WOSN), Aug. 2008.