Skip to content
/ gps-sdk Public

The official SDK for developers to use Bad Elf GPS accessories on iOS, Android, and Windows devices.


Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



26 Commits

Repository files navigation




Twitter: @bad_elf

Bad Elf is excited to provide developers with the protocol information and sample code to communicate with Bad Elf GPS accessories across many platforms. This SDK provides real-time and native support for the wide range of data and configurations that each Bad Elf GPS accessory supports.

We strongly suggest developers review all the information contained here before starting to integrate the protocol or sample code into your application.

Bad Elf Protocol Features

--- Bad Elf
🚀 Fast and reliable positional data at 1-10Hz update rate
🔧 Access extended satellite and accuracy information not available elsewhere
💻 Support for iOS, Android, Windows, and any other platform via Bluetooth SPP
📖 No binary SDK to integrate into your app
✏️ Uses industry-standard NMEA sentences
:octocat: Frequent firmware updates and rapid support responses

Supported Platforms & Requirements

We have tested and provide support for our protocol on the following platforms:

  • iOS
  • macOS
  • Android
  • Windows 8.1 (Surface 2)
  • Windows 10 (Surface 3)

Your application will require a NMEA parser to effectively use the data provided from Bad Elf GPS accessories. There are many open source and 3rd party libraries available on the web.

Supported Accessories

This SDK works with all of the Bad Elf GPS accessories listed below. The minimum firmware level (or newer) must be installed in the accessory to ensure compatibility with all of the features documented in this SDK.

Model Name Model Minimum Firmware Version Connectivity
Bad Elf GPS for 30-pin BE-GPS-1000 Not Supported ---
Bad Elf GPS for Lightning BE-GPS-1008 v1.0.20 iOS only via EA
Bad Elf GPS Pro BE-GPS-2200 v2.0.90 Bluetooth
Bad Elf GPS Pro+ BE-GPS-2300 v2.1.40 Bluetooth, USB
Bad Elf GNSS Surveyor BE-GPS-3300 v2.1.40 Bluetooth, USB

If your app detects a Bad Elf GPS accessory with older firmware, you should prompt the user to perform a firmware update using the official Bad Elf GPS App (iOS only). For non-iOS apps and users, you can point Bad Elf GPS Pro+ users to our instructions for upgrading Bad Elf GPS Pro+ accessories via USB. And for Bad Elf Surveyor users, you can point them to these instructions for upgrading Bad Elf Surveyor accessories via USB. This only applies to the accessories with USB connectivity as shown above.

Basic Configuration (iOS)

Bad Elf accessories are certified Apple MFi accessories which means there is a bit more setup with Apple devices. In order to start the flow of raw NMEA data into your app, you must first include the ExternalAccessory.framework into your iOS app.

The External accessory framework handles the accessory detection, opening/closing of EASessions and the NSInputStream and NSOutputStream events. In order to establish two way communication with a Bad Elf you must include the following in your project's Info.plist file.

Supported Accessory Protocol Identifer


Apple has included comprehensive documentation on the ExternalAccessory framework and how to set it up. For more information see the Apple Documentation on External Accessory

You will also want to review the included iOS demo application included with this document on GitHub.

Apple Device Whitelisting

If you are developing an app for use on Apple iOS devices (iPhone, iPad, iPod touch), your app must be whitelisted by Bad Elf prior to submission to TestFlight (External Only) or the iTunes App Store. There is no charge for this whitelisting process.


Whitelisting Process

The process to get your app whitelisted by Bad Elf is relatively easy. At least a week before you are ready to submit your app build to App Store Connect, please follow these instructions:

  1. Complete and submit our Bad Elf SDK Whitelist Request form.
  2. Within 24-48 hours you will receive a confirmation email that your information has been received and is being processed by Bad Elf.
  3. Within a week we will confirm that your app has been whitelisted and provide you with the necessary information you'll need to include with your app submission to App Store Connect.
  4. You are ready ot submit your app for review by Apple.

NMEA Configuration

Bad Elf accessories provide GPS information using industry-standard NMEA protocol. This ASCII-based protocol is easily parsed in any programming language on any computing platform.

When a app opens a Bluetooth SPP or EASession connection to a Bad Elf GPS accesory, the accessory will automatically start streaming NMEA sentences with satellite and accuracy info every second (1Hz).

If your app needs location updates at a faster rate (2-10Hz) or does not want to parse or use the extended satellite/accuracy information in the GSA/GSV sentences, it can send a configuration packet to the accessory. The changes will take effect within a few seconds, and will persist only for this active connection.

These following binary packets can be sent to Bad Elf GPS accessories to configure the desired reporting rate and verbosity of the NMEA sentences:

Simple NMEA Sentences (GGA and RMC only, no satellite info)

Update Rate Configuration Packet to Send to Bad Elf Accessory
1 Hz 24 be 00 11 05 01 02 05 31 01 32 04 33 01 64 0d 0a
2 Hz 24 be 00 11 04 01 02 06 31 02 32 04 33 01 63 0d 0a
4 Hz 24 be 00 11 04 01 02 06 31 04 32 04 33 01 61 0d 0a
5 Hz 24 be 00 11 06 01 02 04 31 05 32 04 33 01 60 0d 0a
10 Hz 24 be 00 11 08 01 02 02 31 0a 32 04 33 01 5b 0d 0a

Extended NMEA Sentences (with GSA and GSV satellite data and DOP values)

Configuration Configuration Packet to Send to Bad Elf Accessory
1 Hz 24 be 00 11 0b 01 02 ff 31 01 32 04 33 02 63 0d 0a
2 Hz 24 be 00 11 10 01 02 fa 31 02 32 04 33 02 62 0d 0a
4 Hz 24 be 00 11 12 01 02 f8 31 04 32 04 33 02 60 0d 0a
5 Hz 24 be 00 11 13 01 02 f7 31 05 32 04 33 02 5f 0d 0a
10 Hz 24 be 00 11 16 01 02 f4 31 0a 32 04 33 02 5a 0d 0a

Accessory Metadata

To provide the best user experience possible, apps often need to know the model and version information of the Bad Elf GPS hardware being used. On iOS, this metadata is available via the EAAccessory class.

For non-iOS Bluetooth clients, we provide the same metadata via a custom $PELFID NMEA sentence that is sent when the connection is opened.

The NMEA sentence is in the following format:

<model name>,
<model number>,
<firmware version (AA.BB.CC)>,
<hardware version (AA.BB.CC)>,
<serial number>,

A sample sentence:

$PELFID,Bad Elf GPS Pro,BE-GPS-2200,2.0.87,2.1.0,123456,2200-2.0C-DEV*71

An app can also request this information at any time by sending the following binary packet to the accessory:

24 be 00 0a 01 00 08 0b 0d 0a

Sample Data

The data returned from the Bad Elf is in NMEA format. Depending on the configuration you pass to the Bad Elf, you should see data returned like the examples below.

NMEA Data @ 1Hz (DEFAULT, includes Satelllite Data)
$GPGSA,A,	3,15,28,06,26,,,,,,,,,1.81,1.56,0.92*0F
$GPGSV,	3,2,11,08,41,121,,04,31,142,,01,30,074,,07,26,131,*77
$GPRMC,	174513.000,A,3337.4525,N,11154.7255,W,7.82,63.59,070814,,,A*40
NMEA Data @ 1Hz (No Satellite Data)
NMEA Data @ 10Hz (No Satellite Data)
NMEA Data @ 10Hz (Including Satellite Data)

Need Help?

Review the Wiki if you have questions and if you find bugs or need more support, please submit an issue on GitHub and provide information about your setup.


This project is license under the terms of the BSD-New License. See LICENSE file.


The official SDK for developers to use Bad Elf GPS accessories on iOS, Android, and Windows devices.







No releases published