From 2d1e1c50e810558550308850ee479d24ab90ca33 Mon Sep 17 00:00:00 2001 From: yuanjm Date: Tue, 23 Feb 2021 15:29:07 +0800 Subject: [PATCH 1/3] examples: Update mqtt open source test server address --- examples/mesh/ip_internal_network/main/mqtt_app.c | 2 +- examples/protocols/mqtt/ssl/README.md | 8 ++++---- examples/protocols/mqtt/ssl/main/Kconfig.projbuild | 2 +- examples/protocols/mqtt/tcp/main/Kconfig.projbuild | 2 +- examples/protocols/mqtt/ws/README.md | 2 +- examples/protocols/mqtt/ws/main/Kconfig.projbuild | 2 +- examples/protocols/mqtt/wss/README.md | 10 +++++----- examples/protocols/mqtt/wss/main/Kconfig.projbuild | 2 +- .../protocols/pppos_client/main/pppos_client_main.c | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/mesh/ip_internal_network/main/mqtt_app.c b/examples/mesh/ip_internal_network/main/mqtt_app.c index abc8ac95c4..abec5f5b0d 100644 --- a/examples/mesh/ip_internal_network/main/mqtt_app.c +++ b/examples/mesh/ip_internal_network/main/mqtt_app.c @@ -71,7 +71,7 @@ void mqtt_app_publish(char* topic, char *publish_string) void mqtt_app_start(void) { esp_mqtt_client_config_t mqtt_cfg = { - .uri = "mqtt://mqtt.eclipse.org", + .uri = "mqtt://mqtt.eclipseprojects.io", }; s_client = esp_mqtt_client_init(&mqtt_cfg); diff --git a/examples/protocols/mqtt/ssl/README.md b/examples/protocols/mqtt/ssl/README.md index aa96a6841a..680fc8a141 100644 --- a/examples/protocols/mqtt/ssl/README.md +++ b/examples/protocols/mqtt/ssl/README.md @@ -2,7 +2,7 @@ (See the README.md file in the upper level 'examples' directory for more information about examples.) -This example connects to the broker mqtt.eclipse.org using ssl transport and as a demonstration subscribes/unsubscribes and send a message on certain topic. +This example connects to the broker mqtt.eclipseprojects.io using ssl transport and as a demonstration subscribes/unsubscribes and send a message on certain topic. (Please note that the public broker is maintained by the community so may not be always available, for details please see this [disclaimer](https://iot.eclipse.org/getting-started/#sandboxes)) It uses ESP-MQTT library which implements mqtt client to connect to mqtt broker. @@ -19,13 +19,13 @@ This example can be executed on any ESP32 board, the only required interface is * Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details. * When using Make build system, set `Default serial port` under `Serial flasher config`. -PEM certificate for this example could be extracted from an openssl `s_client` command connecting to mqtt.eclipse.org. +PEM certificate for this example could be extracted from an openssl `s_client` command connecting to mqtt.eclipseprojects.io. In case a host operating system has `openssl` and `sed` packages installed, one could execute the following command to download and save the root certificate to a file (Note for Windows users: Both Linux like environment or Windows native packages may be used). ``` -echo "" | openssl s_client -showcerts -connect mqtt.eclipse.org:8883 | sed -n "1,/Root/d; /BEGIN/,/END/p" | openssl x509 -outform PEM >mqtt_eclipse_org.pem +echo "" | openssl s_client -showcerts -connect mqtt.eclipseprojects.io:8883 | sed -n "1,/Root/d; /BEGIN/,/END/p" | openssl x509 -outform PEM >mqtt_eclipse_org.pem ``` Please note that this is not a general command for downloading a root certificate for an arbitrary host; -this command works with mqtt.eclipse.org as the site provides root certificate in the chain, which then could be extracted +this command works with mqtt.eclipseprojects.io as the site provides root certificate in the chain, which then could be extracted with text operation. ### Build and Flash diff --git a/examples/protocols/mqtt/ssl/main/Kconfig.projbuild b/examples/protocols/mqtt/ssl/main/Kconfig.projbuild index b1acbc5cab..5e9357d1a6 100644 --- a/examples/protocols/mqtt/ssl/main/Kconfig.projbuild +++ b/examples/protocols/mqtt/ssl/main/Kconfig.projbuild @@ -2,7 +2,7 @@ menu "Example Configuration" config BROKER_URI string "Broker URL" - default "mqtts://mqtt.eclipse.org:8883" + default "mqtts://mqtt.eclipseprojects.io:8883" help URL of an mqtt broker which this example connects to. diff --git a/examples/protocols/mqtt/tcp/main/Kconfig.projbuild b/examples/protocols/mqtt/tcp/main/Kconfig.projbuild index fc6e8a184c..c11539fb8d 100644 --- a/examples/protocols/mqtt/tcp/main/Kconfig.projbuild +++ b/examples/protocols/mqtt/tcp/main/Kconfig.projbuild @@ -2,7 +2,7 @@ menu "Example Configuration" config BROKER_URL string "Broker URL" - default "mqtt://mqtt.eclipse.org" + default "mqtt://mqtt.eclipseprojects.io" help URL of the broker to connect to diff --git a/examples/protocols/mqtt/ws/README.md b/examples/protocols/mqtt/ws/README.md index 3b2a05a979..c9ca6eabea 100644 --- a/examples/protocols/mqtt/ws/README.md +++ b/examples/protocols/mqtt/ws/README.md @@ -2,7 +2,7 @@ (See the README.md file in the upper level 'examples' directory for more information about examples.) -This example connects to the broker mqtt.eclipse.org over web sockets as a demonstration subscribes/unsubscribes and send a message on certain topic. +This example connects to the broker mqtt.eclipseprojects.io over web sockets as a demonstration subscribes/unsubscribes and send a message on certain topic. (Please note that the public broker is maintained by the community so may not be always available, for details please see this [disclaimer](https://iot.eclipse.org/getting-started/#sandboxes)) It uses ESP-MQTT library which implements mqtt client to connect to mqtt broker. diff --git a/examples/protocols/mqtt/ws/main/Kconfig.projbuild b/examples/protocols/mqtt/ws/main/Kconfig.projbuild index c298f5d7c8..e547a5156c 100644 --- a/examples/protocols/mqtt/ws/main/Kconfig.projbuild +++ b/examples/protocols/mqtt/ws/main/Kconfig.projbuild @@ -2,7 +2,7 @@ menu "Example Configuration" config BROKER_URI string "Broker URL" - default "ws://mqtt.eclipse.org:80/mqtt" + default "ws://mqtt.eclipseprojects.io:80/mqtt" help URL of an mqtt broker which this example connects to. diff --git a/examples/protocols/mqtt/wss/README.md b/examples/protocols/mqtt/wss/README.md index c07477fe12..3d2fa2b8af 100644 --- a/examples/protocols/mqtt/wss/README.md +++ b/examples/protocols/mqtt/wss/README.md @@ -1,7 +1,7 @@ # ESP-MQTT MQTT over WSS Sample application (See the README.md file in the upper level 'examples' directory for more information about examples.) -This example connects to the broker mqtt.eclipse.org over secure websockets and as a demonstration subscribes/unsubscribes and send a message on certain topic. +This example connects to the broker mqtt.eclipseprojects.io over secure websockets and as a demonstration subscribes/unsubscribes and send a message on certain topic. (Please note that the public broker is maintained by the community so may not be always available, for details please see this [disclaimer](https://iot.eclipse.org/getting-started/#sandboxes)) It uses ESP-MQTT library which implements mqtt client to connect to mqtt broker. @@ -18,15 +18,15 @@ This example can be executed on any ESP32 board, the only required interface is * Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details. * When using Make build system, set `Default serial port` under `Serial flasher config`. -Note how to create a PEM certificate for mqtt.eclipse.org: +Note how to create a PEM certificate for mqtt.eclipseprojects.io: -PEM certificate for this example could be extracted from an openssl `s_client` command connecting to mqtt.eclipse.org. +PEM certificate for this example could be extracted from an openssl `s_client` command connecting to mqtt.eclipseprojects.io. In case a host operating system has `openssl` and `sed` packages installed, one could execute the following command to download and save the root certificate to a file (Note for Windows users: Both Linux like environment or Windows native packages may be used). ``` -echo "" | openssl s_client -showcerts -connect mqtt.eclipse.org:443 | sed -n "1,/Root/d; /BEGIN/,/END/p" | openssl x509 -outform PEM >mqtt_eclipse_org.pem +echo "" | openssl s_client -showcerts -connect mqtt.eclipseprojects.io:443 | sed -n "1,/Root/d; /BEGIN/,/END/p" | openssl x509 -outform PEM >mqtt_eclipse_org.pem ``` Please note that this is not a general command for downloading a root certificate for an arbitrary host; -this command works with mqtt.eclipse.org as the site provides root certificate in the chain, which then could be extracted +this command works with mqtt.eclipseprojects.io as the site provides root certificate in the chain, which then could be extracted with text operation. ### Build and Flash diff --git a/examples/protocols/mqtt/wss/main/Kconfig.projbuild b/examples/protocols/mqtt/wss/main/Kconfig.projbuild index 5e43c89493..b6d1f593dd 100644 --- a/examples/protocols/mqtt/wss/main/Kconfig.projbuild +++ b/examples/protocols/mqtt/wss/main/Kconfig.projbuild @@ -2,7 +2,7 @@ menu "Example Configuration" config BROKER_URI string "Broker URL" - default "wss://mqtt.eclipse.org:443/mqtt" + default "wss://mqtt.eclipseprojects.io:443/mqtt" help URL of an mqtt broker which this example connects to. diff --git a/examples/protocols/pppos_client/main/pppos_client_main.c b/examples/protocols/pppos_client/main/pppos_client_main.c index 67a64c3fb0..2602299e25 100644 --- a/examples/protocols/pppos_client/main/pppos_client_main.c +++ b/examples/protocols/pppos_client/main/pppos_client_main.c @@ -19,7 +19,7 @@ #include "bg96.h" #include "sim7600.h" -#define BROKER_URL "mqtt://mqtt.eclipse.org" +#define BROKER_URL "mqtt://mqtt.eclipseprojects.io" static const char *TAG = "pppos_example"; static EventGroupHandle_t event_group = NULL; From 3eceea7f5d0f062886c7deaa218c12bfe690483a Mon Sep 17 00:00:00 2001 From: yuanjm Date: Tue, 23 Feb 2021 15:30:06 +0800 Subject: [PATCH 2/3] doc: Update mqtt open source test server address --- docs/en/api-reference/protocols/mqtt.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/en/api-reference/protocols/mqtt.rst b/docs/en/api-reference/protocols/mqtt.rst index 47021b608a..7d00a03767 100644 --- a/docs/en/api-reference/protocols/mqtt.rst +++ b/docs/en/api-reference/protocols/mqtt.rst @@ -33,30 +33,30 @@ URI - Curently support ``mqtt``, ``mqtts``, ``ws``, ``wss`` schemes - MQTT over TCP samples: - - ``mqtt://mqtt.eclipse.org``: MQTT over TCP, default port 1883: - - ``mqtt://mqtt.eclipse.org:1884`` MQTT over TCP, port 1884: - - ``mqtt://username:password@mqtt.eclipse.org:1884`` MQTT over TCP, + - ``mqtt://mqtt.eclipseprojects.io``: MQTT over TCP, default port 1883: + - ``mqtt://mqtt.eclipseprojects.io:1884`` MQTT over TCP, port 1884: + - ``mqtt://username:password@mqtt.eclipseprojects.io:1884`` MQTT over TCP, port 1884, with username and password - MQTT over SSL samples: - - ``mqtts://mqtt.eclipse.org``: MQTT over SSL, port 8883 - - ``mqtts://mqtt.eclipse.org:8884``: MQTT over SSL, port 8884 + - ``mqtts://mqtt.eclipseprojects.io``: MQTT over SSL, port 8883 + - ``mqtts://mqtt.eclipseprojects.io:8884``: MQTT over SSL, port 8884 - MQTT over Websocket samples: - - ``ws://mqtt.eclipse.org:80/mqtt`` + - ``ws://mqtt.eclipseprojects.io:80/mqtt`` - MQTT over Websocket Secure samples: - - ``wss://mqtt.eclipse.org:443/mqtt`` + - ``wss://mqtt.eclipseprojects.io:443/mqtt`` - Minimal configurations: .. code:: c const esp_mqtt_client_config_t mqtt_cfg = { - .uri = "mqtt://mqtt.eclipse.org", + .uri = "mqtt://mqtt.eclipseprojects.io", // .user_context = (void *)your_context }; esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg); @@ -69,15 +69,15 @@ URI SSL ^^^ -- Get certificate from server, example: ``mqtt.eclipse.org`` - ``openssl s_client -showcerts -connect mqtt.eclipse.org:8883 /dev/null|openssl x509 -outform PEM >mqtt_eclipse_org.pem`` +- Get certificate from server, example: ``mqtt.eclipseprojects.io`` + ``openssl s_client -showcerts -connect mqtt.eclipseprojects.io:8883 /dev/null|openssl x509 -outform PEM >mqtt_eclipse_org.pem`` - Check the sample application: ``examples/mqtt_ssl`` - Configuration: .. code:: c const esp_mqtt_client_config_t mqtt_cfg = { - .uri = "mqtts://mqtt.eclipse.org:8883", + .uri = "mqtts://mqtt.eclipseprojects.io:8883", .event_handle = mqtt_event_handler, .cert_pem = (const char *)mqtt_eclipse_org_pem_start, }; From 9eba0ff6a61931a932e38e5fcbe63ca8338e6008 Mon Sep 17 00:00:00 2001 From: yuanjm Date: Tue, 23 Feb 2021 15:30:29 +0800 Subject: [PATCH 3/3] tools: Update mqtt open source test server address --- .../mqtt/publish_connect_test/main/Kconfig.projbuild | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test_apps/protocols/mqtt/publish_connect_test/main/Kconfig.projbuild b/tools/test_apps/protocols/mqtt/publish_connect_test/main/Kconfig.projbuild index 874db25c4b..f2c38432d0 100644 --- a/tools/test_apps/protocols/mqtt/publish_connect_test/main/Kconfig.projbuild +++ b/tools/test_apps/protocols/mqtt/publish_connect_test/main/Kconfig.projbuild @@ -2,25 +2,25 @@ menu "Example Configuration" config EXAMPLE_BROKER_SSL_URI string "Broker SSL URL" - default "mqtts://mqtt.eclipse.org:8883" + default "mqtts://mqtt.eclipseprojects.io:8883" help URL of an mqtt broker for ssl transport config EXAMPLE_BROKER_TCP_URI string "Broker TCP URL" - default "mqtt://mqtt.eclipse.org:1883" + default "mqtt://mqtt.eclipseprojects.io:1883" help URL of an mqtt broker for tcp transport config EXAMPLE_BROKER_WS_URI string "Broker WS URL" - default "ws://mqtt.eclipse.org:80/mqtt" + default "ws://mqtt.eclipseprojects.io:80/mqtt" help URL of an mqtt broker for ws transport config EXAMPLE_BROKER_WSS_URI string "Broker WSS URL" - default "wss://mqtt.eclipse.org:443/mqtt" + default "wss://mqtt.eclipseprojects.io:443/mqtt" help URL of an mqtt broker for wss transport