![ICP DAS USA LP-22 Series User Manual Download Page 123](http://html.mh-extra.com/html/icp-das-usa/lp-22-series/lp-22-series_user-manual_3722566123.webp)
AM335X-PAC Series User Manual version 2.0.1 Page: 123
Copyright © 2019 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
Step 1: Connecting an MQ-7255M module to a LinPAC MQTT broker.
On the configuration page for the MQ-7255M module, first
click the ‘MQTT’ option. Modify the
configuration for the built-in web browser on the MQ-7255M module, as illustrated in Figure
7.3-4.
For more detailed information, refer to Chapter 4.3 of the MQ-7200M user manual, which you can
download from:
http://ftp.icpdas.com/pub/cd/mq-7200m/document/mq-7200m_user_manual_english_v100.pdf
Figure 7.3-4.
Connectivity information
Step 2: Managing topics and subscriptions.
On the LP-9x2x module, use the following command to subscribe to a topic from the MQ7255M
via the MQTT Broker.
# mosquitto_sub -h <broker IP> -p 1883 -q 0 -t MQ7255M/
GetValue
/DO1
In this example, the topic being subscribed to
is ‘
MQ7255M/GetValue
/DO1’
, as illustrated in
Figure 7.3-5. The MQ-7255M module will then continuously publish the status information from
the DO1 channel to t
he topic ‘MQ7255M/GetValue/DO1’
. Messages will also be published in cases
where an I/O event causes the status to change, meaning that we can quickly monitor the status
of the DO1 channel from the module.