# Executing this version
Check the following examples for executing your agent.
# Input parameters
You can obtain a complete list of the available input parameters by executing:
./elco-sp67m --help
# Version
You can easily check the version, the target operating system, architecture, and extra information about this agent by executing:
./elco-sp67m --version
# Default
The basic command for running your agent is as follows:
./elco-sp67m --id 2 \
--gateway 127.0.0.1:9090 \
--token 44049908-de2d-4811-add7-0608b9f18538 \
--broker 127.0.0.1:1883
This command will set your agent as follows:
- It will identify the agent with id
2
and token44049908-de2d-4811-add7-0608b9f18538
when connecting to the IoTHub - It will connect the agent with the IoTHub Gateway module running at the address
127.0.0.1
port9090
- It will connect the agent with the MQTT broker running at the address
127.0.0.1
port1883
- It will identify the agent as client with a random name in the MQTT broker
- It will disable the internal debug mode by logging only info, warnings, and error messages
# Enable debug
For enabling the internal debug mode and log also debug
messages you can execute your agent as follows:
./elco-sp67m --id 2 \
--gateway 127.0.0.1:9090 \
--token 44049908-de2d-4811-add7-0608b9f18538 \
--broker 127.0.0.1:1883 \
--debug true \
--broker-debug true
# Broker TLS
For enabling a secure connection with the MQTT broker you can specify the respective TLS files as follows:
./elco-sp67m --id 2 \
--gateway 127.0.0.1:9090 \
--token 44049908-de2d-4811-add7-0608b9f18538 \
--broker 127.0.0.1:8883 \
--client-id MySp67mAgent \
--broker-ca /path/to/ca.crt \
--client-cert /path/to/client.crt \
--client-key /path/to/client.key
# Config file
You can also specify a YAML file with your input settings.
id: 2
token: 44049908-de2d-4811-add7-0608b9f18538
gateway: 127.0.0.1:9090
debug: true
broker: 178.63.220.244:8883
broker-debug: false
client-id: MySp67mAgent
broker-ca: /path/to/ca.crt
client-cert: /path/to/client.crt
client-key: /path/to/client.key
Then, you can input this configuration file into your agent as follows:
./elco-sp67m --config-file /path/to/config.yml