Simple demo with GPIO MQTT protocol test on STM32 broker tests.mosquitto.org WIFI interface ESP8266 Issue of topic0 by pressing the button If reception of ', switching of the led If received from 'q' end of program

Dependencies:   MQTT

This is a MQTT protocol test on STM32 NUCLEO The broker is tests.mosquitto.org The WIFI interface is ESP8266

For configuration please check mbed_app.json and #define in main.cpp

Issue of topic0 by pressing the button If received 'l' from broker then switching of the led If received 'q' from broker then end the program

Information and debug with a terminal using UART over USB https://os.mbed.com/media/uploads/cdupaty/mqtt2.jpg

This test has been checked with MQTT.fx https://os.mbed.com/media/uploads/cdupaty/mqttfx.jpg

Committer:
cdupaty
Date:
Thu Jun 11 14:09:40 2020 +0000
Revision:
24:cc01ff2c2603
Parent:
21:a68bd76740f9
MQTT protocol test on STM32; broker tests.mosquitto.org; WIFI interface ESP8266; Issue of topic0 by pressing the button; If reception of ', switching of the led; If received from 'q' end of program

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jan Jongboom 20:49c9daf2b0ff 1 {
Jan Jongboom 20:49c9daf2b0ff 2 "config": {
Jan Jongboom 20:49c9daf2b0ff 3 "network-interface":{
Jan Jongboom 21:a68bd76740f9 4 "help": "options are ETHERNET, WIFI_ESP8266, WIFI_ODIN, WIFI_RTW, MESH_LOWPAN_ND, MESH_THREAD, CELLULAR_ONBOARD",
cdupaty 24:cc01ff2c2603 5 "value": "WIFI_ESP8266"
Jan Jongboom 20:49c9daf2b0ff 6 },
Jan Jongboom 20:49c9daf2b0ff 7 "mesh_radio_type": {
Jan Jongboom 20:49c9daf2b0ff 8 "help": "options are ATMEL, MCR20",
Jan Jongboom 20:49c9daf2b0ff 9 "value": "ATMEL"
Jan Jongboom 20:49c9daf2b0ff 10 },
Jan Jongboom 20:49c9daf2b0ff 11 "esp8266-tx": {
Jan Jongboom 20:49c9daf2b0ff 12 "help": "Pin used as TX (connects to ESP8266 RX)",
cdupaty 24:cc01ff2c2603 13 "value": "D8"
Jan Jongboom 20:49c9daf2b0ff 14 },
Jan Jongboom 20:49c9daf2b0ff 15 "esp8266-rx": {
Jan Jongboom 20:49c9daf2b0ff 16 "help": "Pin used as RX (connects to ESP8266 TX)",
cdupaty 24:cc01ff2c2603 17 "value": "D2"
Jan Jongboom 20:49c9daf2b0ff 18 },
Jan Jongboom 20:49c9daf2b0ff 19 "esp8266-ssid": {
cdupaty 24:cc01ff2c2603 20 "value": "\"spockWIFI3\""
Jan Jongboom 20:49c9daf2b0ff 21 },
Jan Jongboom 20:49c9daf2b0ff 22 "esp8266-password": {
cdupaty 24:cc01ff2c2603 23 "value": "\"voyager8472ncc1701a\""
Jan Jongboom 20:49c9daf2b0ff 24 },
Jan Jongboom 20:49c9daf2b0ff 25 "esp8266-debug": {
cdupaty 24:cc01ff2c2603 26 "value": false
Jan Jongboom 20:49c9daf2b0ff 27 }
Jan Jongboom 20:49c9daf2b0ff 28 },
Jan Jongboom 20:49c9daf2b0ff 29 "target_overrides": {
Jan Jongboom 20:49c9daf2b0ff 30 "*": {
Jan Jongboom 20:49c9daf2b0ff 31 "target.features_add": ["NANOSTACK", "LOWPAN_ROUTER", "COMMON_PAL"],
Jan Jongboom 20:49c9daf2b0ff 32 "mbed-mesh-api.6lowpan-nd-channel-page": 0,
Jan Jongboom 20:49c9daf2b0ff 33 "mbed-mesh-api.6lowpan-nd-channel": 12,
Jan Jongboom 20:49c9daf2b0ff 34 "mbed-trace.enable": 0
Jan Jongboom 20:49c9daf2b0ff 35 },
Jan Jongboom 20:49c9daf2b0ff 36 "HEXIWEAR": {
Jan Jongboom 20:49c9daf2b0ff 37 "esp8266-tx": "PTD3",
Jan Jongboom 20:49c9daf2b0ff 38 "esp8266-rx": "PTD2"
Jan Jongboom 20:49c9daf2b0ff 39 },
Jan Jongboom 20:49c9daf2b0ff 40 "NUCLEO_F401RE": {
Jan Jongboom 20:49c9daf2b0ff 41 "esp8266-tx": "D8",
Jan Jongboom 20:49c9daf2b0ff 42 "esp8266-rx": "D2"
Jan Jongboom 20:49c9daf2b0ff 43 },
Jan Jongboom 20:49c9daf2b0ff 44 "NUCLEO_F411RE": {
Jan Jongboom 20:49c9daf2b0ff 45 "esp8266-tx": "D8",
Jan Jongboom 20:49c9daf2b0ff 46 "esp8266-rx": "D2"
Jan Jongboom 20:49c9daf2b0ff 47 }
Jan Jongboom 20:49c9daf2b0ff 48 }
Jan Jongboom 20:49c9daf2b0ff 49 }