This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:practical:hardware:sut:stm32:iot_4 [2024/04/27 09:19] – ktokarz | en:iot-open:practical:hardware:sut:stm32:iot_4 [2024/04/27 09:41] (current) – ktokarz | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| - | To implement this scenario, it is necessary to get familiar with at least one of the following scenarios first: | + | To implement this scenario, it is necessary to get familiar with the LED controlling scenario: |
| + | * [[en: | ||
| + | |||
| + | and at least one of the following scenarios first: | ||
| * [[en: | * [[en: | ||
| * [[en: | * [[en: | ||
| Line 87: | Line 90: | ||
| In our case, the command can look like this: | In our case, the command can look like this: | ||
| < | < | ||
| - | AT+MQTTUSERCFG=0, | + | AT+MQTTUSERCFG=0, |
| </ | </ | ||
| Line 102: | Line 105: | ||
| The command can look like this: | The command can look like this: | ||
| < | < | ||
| - | AT+MQTTCONN=0, | + | AT+MQTTCONN=0, |
| </ | </ | ||
| Line 114: | Line 117: | ||
| * " | * " | ||
| * qos - mode of the quality of service, 0, 1 or 2, default 0. | * qos - mode of the quality of service, 0, 1 or 2, default 0. | ||
| + | The command can look like this in the example below: | ||
| + | < | ||
| + | AT+MQTTSUB=0, | ||
| + | </ | ||
| After a successful subscription, | After a successful subscription, | ||
| Line 163: | Line 170: | ||
| ===== FAQ ===== | ===== FAQ ===== | ||
| - | **Can I subscribe to more than one topic?**: Yes, you can. For every incoming message you would receive the information on the topic of this specific message, so you would be able to recognise them. | + | **My MQTT client disconnects randomly**: The most common reason is you're using a non-unique MQTT client name. Please change it to some other (even random generated) and give it another try.\\ |
| + | **Can I subscribe to more than one topic?**: Yes, you can. For every incoming message you would receive the information on the topic of this specific message, so you would be able to recognise them.\\ | ||
| + | **How do I send messages to which I am subscribed? | ||
| + | **Do I need to authorise to publish and subscribe? | ||
| <WRAP noprint> | <WRAP noprint> | ||