Device Discovery & Connection
Scan, connect, and subscribe to Aero-Tracker BLE services with example code.
Device Discovery
Aero-Tracker devices advertise with names following the pattern: AEROXXXXXX
where XXXXXX
is a unique identifier.
BLE Services Overview
Aero-Tracker devices expose two different BLE profiles that can be used simultaneously:
1. Generic NMEA BLE Service
Provides: Read-only access to NMEA traffic data
- Service UUID:
FFE0
- RX Characteristic (Notify):
FFE1
- Data Format: Standard NMEA 0183 sentences
- Permissions: No pairing required
2. Aero-Tracker Proprietary BLE Service
Provides: Device status monitoring, pairing, and configuration alongside NMEA data
- Service UUID:
3F6AECC7-5406-47AB-9A75-0F5CF12EAF8E
- RX Characteristic (Notify):
E8A6196B-2B02-4EFE-ADC7-6702CBBA3605
- TX Characteristic (Write):
ABBDFD33-B2EF-4E78-8D7C-A7427FC441DB
- Data Format: NMEA sentences + JSON status with
##END##
markers - Permissions: Device pairing may be required
Connection Flow
⚠️ Important: When developing cross-platform apps, reliably identifying the same Aero-Tracker device across iOS and Android can be challenging due to differences in how device addresses are handled. For more details and recommended solutions, see: Cross-Platform Device Identification Challenge
- Initialize Bluetooth
- Scan for BLE devices advertising the target service UUID(s)
- Connect to the device
- Discover services and characteristics
- Subscribe to the RX characteristic(s) to receive data
- Set MTU to 500 bytes (Android recommended for better performance)
Basic Implementation Example
// Initialize Bluetooth
await bluetoothLE.initialize();
// Scan for devices (can scan for both services)
await bluetoothLE.startScan({
services: ['FFE0', '3F6AECC7-5406-47AB-9A75-0F5CF12EAF8E']
});
// Connect to discovered device
const device = /* your device discovery implementation */;
await bluetoothLE.connect({ address: device.address });
await bluetoothLE.discover({ address: device.address });
// Set MTU for better performance (Android)
if (platform.is('android')) {
await bluetoothLE.mtu({ address: device.address, mtu: 500 });
}
// Subscribe to NMEA data
const nmeaSubscription = bluetoothLE.subscribe({
address: device.address,
service: 'FFE0',
characteristic: 'FFE1'
}).subscribe(data => {
const chunk = bluetoothLE.bytesToString(
bluetoothLE.encodedStringToBytes(data.value)
);
processNMEAData(chunk);
});
// Subscribe to status data (optional)
const statusSubscription = bluetoothLE.subscribe({
address: device.address,
service: '3F6AECC7-5406-47AB-9A75-0F5CF12EAF8E',
characteristic: 'E8A6196B-2B02-4EFE-ADC7-6702CBBA3605'
}).subscribe(data => {
const chunk = bluetoothLE.bytesToString(
bluetoothLE.encodedStringToBytes(data.value)
);
processStatusData(chunk);
});
Testing Tools
For testing and debugging BLE connections, we recommend LightBlue - a powerful BLE scanner and analysis tool:
- iOS: App Store
- Android: Google Play
LightBlue allows you to:
- Scan for nearby BLE devices
- Connect and explore services/characteristics
- Monitor real-time data streams
- Test read/write operations