You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added AT+CWBANDMODE command
- Added AT+CIPCONNPERSIST command
- Updated the wifi protocol for AT+CWSTAPROTO and AT+CWAPPROTO command
- Updated the wifi bandwidth for AT+CWBANDWIDTH command
- Removed the length limit of AT+CIPSSLCCN and AT+CIPSSLCSNI command
- Added 5g channel support for AT+CWCOUNTRY, AT+CWLAP commands
- Added some notes for AT+CWAUTOCONN, AT+CWRECONNCFFG commands
- Added some messages report and log output description
- Added the multiple ip support on AT+CIPDOMAIN command
- Added timeout parameter for AT+MQTTCONN, AT+MQTTSUB, AT+MQTTUNSUB, AT+MQTTPUB, AT+MQTTPUBRAW commands
- Added tcp/ssl server passthrough support for AT+CWSAVETRANSLINK command
- Fixed a few small mistakes in the docs
- Closes ESPAT-2485
- Closes https://esp32.com/viewtopic.php?p=151657#p151657
- 0: {IDF_TARGET_NAME} will NOT enter Wi-Fi:term:`Passthrough Mode` on power-up.
336
-
- 1: {IDF_TARGET_NAME} will enter Wi-Fi:term:`Passthrough Mode` on power-up.
336
+
- 0: {IDF_TARGET_NAME} will NOT enter TCP/SSL client:term:`Passthrough Mode` on power-up.
337
+
- 1: {IDF_TARGET_NAME} will enter TCP/SSL client:term:`Passthrough Mode` on power-up.
337
338
338
339
- **<"remote host">**: IPv4 address, IPv6 address, or domain name of remote host. The maximum length is 64 bytes.
339
340
- **<remote port>**: the remote port number.
@@ -350,7 +351,7 @@ Parameters
350
351
Notes
351
352
"""""""
352
353
353
-
- This command will save the Wi-Fi :term:`Passthrough Mode` configuration in the NVS partition. If ``<mode>`` is set to 1, {IDF_TARGET_NAME} will enter the Wi-Fi:term:`Passthrough Mode` in the next power on. The configuration will take effect after {IDF_TARGET_NAME} reboots.
354
+
- This command will save the :term:`Passthrough Mode` configuration in the NVS partition. If ``<mode>`` is set to 1, {IDF_TARGET_NAME} will enter the :term:`Passthrough Mode` in the next power on. The configuration will take effect after {IDF_TARGET_NAME} reboots.
- 0: {IDF_TARGET_NAME} will NOT enter TCP/SSL server :term:`Passthrough Mode` on power-up.
392
+
- 3: {IDF_TARGET_NAME} will enter TCP/SSL server :term:`Passthrough Mode` on power-up.
393
+
394
+
- **[<port>]**: The port that the server listens to. Default: 333.
395
+
- **<"type">**: Server type: "TCP", "TCPv6", "SSL", or "SSLv6". Default: "TCP".
396
+
- **<CA enable>**: This parameter is only valid when ``<type>`` is "SSL" or "SSLv6".
397
+
398
+
- 0: Do not use CA certificate.
399
+
- 1: Use CA certificate.
400
+
401
+
- **<netif>**: Specifies the network interface for the server to listen on. Default: 0.
402
+
403
+
.. list::
404
+
405
+
- 0: All network interfaces
406
+
- 1: Wi-Fi Station interface
407
+
- 2: Wi-Fi SoftAP interface
408
+
:esp32: - 3: Ethernet interface
409
+
410
+
Notes
411
+
"""""""
412
+
413
+
- This command will save the :term:`Passthrough Mode` configuration in the NVS partition. If ``<mode>`` is set to 1, {IDF_TARGET_NAME} will enter the :term:`Passthrough Mode` in the next power on. The configuration will take effect after {IDF_TARGET_NAME} reboots.
414
+
- When {IDF_TARGET_NAME} works as a Wi-Fi Station, please configure the Wi-Fi connection information in advance and enable the reconnection mechanism; when it works as a SoftAP, please configure the SoftAP parameters in advance to ensure it can work normally after power-on.
415
+
- In the TCP/SSL server passthrough mode, only a single passthrough connection is supported: once a client establishes a passthrough connection, the server will enter passthrough mode and reject subsequent passthrough connection requests.
416
+
- When the underlying network interface (netif) is stopped or disconnected, existing connections will be closed, and the server will return to listening state, ready to accept new normal connections.
417
+
- After exiting passthrough mode, the TCP/SSL server will continue running, but in normal (non-passthrough) mode with a maximum of 1 concurrent connection.
418
+
419
+
Example
420
+
"""""""""
421
+
422
+
::
423
+
424
+
// Set Wi-Fi SoftAP information, SSID is esp-ap-001, no password, channel 11, open encryption, maximum 3 connections
425
+
AT+CWSAP="esp-ap-001","",11,0,3
426
+
427
+
// Set to enter TCP server passthrough mode on power-up, listening on port 1002
428
+
AT+SAVETRANSLINK=3,1002,"TCP",2
429
+
430
+
// PC connects to esp-ap-001 and uses a TCP client tool to connect to {IDF_TARGET_NAME}'s port 1002
431
+
nc 192.168.4.1 1002
432
+
433
+
// Transmit data in passthrough mode
434
+
365
435
.. _savetrans-udp:
366
436
367
437
Set Whether to Enter UDP :term:`Passthrough Mode` on Power-up
@@ -387,18 +457,18 @@ Parameters
387
457
388
458
- **<mode>**:
389
459
390
-
- 0: {IDF_TARGET_NAME} will NOT enter Wi-Fi:term:`Passthrough Mode` on power-up.
391
-
- 1: {IDF_TARGET_NAME} will enter Wi-Fi:term:`Passthrough Mode` on power-up.
460
+
- 0: {IDF_TARGET_NAME} will NOT enter UDP:term:`Passthrough Mode` on power-up.
461
+
- 1: {IDF_TARGET_NAME} will enter UDP:term:`Passthrough Mode` on power-up.
392
462
393
463
- **<"remote host">**: IPv4 address, IPv6 address, or domain name of remote host. The maximum length is 64 bytes.
394
464
- **<remote port>**: the remote port number.
395
465
- **<"type">**: string parameter showing the type of transmission: "UDP" or "UDPv6". Default: "TCP".
396
-
- **<local port>**: local port when UDP Wi-Fi passthrough is enabled on power-up.
466
+
- **<local port>**: local port when UDP passthrough is enabled on power-up.
397
467
398
468
Notes
399
469
"""""""
400
470
401
-
- This command will save the Wi-Fi :term:`Passthrough Mode` configuration in the NVS partition. If ``<mode>`` is set to 1, {IDF_TARGET_NAME} will enter the Wi-Fi:term:`Passthrough Mode` in the next power on. The configuration will take effect after {IDF_TARGET_NAME} reboots.
471
+
- This command will save the :term:`Passthrough Mode` configuration in the NVS partition. If ``<mode>`` is set to 1, {IDF_TARGET_NAME} will enter the :term:`Passthrough Mode` in the next power on. The configuration will take effect after {IDF_TARGET_NAME} reboots.
402
472
403
473
- To establish an UDP transmission based on an IPv6 network, do as follows:
Copy file name to clipboardExpand all lines: docs/en/AT_Command_Set/MQTT_AT_Commands.rst
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,12 @@ Introduction
28
28
------------
29
29
30
30
.. important::
31
-
The default AT firmware supports all the AT commands mentioned on this page. If you don't need {IDF_TARGET_NAME} to support MQTT commands, you can compile the ESP-AT project by following the steps in :doc:`Compile ESP-AT Project Locally <../Compile_and_Develop/How_to_clone_project_and_compile_it>` documentation. In the project configuration during the fifth step, make the following selections:
31
+
- The default AT firmware supports all the AT commands mentioned on this page. If you don't need {IDF_TARGET_NAME} to support MQTT commands, you can compile the ESP-AT project by following the steps in :doc:`Compile ESP-AT Project Locally <../Compile_and_Develop/How_to_clone_project_and_compile_it>` documentation. In the project configuration during the fifth step, make the following selections:
- 0: MQTT will not reconnect automatically. If MQTT connection established and then disconnected, you cannot use this command to reestablish MQTT connection. Please send :ref:`AT+MQTTCLEAN=0 <cmd-MQTTCLEAN>` command to clean MQTT connection first, reconfigure the connection parameters, and then establish a new MQTT connection.
429
432
- 1: MQTT will reconnect automatically. It takes more resources.
430
433
434
+
- **<timeout_ms>**: timeout for the command. Unit: milliseconds. Range: [3000,60000]. Default: 15000 milliseconds.
431
435
- **<state>**: MQTT state.
432
436
433
437
- 0: MQTT uninitialized.
@@ -467,7 +471,7 @@ Publish MQTT messages in string to a defined topic. If the amount of data you pu
- **<timeout_ms>**: timeout for the command. Unit: milliseconds. Range: [3000,60000]. Default: 15000 milliseconds.
629
636
630
637
Note
631
638
^^^^
@@ -652,7 +659,7 @@ Unsubscribe the client from defined topics. This command can be called multiple
652
659
653
660
::
654
661
655
-
AT+MQTTUNSUB=<LinkID>,<"topic">
662
+
AT+MQTTUNSUB=<LinkID>,<"topic">[,<timeout_ms>]
656
663
657
664
658
665
**Response:**
@@ -674,6 +681,7 @@ Parameters
674
681
675
682
- **<LinkID>**: only supports link ID 0 currently.
676
683
- **<"topic">**: MQTT topic. Maximum length: 128 bytes.
684
+
- **<timeout_ms>**: timeout for the command. Unit: milliseconds. Range: [3000,60000]. Default: 15000 milliseconds.
677
685
678
686
.. _cmd-MQTTCLEAN:
679
687
@@ -691,7 +699,7 @@ Close the MQTT connection and release the resource.
691
699
692
700
::
693
701
694
-
AT+MQTTCLEAN=<LinkID>
702
+
AT+MQTTCLEAN=<LinkID>
695
703
696
704
**Response:**
697
705
@@ -887,7 +895,5 @@ The MQTT Error code will be prompted as ``ERR CODE:0x<%08x>``.
887
895
:ref:`MQTT AT Notes <MQTT-AT>`
888
896
-------------------------------
889
897
890
-
- In general, AT MQTT commands responds within 10 s, except the command :ref:`AT+MQTTCONN <cmd-MQTTCONN>`. For example, if the router fails to access the Internet, the command :ref:`AT+MQTTPUB <cmd-MQTTPUB>` will respond within 10 s. But the command :ref:`AT+MQTTCONN <cmd-MQTTCONN>` may need more time due to packet retransmission in a bad network environment.
891
-
- If the :ref:`AT+MQTTCONN <cmd-MQTTCONN>` is based on a TLS connection, the timeout of each packet is 10 s, and the total timeout will be much longer depending on the handshake packets count.
892
898
- When the MQTT connection ends, it will prompt the message ``+MQTTDISCONNECTED:<LinkID>``.
893
899
- When the MQTT connection established, it will prompt the message ``+MQTTCONNECTED:<LinkID>,<scheme>,<"host">,port,<"path">,<reconnect>``.
0 commit comments