MQTT Streaming
Network Survey streams survey data in real-time to an MQTT broker via the publish/subscribe protocol.
Connection Setup
Section titled “Connection Setup”QR Code Configuration (Recommended)
Section titled “QR Code Configuration (Recommended)”Generate a QR code with this JSON format:
{ "mqtt_host": "cloud.mymqttserver.com", "mqtt_port": 8883, "mqtt_tls": true, "mqtt_client": "aclient", "mqtt_username": "auser", "mqtt_password": "apassword", "mqtt_topic_prefix": "my/custom/topic/path/", "cellular_stream_enabled": true, "wifi_stream_enabled": true, "bluetooth_stream_enabled": true, "gnss_stream_enabled": true, "device_status_stream_enabled": true}
Scan via Menu → MQTT Connection → Scan QR Code.
Manual Configuration
Section titled “Manual Configuration”- Menu → MQTT Connection
- Enter connection details:
- Host: broker.example.com
- Port: 1883 (plain) or 8883 (TLS)
- TLS Enabled: Toggle on for encrypted
- Client ID: Unique identifier
- Username: MQTT username
- Password: MQTT password
- Topic Prefix: (optional) Custom prefix
- Toggle technologies to stream
- Tap “Connect”
MQTT Topics
Section titled “MQTT Topics”Default topic structure, which are officially defined in the Network Survey Messaging API documenatation:
Technology | Topic | Message Type |
---|---|---|
GSM | gsm_message | GsmRecord |
CDMA | cdma_message | CdmaRecord |
UMTS | umts_message | UmtsRecord |
LTE | lte_message | LteRecord |
NR (5G) | nr_message | NrRecord |
Wi-Fi | 80211_beacon_message | WifiBeaconRecord |
Bluetooth | bluetooth_message | BluetoothRecord |
GNSS | gnss_message | GnssRecord |
Device Status | device_status_message | DeviceStatus and PhoneState |
Custom Topic Prefix
Section titled “Custom Topic Prefix”Add a prefix to organize topics by device/location. Example: surveys/device1/
creates surveys/device1/lte_message
.
Message Format
Section titled “Message Format”Messages are sent as JSON. See Message Formats for complete specifications.
Troubleshooting
Section titled “Troubleshooting”- Connection refused - Verify broker is running, check host/port/credentials, confirm firewall allows connection
- TLS errors - Ensure TLS enabled on both sides; use port 8883 for TLS, 1883 for plain
- Client ID conflict - Use unique Client ID per device or enable auto-generation
- No messages received - Verify streaming enabled and connection status shows “Connected”
Related
Section titled “Related”- Data Streaming Overview - Streaming basics
- gRPC Streaming - Alternative protocol
- Message Formats - Message specifications
- NS Analytics QR Registration - Similar QR process