Digi IX40 User Manual page 633

Table of Contents

Advertisement

Services
7. Enable connections from clients that do not provide a username:
(config)> service mqtt allow_anonymous true
(config)>
8. By default, the MQTT broker will allow clients without client IDs to connect, and will generate a
client ID for them. To disable:
(config)> service mqtt allow_zero_length_client_id false
(config)>
9. Enable the broker to replace the client ID with the username, which will prevent one client
from disconnecting another by using the same client ID:
(config)> service mqtt use_username_as_client_id true
(config)>
10. Add and configure clients that are allowed to connect to the broker:
a. Add a client:
(config)> add service mqtt client end
(config service mqtt client 0)>
b. Set the username and password for the client:
(config service mqtt client 0)> username value
(config service mqtt client 0)> password value
(config service mqtt client 0)>
c. Add a topic to control this client's access to:
i. Add a topic:
(config service mqtt client 0)> add topic_acl end
(config service mqtt client 0 topic_acl 0)>
ii. Set the topic:
(config service mqtt client 0 topic_acl 0)> topic value
(config service mqtt client 0 topic_acl 0)>
where value is one of:
iii. Set the access type to apply to the topic:
(config service mqtt client 0 topic_acl 0)> access value
(config service mqtt client 0 topic_acl 0)>
where value is one of:
IX40 User Guide
The topic.
n
The signal level wildcard, +.
n
The multi-level wildcard, #.
n
Use the MQTT broker service
633

Advertisement

Table of Contents
loading

Table of Contents