MQTT
Added: 2023-08
The MQTT source subscribes to a topic on an MQTT broker, and imports the JSON messages published to it as if they had been captured by a Kismet datasource.
This allows Kismet to use data from tools which publish to MQTT, such as rtl_433, without running the tool under Kismet.
MQTT sources are named mqtt, and must include the host, topic, and mapping options:
kismet -c 'mqtt:host=broker.local,topic=rtl_433/+/events,mapping=RTL433,name=rtl433mqtt'
Compiling MQTT support
MQTT support requires libmosquitto, and is enabled by default. If libmosquitto is not available, MQTT support can be disabled by passing --disable-mosquitto to ./configure.
Kismet MQTT support
The MQTT source runs inside the Kismet server, rather than as a separate capture tool, and can not be used as a remote capture.
Every message received on the topic becomes a packet in Kismet, time-stamped as it arrives and tagged with the current GPS location. The mapping option tells Kismet what kind of data the messages contain, and which part of Kismet decodes them:
| Mapping | Data |
|---|---|
RTL433 | rtl_433 JSON; sensors become devices, as with the rtl_433 source, and meter records are handled as meters |
RTLamr | rtlamr JSON, as with the rtlamr source |
adsb or RTLadsb | ADS-B, either raw hex messages in an adsb or adsb_raw_msg field, or rtl_adsb style JSON |
antsdr-droneid | DJI DroneID records, as with the AntSDR DroneID source |
radview | Radview radiation records |
radiacode | Radiacode radiation records |
The mapping is case-sensitive.
Topic wildcards (+ and #) are supported, and every message received is processed.
Data imported over MQTT is logged in the kismetdb log data table. It is not logged in pcapng, as there are no packets to log.
If the connection to the broker is lost, Kismet raises an alert and the connection is re-established automatically.
MQTT source parameters
Naming and description options
All data sources accept the common naming and description options.
MQTT sources do not have a stable UUID unless one is set with the uuid option; set one if the source should keep the same identity across restarts.
Connection options
host={ hostname or address }
port={ port }
1883.topic={ topic }
mapping={ mapping }
identity={ client id }
kismet- followed by the source UUID.Authentication and TLS options
user={ username }
password must also be given, and logins are only allowed over TLS.password={ password }
tls={ true } / { false }
/etc/ssl/certs are used.tls_ca_file={ /path/to/ca.pem }
tls_ca_dir={ /path/to/ca/dir }
tls_certfile={ /path/to/cert.pem }
tls_keyfile={ /path/to/key.pem }
tls_certfile.tls_keyfile_pw={ password }
Location options
metagps={ name }
Debugging options
debug={ true } / { false }