How to integrate with Reach RX2
This guide explains how to integrate Reach RX2 receivers with your Android or iOS app using Bluetooth Classic for real-time position streaming.
Overview
Reach RX2 supports intgration with both Android and iOS apps via Bluetooth Classic and offers two options based on how much metadata you need:
- Access the NMEA stream directly.
- Use Reach RX2 as a location source.
Learn more in the sections below.
Connect your mobile device to Reach RX2
To connect to your Reach RX2, you need to pair it with your iOS or Android device. Do as follows:
- Power on your Reach RX2.
- Go to your device’s Bluetooth settings.
- Find Reach RX2 in the list of available devices and select it to start pairing.
- Wait for your device to complete pairing with Reach RX2.
Integrate with Reach RX2
After pairing your iOS or Android device with Reach RX2, you can integrate it to read Reach's position in real time within your app. The integration method depends on the Reach RX2 revision and can be done in two ways:
Access the NMEA stream directly
If you want more metadata about the position, the position quality, or the receiver, you will need to access and parse the NMEA stream directly. This is possible for both platforms:
- For iOS devices, this can be done by using Apple's External Accessory framework. Using this API, you can both read the NMEA stream and send corrections to Reach RX2 MFi. To read the NMEA stream, you need to use a special protocol-com.emlid.nmea.
- For Android devices, this can be done using standard Bluetooth communication via Bluetooth Serial Port Profile (SPP). Android’s Bluetooth API allows direct access to the NMEA stream and sending RTK corrections without requiring specific protocol names. The API handles connection and data transfer.
Learn more about the NMEA stream in the NMEA specification.
Use Reach RX2 as a location source
Due to the MFi support on Reach RX2, the easiest way to integrate is to use it as the location source. The device on iOS will detect the data stream from Reach RX2 and use the location from the stream instead of the internal GPS unit. This technique is also called mock location.
Once connected, the standard iOS Core Location API will start reporting the location of the Reach RX2 MFi receiver instead of the iPhone or iPad's internal GNSS unit. If you previously relied on the Core Location framework, no development is required.
For Android devices, you can enable no-code integration using Android Mock Location. Learn more from the Getting Reach coordinates on Android devices via Bluetooth guide.
Setting up corrections stream
To work in RTK with high-accuracy positioning, you will need to provide RTK corrections to the device. You can send corrections to Reach RX2 in the following ways:
- For iOS devices, you can configure corrections stream within the Emlid Flow app and send them to your app in the background.
- Alternatively for both iOS and Android devices, you can implement the NTRIP client functionality inside your app. In this case, you need to implement the com.emlid.corrections protocol, which is used to deliver correction data to Reach receivers. Implementing this protocol ensures full compatibility and reliable operation with Reach devices.
After setting up the corrections stream on your Reach RX2, the integration is complete.
Refer to the RTK Corrections and NTRIP Casters article for details on setting up a corrections stream sent from your device to the receiver.
Before app release
If you integrate your Reach RX2 with an iOS app and are ready to submit the app for review, please contact us at [email protected] and provide your app bundle ID. As the accessory manufacturer, we will whitelist your app.
We will also provide you with a special accessory PPID to include in your app metadata. This should be enough to get your app with the Reach RX2 support published on the App Store.