Skip to main content

Connecting a Receiver

Mapit GIS supports external GNSS receivers for centimetre-level positioning accuracy. On Android, you can connect a receiver via Bluetooth (most common), Bluetooth Low Energy (BLE), USB serial, TCP/IP (network-connected receivers or NTRIP streams), or via a third-party companion app that pipes location data through Android's mock location system. On iOS, you can connect via Bluetooth Low Energy (BLE) or TCP/IP.

Only one connection method can be active at a time - enabling one automatically disables the others.

Bluetooth Connection

Most external GNSS receivers communicate over Bluetooth using the Serial Port Profile (SPP). This is a serial data stream that carries NMEA sentences from the receiver to the app.

Pairing a Device

  1. Open Settings from the main menu.
  2. Navigate to External GNSS.
  3. Toggle Paired Bluetooth GPS on.
  4. The app requests Bluetooth permissions (BLUETOOTH_CONNECT and BLUETOOTH_SCAN on Android 12+).
  5. A device picker dialog appears listing all bonded (paired) Bluetooth devices by name and MAC address.
  6. Select your receiver. The device address and name are saved for future sessions.
tip

Pair the receiver with your Android device first via Android Settings > Bluetooth before opening Mapit GIS. The app only shows already-paired devices - it does not perform Bluetooth discovery.

Connection Process

When a Bluetooth GNSS session starts, the app attempts to connect using four methods in sequence, with automatic retries:

MethodDescription
Device UUIDUses the UUID advertised by the receiver itself
Standard SPP UUIDUses the standard Serial Port Profile UUID (00001101-0000-1000-8000-00805F9B34FB)
Insecure RFCOMMUses an insecure RFCOMM channel - helpful for older receivers that reject secure connections
Direct channelOpens RFCOMM channel 1 directly via reflection - a last-resort fallback for receivers that do not advertise any UUID

Each method is retried up to twice before the app moves to the next. Once a connection is established, the app begins reading NMEA sentences from the receiver's data stream.

RTCM Corrections over Bluetooth

When an NTRIP client session is active, RTCM correction data is sent back to the receiver over the same Bluetooth SPP connection. The bidirectional serial link allows corrections to flow to the receiver in real time for RTK positioning.

Data Timeout

If no data arrives for 5 seconds after the connection is established, the app treats the connection as stale and disconnects. This prevents the app from appearing connected while the receiver has actually gone to sleep or out of range.

Foreground Service

While connected, the app runs an External GNSS foreground service to prevent Android from killing the connection during background operation. A persistent notification confirms that the GNSS connection is active. This service also holds a CPU wake lock to keep the processor running when the screen is off.


Bluetooth Low Energy (BLE) Connection

Some modern GNSS receivers - such as the ArduSimple series - communicate over Bluetooth Low Energy using the Nordic UART Service (NUS) profile instead of classic Bluetooth SPP. BLE offers lower power consumption and is the preferred connection method for receivers that support it.

Scanning for Devices

  1. Open Settings > External GNSS.
  2. Toggle BLE GPS on.
  3. The app requests Bluetooth permissions (BLUETOOTH_CONNECT and BLUETOOTH_SCAN on Android 12+).
  4. A scan dialog appears and automatically searches for nearby BLE devices advertising the NUS service UUID.
  5. The scan runs for up to 15 seconds in low-latency mode.
  6. Select your receiver from the list. The device name and address are saved for future sessions.
tip

Unlike classic Bluetooth, BLE does not require pairing the device in Android Settings first. The app discovers BLE GNSS receivers directly through the scan dialog.

Connection Process

When a BLE GNSS session starts, the app connects to the selected device using Android's GATT (Generic Attribute Profile) client. The connection sequence is:

  1. GATT connect - establishes a BLE link to the receiver.
  2. Service discovery - locates the Nordic UART Service (NUS) on the device.
  3. Enable notifications - subscribes to the NUS TX characteristic (receiver to phone) by writing the CCCD descriptor.
  4. MTU negotiation - requests a larger MTU (up to 512 bytes) for efficient data transfer.
  5. NMEA streaming - the app begins reading NMEA sentences from BLE notifications.

RTCM Corrections over BLE

When an NTRIP client session is active, RTCM correction data is sent back to the receiver over BLE by writing to the NUS RX characteristic. The app automatically chunks RTCM data into MTU-sized segments for reliable delivery.

Data Timeout

If no NMEA data arrives for 5 seconds, the app treats the connection as lost and disconnects. This ensures the GPS info display is cleared promptly if the receiver powers off or goes out of range, rather than waiting for the BLE supervision timeout.

Auto-Reconnect

If the BLE connection drops unexpectedly (e.g. the receiver momentarily goes out of range), the app waits 2 seconds and then attempts to reconnect automatically. If a deliberate disconnect is triggered - by the user or by the data timeout - no reconnect is attempted.

Foreground Service

While connected via BLE, the app runs an External GNSS foreground service with a CPU wake lock, identical to the classic Bluetooth connection. The Wi-Fi lock and network callback are not used for BLE connections since no network is involved.


USB Serial Connection

For GNSS receivers connected via USB OTG (On-The-Go) cable, the app can read NMEA data directly over a USB serial connection. This is useful for receivers that do not have Bluetooth - or when you need a more reliable wired connection for long survey sessions.

Configuration

  1. Open Settings > External GNSS.
  2. Toggle USB Serial GPS on.
  3. Select the appropriate baud rate for your receiver (default: 115200).

The following baud rates are supported:

Baud Rate
4800
9600
19200
38400
57600
115200
230400
460800
921600
tip

Most modern GNSS receivers default to 115200 baud. Check your receiver's documentation if you are unsure which baud rate to use.

Connection Process

  1. Connect the GNSS receiver to your Android device via a USB OTG cable or adapter.
  2. The app auto-detects USB serial devices using standard USB CDC/ACM and FTDI/CH340/CP210x/PL2303 drivers.
  3. Android prompts for USB permission the first time a device is connected.
  4. Once granted, the app opens the serial port with the configured baud rate (8 data bits, 1 stop bit, no parity) and begins reading NMEA sentences.

RTCM Corrections over USB

When an NTRIP client session is active, RTCM correction data is sent to the receiver over the same USB serial connection. The bidirectional serial link makes USB ideal for RTK workflows where corrections need to reach the receiver with minimal latency.

Cable Disconnect Detection

The app listens for Android's USB_DEVICE_DETACHED broadcast. When the USB cable is physically disconnected, the app immediately detects it and cleans up the connection - there is no timeout delay.

Error Recovery

If USB read errors occur (e.g. from electrical noise or a loose connection), the app retries with a 1-second delay between attempts. After 5 consecutive read errors, the app treats the connection as lost and disconnects.

Foreground Service

While connected via USB, the app runs an External GNSS foreground service with a CPU wake lock to prevent the connection from being interrupted when the screen is off.


TCP/IP Connection

For network-connected GNSS receivers, NTRIP casters, or GNSS data relayed from a PC, you can connect over TCP/IP.

Configuration

  1. Open Settings > External GNSS.
  2. Toggle TCP GPS on.
  3. Enter the Server hostname or IP address (default: localhost).
  4. Enter the Port number (default: 52003).

Socket Configuration

The TCP connection is tuned for real-time GNSS data:

SettingValuePurpose
Keep-aliveEnabledPrevents router/firewall timeout on long sessions
TCP no-delayEnabledDisables Nagle's algorithm for low-latency NMEA delivery
Read timeout90 secondsTolerates quiet periods in NTRIP streams while detecting dead connections

RTCM Corrections over TCP

When an NTRIP client session is active, RTCM correction data is sent to the receiver over the same TCP socket. This is useful for receivers that accept corrections over their network interface, or when relaying corrections through a PC or companion device.

Auto-Reconnect

If the TCP connection drops unexpectedly, the app automatically attempts to reconnect:

  • Up to 3 retries with exponential backoff (2 s, 4 s, 8 s).
  • A toast message shows "Connection lost, reconnecting (attempt X)...".
  • If all retries fail, the app falls back to the internal GPS.

Foreground Service

The TCP foreground service additionally acquires a Wi-Fi lock (low-latency mode) and registers a network callback to prevent Android from disconnecting the Wi-Fi radio during the session.


Third-Party Companion Apps

Some GNSS manufacturers provide their own companion apps that deliver corrected positions via Android's mock location system. Mapit GIS can read location data from these apps instead of connecting to the receiver directly.

Supported Apps

AppManufacturerPreference
Eos Tools ProEos Positioning Systems (Arrow series)Eos Tools Pro
Zeno ConnectLeica Geosystems (Zeno series)Zeno Connect
Trimble Mobile ManagerTrimbleTrimble Mobile Manager
Trimble SPaceTrimble (DA2 receiver)Trimble SPace
SXblue ToolboxGeneq (SXblue series)SXblue Toolbox

How It Works

  1. Open Settings > External GNSS.
  2. Toggle the appropriate companion app option on.
  3. The companion app must be running and delivering mock locations via LocationManager.GPS_PROVIDER.
  4. Mapit GIS reads the standard Android Location object and extracts extended data from the extras bundle - including DOP values, satellite information, RMS accuracy, fix type, differential correction age, and more.
tip

Companion apps typically handle RTK corrections, NTRIP connections, and antenna calibration internally. The corrected position is then delivered to Mapit GIS as a mock location.

Extended Data from Companion Apps

In addition to standard position and accuracy, Mapit GIS reads the following from the location extras bundle when available:

  • DOP values: HDOP, VDOP, PDOP, GDOP, TDOP
  • RMS accuracy: HRMS, VRMS, 3D RMS
  • Satellite info: satellites in use, satellites in view, PRN IDs, elevation, azimuth, SNR, constellation type
  • Differential data: correction age, correction station ID, fix type
  • Height data: MSL height, geoid undulation, antenna height
  • Receiver info: model name, SBAS correction system

Mock Location Provider

When connected via Bluetooth or TCP/IP, Mapit GIS can optionally act as a mock location provider itself. This means the external GNSS position is injected into Android's location system, making it available to all other apps on the device - not just Mapit GIS.

To use this feature, you must enable Developer Options on your Android device and set Mapit GIS as the mock location app under Developer Options > Select mock location app.

caution

Mock location requires Developer Options to be enabled. On managed (enterprise) devices, this setting may be restricted by your IT administrator.


Connection Priority

If multiple connection options are enabled simultaneously (which is not recommended), the app resolves them in this priority order:

  1. Internal GPS (default)
  2. Bluetooth GPS
  3. TCP GPS
  4. USB Serial GPS
  5. BLE GPS
  6. Eos Tools Pro
  7. Zeno Connect
  8. Trimble Mobile Manager
  9. SXblue Toolbox
  10. Trimble SPace (highest priority)

The last enabled option in this list takes precedence.