Configuring data transmission over the MQTT protocol
To configure data transmission over the MQTT protocol:
- Create the
MqttPublisherSettings-0.json
file. - In the
MqttPublisherSettings-0.json
file, specify the MQTT settings and their values in accordance with JSON syntax. - Put the configuration file into the directory
/app/Core/config/transfer/mqtt/publisher
on theHW-IDS
partition of the microSD card.
Sample configuration file:
MqttPublisherSettings-0.json
{
"id": 0,
"name": "Kaspersky IoT Secure Gateway 100 MQTT Publisher",
"description": "Transfer data to MQTT Broker by Kaspersky IoT Secure Gateway 100",
"clientId": "KISG100",
"serverUri": "ssl://192.168.188.8:8883",
"security": {
"clientPkiData": {
"certificate": "mqtt-publisher.crt",
"privateKey": "mqtt-publisher.key"
},
"trustStore": ["ca-bundle.crt"]
},
"userCredentials":{
"username": "KISG100",
"password": "4vRXE84zsCy8bLQcZi2HH82TmC"
},
"lastWill": {
"topicName": "LastWill",
"message": "LastMessage"
},
"keepAlive": 800,
"qualityOfService": 1,
"topics": [
{
"id": 0,
"name": "Heartbeat",
"topicName": "Heartbeat"
},
{
"id": 1,
"name": "Temperature",
"topicName": "Temperature"
},
{
"id": 2,
"name": "Speed",
"topicName": "Speed"
}
]
}
To edit files in JSON format, we recommend using a text editor that supports JSON syntax highlight. This will help avoid potential errors (for example, unbalanced braces).