Public ELG Embedded Client Repo
C Makefile
Latest commit 9dbe207 Nov 15, 2016 @tboinske-skyhook tboinske-skyhook committed on GitHub Merge pull request #2 from SkyhookWireless/multiple-cell-type-support
Add support for multiple cell types

README.md

Skyhook Precision Location Embedded Client Development Kit

Overview

This repo provides a C source code development kit which allows you to add Skyhook's WiFi and 3GPP network-based location capabilities to your embedded device. It includes a simple, generic, and buildable sample client (sky_client.c) that can be modified and adapted as necessary for your particular platform.

Synopsis

The steps required by an embedded client to determine its location are the following:

  1. Scan local WiFi access points and/or 3GPP cell towers using whatever mechanism is available for doing so on your device platform
  2. Create a request message with the scan results using the functions provided by the development kit. The resulting binary request message is bandwidth-efficient, and is protected using the AES encryption protocol
  3. Create a TCP connection and send the request message to the Skyhook Embedded Location Gateway (ELG) Service using whatever mechanism is available for doing so on the client platform
  4. Read the TCP response message from the network and close the connection. Then use the functions provided by the development kit to decrypt and parse the resulting latitude and longitude
  5. Use the result in whatever way makes sense for your device. (Note that you can optionally arrange to have the Skyhook service forward ("echo") location responses in XML format to your web server, in addition to returning the response to the device itself. Contact Skyhook customer service for more information)

alt text

Client Configuration

Your embedded client needs to be configured with a Skyhook partner ID and AES (encryption) key. You can obtain these parameters via the following steps:

  1. Register a new account on http://my.skyhookwireless.com
  2. Once registration is completed you will be placed immediately into the “Start a new project” workflow.
  3. Create a new Precision Location project and name the project whatever you like.
  4. After creating the project, in the platform selection screen, select the “ELG” embedded project type which can be found below the standard OS selection icons.
  5. Once your new embedded project has been created, your partner ID and AES key will be visible on the right side of your project home screen.

Note that the sample client included in this repo specifies these parameters as #defines near the top of sky_client.c. You'll need to change the sample values there to the values obtained via the above procedure.

Cloning the Repo

Since this repo contains a git submodule, you'll need to clone it using the --recursive option to the git clone command. E.g.,

$ git clone --recursive git@github.com:SkyhookWireless/embedded-client.git
Cloning into 'embedded-client'...
remote: Counting objects: 134, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 134 (delta 0), reused 0 (delta 0), pack-reused 131
Receiving objects: 100% (134/134), 719.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (48/48), done.
Checking connectivity... done.
Submodule 'common' (git@github.com:SkyhookWireless/ELG-Common.git) registered for path 'common'
Cloning into 'common'...
remote: Counting objects: 435, done.
remote: Total 435 (delta 0), reused 0 (delta 0), pack-reused 435
Receiving objects: 100% (435/435), 119.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (192/192), done.
Checking connectivity... done.
Submodule path 'common': checked out 'c8ec80681799e1a237ea68c637aba9bbbba78034'
$

Alternatively, if you cloned the repo without specifying the --recursive option, you'll need to explicitly update and initialize the submodule:

$ cd embedded-client
$ git submodule update --init
Submodule 'common' (git@github.com:SkyhookWireless/ELG-Common.git) registered for path 'common'
Cloning into 'common'...
remote: Counting objects: 435, done.
remote: Total 435 (delta 0), reused 0 (delta 0), pack-reused 435
Receiving objects: 100% (435/435), 119.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (192/192), done.
Checking connectivity... done.
Submodule path 'common': checked out 'c8ec80681799e1a237ea68c637aba9bbbba78034'

Building the Sample Client

To build the sample client ("sky_client.c") under Linux, type "make" in the root directory of the repo. This will compile and link the sample client and all of the necessary library code, resulting in a single executable, which will be placed in the bin directory. Note that this sample client uses "canned" WiFi scan data; as noted above, you'll need to modify it to obtain real WiFi and/or 3GPP cellular scan data. The details of how this is done depend on your device hardware and software platform.