Detecting location using WiFi hotspots

A method of detecting location includes receiving, on a mobile device, a plurality of previously stored WiFi hotspots; detecting, on the mobile device, a plurality of surrounding WiFi hotspots; comparing the plurality of surrounding WiFi hotspots to determine one or more differences between the plurality of previously stored WiFi hotspots; determining the differences satisfy a difference threshold; sending the plurality of surrounding WiFi hotspots to a location lookup system; and receiving a response from the location lookup system.

TECHNICAL FIELD

This disclosure relates to detecting location of a mobile device.

BACKGROUND

A mobile device can detect geofences. A geofence is a virtual perimeter around a real world geographic area. The mobile device can determine when it enters or exits a geofence by constantly comparing the mobile device's current location to the location of the geofence.

Generally, to obtain a current location, a mobile device can use data based on three various sources: 1) WiFi hotspots, 2) cellular towers, or 3) a Global Positioning System (GPS). Obtaining a location from these three sources require differing amounts of battery consumption. For example, finding the current location through WiFi hotspots is less battery intensive than finding the current location through a GPS. In the case of detecting geofences, to save battery, the mobile device attempts to obtain the current location first through WiFi hotspot data, then cellular tower data, and finally GPS signal data.

SUMMARY

A mobile device can detect location using data from a WiFi-based location lookup system. The mobile device can send, using a network-based lookup, surrounding WiFi hotspot data to the location lookup system and receive a location.

To save battery, the mobile device refrains from performing network based lookups (e.g., using the Internet) until the surrounding hotspots are substantially different from previously stored hotspots. The mobile device can determine whether there is a substantial difference by determining whether a difference threshold is satisfied. When the difference threshold is satisfied, the mobile device performs a network based lookup to detect location from the location lookup system based on the surrounding hotspots.

In one aspect, a method of detecting location includes receiving, on a mobile device, a plurality of previously stored WiFi hotspots; detecting, on the mobile device, a plurality of surrounding WiFi hotspots; comparing the plurality of surrounding WiFi hotspots to determine one or more differences between the plurality of previously stored WiFi hotspots; determining the differences satisfy a difference threshold; sending the plurality of surrounding WiFi hotspots to a location lookup system; and receiving a response from the location lookup system.

Implementations may include one or more of the following features. The response includes a current location of the mobile device. The response is an indication that a current location cannot be established by the location lookup system based on the plurality of surrounding WiFi hotspots. Obtaining a current location using data acquired from a cellular tower. Obtaining a current location using a Global Positioning System (GPS). The one or more differences are that one of the two pluralities includes one or more hotspots that are not included in the other plurality. The one or more differences include differences between signal level strength between the plurality of surrounding WiFi hotspots and the plurality of previously stored WiFi hotspots. Determining the mobile device is within a predetermined distance of a location of interest; and sending a notification to the mobile device. Data in the location lookup system includes associations between WiFi hotspots and respective locations of the WiFi hotspot. The difference threshold is associated with one or more of the following: a number of additional hotspots, a number of missing hotspots, or signal strengths of hotspots.

In one aspect, a method of detecting location includes receiving, on a mobile device, a plurality of previously stored WiFi hotspots; detecting, on the mobile device, a plurality of surrounding WiFi hotspots; comparing the plurality of surrounding WiFi hotspots to determine one or more differences between the plurality of previously stored WiFi hotspots; determining the differences satisfy a difference threshold; and obtaining a current location using data acquired from a cellular tower.

Implementations may include one or more of the following features. The one or more differences are that one of the two pluralities includes one or more hotspots that are not included in the other plurality. The one or more differences include differences between signal level strength between the plurality of surrounding WiFi hotspots and the plurality of previously stored WiFi hotspots. Determining the current location of the mobile device is within a predetermined distance of a location of interest; and sending a notification to the mobile device. The difference threshold is associated with one or more of the following: a number of additional hotspots, a number of missing hotspots, or signal strengths of hotspots.

Advantages may include one or more of the following. A mobile device can save battery life by performing network based lookups only when a mobile device's location has changed.

DETAILED DESCRIPTION

FIG. 1is a schematic illustration of an example location detection system. The system includes a mobile device118. The mobile device118can include a WiFi detector104, antenna110, and Global Positioning System (GPS)114.

The mobile device118can detect location using data acquired from the WiFi detector104and a WiFi-based location lookup system108. The WiFi detector104can detect WiFi hotspots102surrounding the mobile device118. WiFi hotspots102are wireless local area networks and can be generated by wireless routers. The WiFi detector104can receive surrounding WiFi hotspot data. In some implementations, the WiFi hotspot data includes WiFi hotspot identifications (IDs) and respective WiFi hotspot signal strengths.

After receiving a list of WiFi hotspots, the WiFi detector104can perform a network-based lookup. Specifically, the mobile device118sends a request to the WiFi-based location lookup system108over an external network (e.g., the Internet106). The WiFi-based location system108receives the list of WiFi hotspots and sends back a location to the mobile device118based on the list of WiFi hotspots. Detecting surrounding WiFi hotspots does not require as much battery as performing the network-based lookup (e.g., sending an Internet request).

The WiFi-based location system108includes one or more databases that include data associating WiFi hotspots with respective locations of the WiFi hotspots. In some implementations, the WiFi-based location system108accumulates this data whenever a mobile device requests a current location using GPS. The mobile device can obtain its location using GPS. The mobile device can also obtain a list of WiFi hotspots that surround the mobile device (e.g., using a WiFi detector). The mobile device can send, to the WiFi-based location system108, the mobile device's GPS-acquired location and the list of surrounding WiFi hotspots. By accumulating this data sent from many mobile devices, the WiFi-based location system108can provide an estimated location based on a list of WiFi hotspots.

If the WiFi-based location lookup system108is unable to provide the mobile device118with a location (e.g., the location lookup system does not contain enough data), the mobile device118can detect location using a network based lookup by the antenna110. In some implementations, the mobile device118uses the antenna110to send a location request (e.g., including cell tower signal strengths) to one or more cell towers112. The cell towers112can respond with data that includes the mobile device's location. In some implementations, the mobile device118receives data from the antenna110that includes signal strengths of one or more surrounding cellular towers112. The mobile device118can calculate the mobile device's location through triangulation based on cellular tower signal strength.

If the mobile device's location cannot be triangulated by cellular towers (e.g., not enough cellular towers around the mobile device are available), the mobile device118can detect location using data acquired from the GPS114. The GPS114can analyze data received from one or more satellites116(e.g., one or more timecodes). The analyzed data can provide a location to the mobile device118(e.g., delays in the timecodes indicate the location of the device).

FIG. 2is a diagram of an example flow chart of a method200for detecting location of a mobile device. The mobile device first receives a request to obtain a current location (step202). The request can be sent from an operating system or software application on the mobile device. In some implementations, the request is periodically recurring (e.g., a request to detect whether the mobile device enters or exits a geofence). The mobile device detects surrounding WiFi hotspots (step204). The mobile device then receives a list of previously stored hotspots (step206) (e.g., from an internal database).

If there are no previously stored hotspots, the mobile device sends the surrounding hotspots to a location lookup system (see step212below). If there are previously stored hotspots, the mobile device determines whether the surrounding WiFi hotspots are substantially different from the previously stored hotspots. The mobile device does this by determining whether a difference threshold is satisfied (step208). The difference threshold is discussed further below in reference toFIGS. 3A-D.

If the surrounding hotspots do not satisfy the difference threshold, the mobile device sends a previously stored location (e.g., based on the previously stored surrounding hotspots) to the mobile device as the current location (step210). WiFi hotspots can be assumed to be stationary. Therefore, a mobile device that does not detect a substantial difference (e.g., does not satisfy a difference threshold) in the surrounding WiFi hotspots can be inferred to be in the same location as the previously stored location.

In some implementations, if the surrounding hotspots satisfy the difference threshold, the mobile device sends the surrounding hotspots to a location lookup system (step212). In some implementations, the mobile device sends both surrounding hotspot information and surrounding cellular tower data (e.g., identification and signal strength of cell towers). The location lookup system then determines whether it can provide a current location based on the surrounding WiFi hotspots (step214). If the location lookup system can provide the current location, the location lookup system sends the location to the mobile device (step220).

If the location lookup system cannot provide the current location, the mobile device determines whether the mobile device can retrieve the location from a cellular tower (step216). Again, if the cellular tower is able to provide cell tower signal strength and triangulation data, the mobile device can obtain its current location (step220). In some implementations, the location lookup system is bypassed. In other words, if the surrounding hotspots satisfy the difference threshold, the mobile device does not attempt to send the surrounding hotspots to the location lookup system. Instead, the mobile device performs a network-based lookup to obtain the location using a cellular tower.

If the cellular tower is unable to provide the current location, the mobile device can retrieve the location from a GPS in the mobile device (step218). If the GPS is able to provide the current location, the mobile device has obtained its current location (step220). Otherwise, the mobile device can send an error notification to the requester indicating that the mobile device is unable to obtain the current location (step222). The requester can be a hardware or software component (e.g., operating system or application) of the mobile device.

FIG. 3Ais a diagram of an example mobile device located within range of a WiFi hotspot. The mobile device308can detect the WiFi hotspot that has an identification of hotspot A302. The mobile device308is unable to detect hotspot B304because the mobile device308is out of range. The mobile device308can store hotspot A as a previously identified hotspot.

FIG. 3Bis a diagram of the example mobile device that detects differences between the surrounding hotspots compared to the surrounding hotspot in reference toFIG. 3A. The mobile device308is in the same location as the mobile device in reference toFIG. 3A. Despite not having changed locations, the mobile device308is now able to detect hotspots A302and B304. The mobile device308is still unable to detect hotspot C306.

The list of surrounding hotspots in reference toFIG. 3Bis different than the list of previously stored hotspots in reference toFIG. 3A. For example, the list of surrounding hotspots in reference toFIG. 3Bincludes hotspot A302and hotspot B304. In contrast, the list of previously stored hotspots in reference toFIG. 3Aonly includes hotspot A302. However, the mobile device118may not consider this to be substantially different (e.g., does not satisfy a difference threshold).

In some implementations, this is substantially different because the mobile device in reference toFIG. 3Bdetects an additional hotspot. In alternative implementations, detecting one additional hotspot does not meet a difference threshold. The difference threshold protects the mobile device308from mistakenly performing a network lookup in a situation where there are differences in the surrounding WiFi hotspots, but the mobile device308has not changed locations. This situation can occur if, for example, hotspot B304is a mobile hotspot. This situation can also occur if Hotspot B304also may have been temporarily unavailable during the time when the mobile device in reference toFIG. 3Adetected hotspots. In some implementations, the difference threshold is based on a number of hotspot differences (e.g., the number of additional or missing WiFi hotspots). In alternative implementations, the difference threshold is based on a percentage of hotspot differences.

FIG. 3Cis a diagram of the example mobile device that detects substantial differences between surrounding hotspots compared to the surrounding hotspots in reference toFIG. 3B. The mobile device308is in a different location than the mobile device308in reference toFIGS. 3A and 3B. In reference toFIG. 3B, the mobile device detects hotspots A302and C306. In reference toFIG. 3C, the mobile device only detects hotspot B304. These hotspots have no overlap. In some implementations, having no overlapping hotspots satisfies the difference threshold, indicating the mobile device is in another location.

FIG. 3Dis a diagram of the example mobile device at a location having a stronger signal strength than the location in reference toFIG. 3C. Hotspot B304can provide stronger signal strength to mobile devices that are close to the hotspot provider (e.g., a router). Therefore, the hotspot signal strength in reference toFIG. 3Cis weak compared to the hotspot signal strength in reference toFIG. 3D. In some implementations, the mobile device308considers the difference in signal strength to be a substantial difference (e.g., satisfying a difference threshold). In some implementations, the difference threshold is based on both differences in the number of mobile hotspots and differences in the signal strengths of the mobile hotspots. In alternative implementations, the mobile device308does not consider signal strength when determining whether there is a substantial difference between surrounding hotspots.

In some implementations, after obtaining a current location using the methods described above, a mobile device determines whether the mobile device is within a predetermined distance of a location of interest (e.g., whether it enters or exits a geofence). If the mobile device is within the predetermined distance, the mobile device can send a notification to a recipient (e.g., an application or operating system) indicating the occurrence. The recipient of the notification can perform operations based on the occurrence (e.g., notify a third party that the mobile device is within the geofence).