Skip to content

Commit

Permalink
Merge branch 'docs/add_sslpskhex_doc' into 'master'
Browse files Browse the repository at this point in the history
docs: Added AT+CIPSSLCPSKHEX docs

See merge request application/esp-at!1483
  • Loading branch information
xcguang committed Dec 20, 2023
2 parents a02beac + b84138b commit 49c8376
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 8 deletions.
29 changes: 25 additions & 4 deletions docs/en/AT_Command_Set/TCP-IP_AT_Commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ TCP/IP AT Commands
- :ref:`AT+CIPSSLCCN <cmd-SSLCCN>`: Query/Set the Common Name of the SSL client.
- :ref:`AT+CIPSSLCSNI <cmd-SSLCSNI>`: Query/Set SSL client Server Name Indication (SNI).
- :ref:`AT+CIPSSLCALPN <cmd-SSLCALPN>`: Query/Set SSL client Application Layer Protocol Negotiation (ALPN).
- :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>`: Query/Set SSL client Pre-shared Key (PSK).
- :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>`: Query/Set SSL client Pre-shared Key (PSK) in string format.
- :ref:`AT+CIPSSLCPSKHEX <cmd-SSLCPSKHEX>`: Query/Set SSL client Pre-shared Key (PSK) in hexadecimal format.
- :ref:`AT+CIPRECONNINTV <cmd-AUTOCONNINT>`: Query/Set the TCP/UDP/SSL reconnection interval for the Wi-Fi :term:`normal transmission mode`.
- :ref:`AT+CIPRECVTYPE <cmd-CIPRECVTYPE>`: Query/Set socket receiving mode.
- :ref:`AT+CIPRECVDATA <cmd-CIPRECVDATA>`: Obtain socket data in passive receiving mode.
Expand Down Expand Up @@ -1961,8 +1962,8 @@ Note

.. _cmd-SSLCPSK:

:ref:`AT+CIPSSLCPSK <TCPIP-AT>`: Query/Set SSL Client Pre-shared Key (PSK)
--------------------------------------------------------------------------
:ref:`AT+CIPSSLCPSK <TCPIP-AT>`: Query/Set SSL Client Pre-shared Key (PSK) in String Format
-------------------------------------------------------------------------------------------

Query Command
^^^^^^^^^^^^^
Expand Down Expand Up @@ -2007,13 +2008,33 @@ Parameters
^^^^^^^^^^

- **<link ID>**: ID of the connection (0 ~ max). For single connection, <link ID> is 0. For multiple connections, if the value is max, it means all connections, max is 5 by default.
- **<"psk">**: PSK identity. Maximum length: 32.
- **<"psk">**: PSK identity in string format. Maximum length: 32. Please use :ref:`AT+CIPSSLCPSKHEX <cmd-SSLCPSKHEX>` command if your ``<"psk">`` parameter contains ``\0`` characters.
- **<"hint">**: PSK hint. Maximum length: 32.

Notes
^^^^^
- If you want this configuration to take effect immediately, run this command before establishing the SSL connection.

.. _cmd-SSLCPSKHEX:

:ref:`AT+CIPSSLCPSKHEX <TCPIP-AT>`: Query/Set SSL Client Pre-shared Key (PSK) in Hexadecimal Format
---------------------------------------------------------------------------------------------------

Note
^^^^^
- Similar to the :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>` command, this command also sets or queries the SSL Client PSK, but its ``<"psk">`` is in hexadecimal format rather than in string format. So, ``\0`` in the ``<"psk">`` parameter means ``00``.

Example
^^^^^^^^

::

// Single connection: (AT+CIPMUX=0), PSK identity is "psk", PSK hint is "myhint".
AT+CIPSSLCPSKHEX="70736b","myhint"

// Multiple connections: (AT+CIPMUX=1), PSK identity is "psk", PSK hint is "myhint".
AT+CIPSSLCPSKHEX=0,"70736b","myhint"

.. _cmd-AUTOCONNINT:

:ref:`AT+CIPRECONNINTV <TCPIP-AT>`: Query/Set the TCP/UDP/SSL reconnection Interval for the Wi-Fi :term:`Passthrough Mode`
Expand Down
29 changes: 25 additions & 4 deletions docs/zh_CN/AT_Command_Set/TCP-IP_AT_Commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ TCP/IP AT 命令
- :ref:`AT+CIPSSLCCN <cmd-SSLCCN>`:查询/设置 SSL 客户端的公用名 (common name)
- :ref:`AT+CIPSSLCSNI <cmd-SSLCSNI>`:查询/设置 SSL 客户端的 SNI
- :ref:`AT+CIPSSLCALPN <cmd-SSLCALPN>`:查询/设置 SSL 客户端 ALPN
- :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>`:查询/设置 SSL 客户端的 PSK
- :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>`:查询/设置 SSL 客户端的 PSK (字符串格式)
- :ref:`AT+CIPSSLCPSKHEX <cmd-SSLCPSKHEX>`:查询/设置 SSL 客户端的 PSK (十六进制格式)
- :ref:`AT+CIPRECONNINTV <cmd-AUTOCONNINT>`:查询/设置 Wi-Fi :term:`透传模式` 下的 TCP/UDP/SSL 重连间隔
- :ref:`AT+CIPRECVTYPE <cmd-CIPRECVTYPE>`:查询/设置套接字接收模式
- :ref:`AT+CIPRECVDATA <cmd-CIPRECVDATA>`:获取被动接收模式下的套接字数据
Expand Down Expand Up @@ -1961,7 +1962,7 @@ ESP-AT 在运行时,通过 Wi-Fi 从指定的服务器上下载新固件到某

.. _cmd-SSLCPSK:

:ref:`AT+CIPSSLCPSK <TCPIP-AT>`:查询/设置 SSL 客户端的 PSK
:ref:`AT+CIPSSLCPSK <TCPIP-AT>`:查询/设置 SSL 客户端的 PSK (字符串格式)
---------------------------------------------------------------------------

查询命令
Expand Down Expand Up @@ -2007,13 +2008,33 @@ ESP-AT 在运行时,通过 Wi-Fi 从指定的服务器上下载新固件到某
^^^^

- **<link ID>**:网络连接 ID (0 ~ max),在单连接的情况下,本参数值为 0;在多连接的情况下,若参数值设为 max,则表示所有连接;本参数默认值为 5。
- **<"psk">**:PSK identity,最大长度:32。
- **<"psk">**:PSK identity (字符串格式),最大长度:32。如果您的 ``<"psk">`` 参数包含 ``\0``,请使用 :ref:`AT+CIPSSLCPSKHEX <cmd-SSLCPSKHEX>` 命令
- **<"hint">**:PSK hint,最大长度:32。

说明
^^^^
- 如果想要本配置立即生效,请在建立 SSL 连接前运行本命令。

.. _cmd-SSLCPSKHEX:

:ref:`AT+CIPSSLCPSKHEX <TCPIP-AT>`:查询/设置 SSL 客户端的 PSK (十六进制格式)
-----------------------------------------------------------------------------------------

说明
^^^^
- 类似于 :ref:`AT+CIPSSLCPSK <cmd-SSLCPSK>` 命令,该命令也用于设置或查询 SSL 客户端的预共享密钥(PSK),但其 ``<"psk">`` 参数使用十六进制格式而不是字符串格式。因此, ``<"psk">`` 参数中的 ``\0`` 表示为 ``00``。

示例
^^^^

::

// 单连接:(AT+CIPMUX=0), PSK identity 为 "psk",PSK hint 为 "myhint"
AT+CIPSSLCPSKHEX="70736b","myhint"

// 多连接:(AT+CIPMUX=1), PSK identity 为 "psk",PSK hint 为 "myhint"
AT+CIPSSLCPSKHEX=0,"70736b","myhint"

.. _cmd-AUTOCONNINT:

:ref:`AT+CIPRECONNINTV <TCPIP-AT>`:查询/设置 Wi-Fi :term:`透传模式` 下的 TCP/UDP/SSL 重连间隔
Expand Down Expand Up @@ -2073,7 +2094,7 @@ ESP-AT 在运行时,通过 Wi-Fi 从指定的服务器上下载新固件到某

::

AT+CIPRECONNINTV=10
AT+CIPRECONNINTV=10

.. _cmd-CIPRECVTYPE:

Expand Down

0 comments on commit 49c8376

Please sign in to comment.