MQTT Example
- Go to the MQTT Client example code from the RAK5860 repository.
- Copy and paste the code to Arduino IDE, and click upload.
Figure 1: MQTT Example- The process will first configure the APN of the cellular network, then configure the MQTT Broker (in this example, pointing to a specific address). It will then subscribe to an MQTT topic in the setup section and continuously publish Hello RAKwireless at fixed intervals. You can see the status if the device has already sent the payload via the Serial Terminal of the Arduino IDE.
Figure 1: MQTT Subscription to Topic
Figure 1: MQTT Publishing in fix intervals