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.
- Android
- iOS
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
- Open Settings from the main menu.
- Navigate to External GNSS.
- Toggle Paired Bluetooth GPS on.
- The app requests Bluetooth permissions (
BLUETOOTH_CONNECTandBLUETOOTH_SCANon Android 12+). - A device picker dialog appears listing all bonded (paired) Bluetooth devices by name and MAC address.
- Select your receiver. The device address and name are saved for future sessions.
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:
| Method | Description |
|---|---|
| Device UUID | Uses the UUID advertised by the receiver itself |
| Standard SPP UUID | Uses the standard Serial Port Profile UUID (00001101-0000-1000-8000-00805F9B34FB) |
| Insecure RFCOMM | Uses an insecure RFCOMM channel - helpful for older receivers that reject secure connections |
| Direct channel | Opens 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
- Open Settings > External GNSS.
- Toggle BLE GPS on.
- The app requests Bluetooth permissions (
BLUETOOTH_CONNECTandBLUETOOTH_SCANon Android 12+). - A scan dialog appears and automatically searches for nearby BLE devices advertising the NUS service UUID.
- The scan runs for up to 15 seconds in low-latency mode.
- Select your receiver from the list. The device name and address are saved for future sessions.
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:
- GATT connect - establishes a BLE link to the receiver.
- Service discovery - locates the Nordic UART Service (NUS) on the device.
- Enable notifications - subscribes to the NUS TX characteristic (receiver to phone) by writing the CCCD descriptor.
- MTU negotiation - requests a larger MTU (up to 512 bytes) for efficient data transfer.
- 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
- Open Settings > External GNSS.
- Toggle USB Serial GPS on.
- 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 |
Most modern GNSS receivers default to 115200 baud. Check your receiver's documentation if you are unsure which baud rate to use.
Connection Process
- Connect the GNSS receiver to your Android device via a USB OTG cable or adapter.
- The app auto-detects USB serial devices using standard USB CDC/ACM and FTDI/CH340/CP210x/PL2303 drivers.
- Android prompts for USB permission the first time a device is connected.
- 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
- Open Settings > External GNSS.
- Toggle TCP GPS on.
- Enter the Server hostname or IP address (default:
localhost). - Enter the Port number (default:
52003).
Socket Configuration
The TCP connection is tuned for real-time GNSS data:
| Setting | Value | Purpose |
|---|---|---|
| Keep-alive | Enabled | Prevents router/firewall timeout on long sessions |
| TCP no-delay | Enabled | Disables Nagle's algorithm for low-latency NMEA delivery |
| Read timeout | 90 seconds | Tolerates 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
| App | Manufacturer | Preference |
|---|---|---|
| Eos Tools Pro | Eos Positioning Systems (Arrow series) | Eos Tools Pro |
| Zeno Connect | Leica Geosystems (Zeno series) | Zeno Connect |
| Trimble Mobile Manager | Trimble | Trimble Mobile Manager |
| Trimble SPace | Trimble (DA2 receiver) | Trimble SPace |
| SXblue Toolbox | Geneq (SXblue series) | SXblue Toolbox |
How It Works
- Open Settings > External GNSS.
- Toggle the appropriate companion app option on.
- The companion app must be running and delivering mock locations via
LocationManager.GPS_PROVIDER. - Mapit GIS reads the standard Android
Locationobject and extracts extended data from theextrasbundle - including DOP values, satellite information, RMS accuracy, fix type, differential correction age, and more.
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.
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:
- Internal GPS (default)
- Bluetooth GPS
- TCP GPS
- USB Serial GPS
- BLE GPS
- Eos Tools Pro
- Zeno Connect
- Trimble Mobile Manager
- SXblue Toolbox
- Trimble SPace (highest priority)
The last enabled option in this list takes precedence.
Bluetooth Low Energy (BLE) Connection
Coming soon - available in version iOS App Version 1.1
Mapit GIS on iOS connects to external GNSS receivers over Bluetooth Low Energy using the Nordic UART Service (NUS) profile. This works with any receiver that advertises the NUS service — currently tested with ArduSimple receivers. We are actively working with other major manufacturers to test and certify compatibility (see NTRIP Client — Tested Receivers for details).
Unlike Android, iOS does not support classic Bluetooth SPP for GNSS receivers (this requires Apple MFi certification). BLE does not have this restriction and works with any receiver that advertises the Nordic UART Service.
Scanning for Devices
- Open Settings > External GNSS.
- Toggle BLE GPS on.
- iOS prompts for Bluetooth permission the first time.
- A scan screen appears and automatically searches for nearby BLE devices advertising the Nordic UART Service (NUS).
- Discovered devices are listed with their name and signal strength indicator (4-bar visualisation based on RSSI).
- Select your receiver. The device identifier and name are saved for future sessions.
BLE does not require pairing the device in iOS Settings first. The app discovers GNSS receivers directly through its built-in scan screen. If a device appears as "Unknown GNSS Device", check that your receiver's Bluetooth name is configured correctly.
Signal Strength
The device picker shows a signal strength indicator for each discovered device:
| RSSI Range | Strength |
|---|---|
| −50 dBm to 0 dBm | Excellent |
| −65 dBm to −50 dBm | Good |
| −80 dBm to −65 dBm | Fair |
| Below −80 dBm | Weak |
Connection Process
When a BLE GNSS session starts, the app connects to the selected device using iOS CoreBluetooth. The connection sequence is:
- Retrieve peripheral — looks up the saved device by its identifier. If not found in the Bluetooth cache, falls back to scanning for the NUS service UUID.
- GATT connect — establishes a BLE link to the receiver.
- Service discovery — locates the Nordic UART Service on the device.
- Characteristic discovery — finds both the NUS TX characteristic (receiver → phone) and NUS RX characteristic (phone → receiver).
- Enable notifications — subscribes to the TX characteristic to receive NMEA data.
- MTU negotiation — queries the maximum write length for efficient RTCM delivery.
- Connection ready — the app only reports "connected" once both TX and RX characteristics are discovered and notifications are enabled.
Connection Timeout
iOS CoreBluetooth's connect() method waits indefinitely by default. To avoid the app appearing stuck, Mapit GIS enforces a 10-second connection timeout. If the GATT connection and characteristic discovery are not completed within this window, the connection attempt is cancelled and a reconnect cycle begins.
NMEA Parsing
BLE GNSS receivers often send a mix of NMEA text and binary data (e.g. UBX proprietary messages) on the same NUS characteristic. Mapit GIS uses a checksum-based sentence delimiter rather than relying on newline characters:
- Scans for
$or!followed by at least two uppercase letters (talker ID) to find sentence starts. - Locates the
*HHchecksum marker (asterisk followed by two hexadecimal digits) to find sentence ends. - Discards binary data between sentences automatically.
This approach is robust against binary data that may corrupt line endings or contain false $ characters.
The line buffer is capped at 4 KB to prevent unbounded memory growth if the receiver sends large volumes of binary data alongside NMEA.
RTCM Corrections over BLE
When an NTRIP client session is active, RTCM correction data is sent to the receiver by writing to the NUS RX characteristic. The app automatically:
- Chunks RTCM data into segments that fit within the negotiated MTU (minus 3 bytes for ATT overhead, minimum 20 bytes).
- Queues writes serially — BLE requires one outstanding write at a time. Each chunk is sent only after the previous one completes.
- Uses write-without-response for lower latency, which is important for real-time RTK corrections.
Auto-Reconnect
If the BLE connection drops unexpectedly (e.g. the receiver goes out of range momentarily), the app automatically attempts to reconnect using exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | 2 seconds |
| 2 | 4 seconds |
| 3 | 8 seconds |
| 4 | 16 seconds |
| 5+ | 30 seconds (capped) |
The reconnect cycle continues as long as BLE GPS remains enabled. If the device is not found in the Bluetooth cache during a reconnect, the app falls back to scanning for the NUS service UUID to rediscover it.
If a deliberate disconnect is triggered by the user, no reconnect is attempted.
Bluetooth State Handling
The app responds to iOS Bluetooth state changes:
| State | Behaviour |
|---|---|
| Powered on | Connects to the saved device automatically |
| Powered off | Treats the connection as lost and reports disconnected |
| Unauthorised | Logs an error — the user must grant Bluetooth permission in iOS Settings |
TCP/IP Connection
TCP/IP is an alternative method for connecting an external GNSS receiver on iOS. This works with network-connected receivers, NTRIP casters, or GNSS data relayed from a PC or companion device over Wi-Fi.
Configuration
- Open Settings > External GNSS.
- Toggle TCP GPS on.
- Enter the Server hostname or IP address.
- Enter the Port number.
The app connects to the specified TCP endpoint and begins reading NMEA sentences from the data stream.
How It Works
Many GNSS receivers offer a Wi-Fi hotspot or can stream NMEA data over a local network. Some common setups:
| Setup | Description |
|---|---|
| Receiver Wi-Fi hotspot | Connect your iPhone/iPad to the receiver's Wi-Fi network and enter its IP address |
| NTRIP relay | Use a PC or companion device to relay NTRIP corrections and NMEA output over TCP |
| Local network | Receiver and iOS device on the same Wi-Fi network |
If your receiver has its own companion app that can output NMEA over a TCP port, you can use that app alongside Mapit GIS. Configure the companion app to listen on a TCP port, then point Mapit GIS at localhost (or the device's IP) and that port.