Merge branch 'feature/update_mqtt_test_url_v4.3' into 'release/v4.3'

mqtt: Update mqtt test url and doc(backport v4.3)

See merge request espressif/esp-idf!16415
This commit is contained in:
David Čermák 2022-01-17 08:36:16 +00:00
commit 8a5c51d05b
11 changed files with 31 additions and 31 deletions

View File

@ -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 2>/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 2>/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,
};

View File

@ -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);

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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