From 9e4ee04cc5f1458b5f43637aef3db5adcd4afa04 Mon Sep 17 00:00:00 2001 From: "xjin.gao@quectel.com" Date: Thu, 19 Dec 2024 17:31:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20(umqtt&FTP):=20=E4=BF=AE=E6=94=B9u?= =?UTF-8?q?mqtt&FTP=E6=96=87=E6=A1=A3=E9=83=A8=E5=88=86=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 固件版本: N/A 是否需要文案翻译: 否 --- docs/API_reference/en/networklib/ftp.md | 2 ++ docs/API_reference/en/networklib/umqtt.md | 6 ++++-- docs/API_reference/zh/networklib/ftp.md | 2 ++ docs/API_reference/zh/networklib/umqtt.md | 6 ++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/API_reference/en/networklib/ftp.md b/docs/API_reference/en/networklib/ftp.md index 07f2e3f6..214bdcc7 100644 --- a/docs/API_reference/en/networklib/ftp.md +++ b/docs/API_reference/en/networklib/ftp.md @@ -2,6 +2,8 @@ FTP (File Transfer Protocol) is a standard protocol for transferring files over a computer network. It is based on a client-server model and uses control and data connections to enable file upload, download, and management operations. +> ftplib is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code ftplib.py and put it in the default directory /usr. When using it, change from ftplib import FTP to from usr.ftplib import FTP. + ## Constructor ### `ftplib.FTP` diff --git a/docs/API_reference/en/networklib/umqtt.md b/docs/API_reference/en/networklib/umqtt.md index 9439f301..6bc18ea5 100644 --- a/docs/API_reference/en/networklib/umqtt.md +++ b/docs/API_reference/en/networklib/umqtt.md @@ -2,6 +2,8 @@ This feature is used to create MQTT clients to publish and subscribe to topics. +> umqtt is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code umqtt.py and put it in the default directory /usr. When using it, change from umqtt import MQTTClient to from usr.umqtt import MQTTClient. + ``` QoS Level Description In MQTT protocol, three levels of QoS are defined. @@ -15,7 +17,7 @@ QoS2 – Only once. Highest level. The message is guaranteed to be received by t ### `MQTTClient` ```python -MQTTClient(client_id, server, port=0, user=None, password=None, keepalive=0, ssl=False, ssl_params={},reconn=True,version=4) +MQTTClient(client_id, server, port=0, user=None, password=None, keepalive=60, ssl=False, ssl_params={},reconn=True,version=4) ``` Creates MQTT clients. @@ -29,7 +31,7 @@ Creates MQTT clients. | port | Integer | Server port (optional). Default value: 1883. The default port of MQTT over SSL/TLS is 8883. | | user | String | Username registered on the server (optional). | | password | String | Password registered on the server (optional). | -| keepalive | Integer | Timeout of keep-alive (optional). Default value: 0. Unit: s. | +| keepalive | Integer | Timeout of keep-alive (optional). Default value: 60. Unit: s. | | ssl | bool | Enable or disable SSL/TSL encryption. | | ssl_params | String | SSL/TLS parameter (optional). | | reconn | bool | Enable or disable the internal reconnection mechanism (optional). Default value: True (enable). | diff --git a/docs/API_reference/zh/networklib/ftp.md b/docs/API_reference/zh/networklib/ftp.md index c70f725d..84d01009 100644 --- a/docs/API_reference/zh/networklib/ftp.md +++ b/docs/API_reference/zh/networklib/ftp.md @@ -2,6 +2,8 @@ FTP(File Transfer Protocol)是一种用于在计算机网络中传输文件的标准协议,它基于客户端-服务器模型,通过控制连接和数据连接实现文件的上传、下载和管理操作。 +> ftplib是python源码实现,如对应固件版本未默认支持。用户可使用源码ftplib.py,放默认目录/usr下,使用时,将from ftplib import FTP 改为from usr.ftplib import FTP. + ## 构造函数 ### `ftplib.FTP` diff --git a/docs/API_reference/zh/networklib/umqtt.md b/docs/API_reference/zh/networklib/umqtt.md index 00a6b029..1594a485 100644 --- a/docs/API_reference/zh/networklib/umqtt.md +++ b/docs/API_reference/zh/networklib/umqtt.md @@ -2,6 +2,8 @@ 模块功能:提供创建MQTT客户端发布订阅功能。 +> umqtt 是python源码实现,如对应固件版本未默认支持。用户可使用源码 umqtt.py,放默认目录/usr下,使用时,将from umqtt import MQTTClient 改为from usr.umqtt import MQTTClient. + ``` QoS级别说明 在MQTT协议中,定义了三个级别的QoS,分别是: @@ -15,7 +17,7 @@ QoS2 – 有且仅有一次,是最高级别;保证消息送达且仅送达 ### `umqtt.MQTTClient` ```python -class umqtt.MQTTClient(client_id, server, port=0, user=None, password=None, keepalive=0, ssl=False, ssl_params={},reconn=True,version=4) +class umqtt.MQTTClient(client_id, server, port=0, user=None, password=None, keepalive=60, ssl=False, ssl_params={},reconn=True,version=4) ``` 构建mqtt连接对象。 @@ -32,7 +34,7 @@ class umqtt.MQTTClient(client_id, server, port=0, user=None, password=None, keep * `password` - (可选) 在服务器上注册的密码,字符串类型。 -* `keepalive` - (可选)客户端的keepalive超时值,整数类型,默认为0。 +* `keepalive` - (可选)客户端的keepalive超时值,整数类型,默认为60。 * `ssl` - (可选)是否使能 SSL/TLS 支持,布尔值类型。 -- Gitee From b04e3247e8ac18b833b6f646687633adaf22b3ec Mon Sep 17 00:00:00 2001 From: "xjin.gao@quectel.com" Date: Mon, 23 Dec 2024 16:54:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=20(umqtt&ftp):=20=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=BA=90=E7=A0=81?= =?UTF-8?q?github=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 固件版本: N 是否需要文案翻译: 否 --- docs/API_reference/en/networklib/ftp.md | 2 +- docs/API_reference/en/networklib/umqtt.md | 2 +- docs/API_reference/zh/networklib/ftp.md | 2 +- docs/API_reference/zh/networklib/umqtt.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/API_reference/en/networklib/ftp.md b/docs/API_reference/en/networklib/ftp.md index 214bdcc7..a5d240fe 100644 --- a/docs/API_reference/en/networklib/ftp.md +++ b/docs/API_reference/en/networklib/ftp.md @@ -2,7 +2,7 @@ FTP (File Transfer Protocol) is a standard protocol for transferring files over a computer network. It is based on a client-server model and uses control and data connections to enable file upload, download, and management operations. -> ftplib is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code ftplib.py and put it in the default directory /usr. When using it, change from ftplib import FTP to from usr.ftplib import FTP. +> ftplib is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code [ftplib.py](https://github.com/QuecPython/ftplib) and put it in the default directory /usr. When using it, change from ftplib import FTP to from usr.ftplib import FTP. ## Constructor diff --git a/docs/API_reference/en/networklib/umqtt.md b/docs/API_reference/en/networklib/umqtt.md index 6bc18ea5..5fd82eb7 100644 --- a/docs/API_reference/en/networklib/umqtt.md +++ b/docs/API_reference/en/networklib/umqtt.md @@ -2,7 +2,7 @@ This feature is used to create MQTT clients to publish and subscribe to topics. -> umqtt is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code umqtt.py and put it in the default directory /usr. When using it, change from umqtt import MQTTClient to from usr.umqtt import MQTTClient. +> umqtt is implemented in Python source code. If the corresponding firmware version does not support it by default, users can use the source code [umqtt.py](https://github.com/QuecPython/umqtt) and put it in the default directory /usr. When using it, change from umqtt import MQTTClient to from usr.umqtt import MQTTClient. ``` QoS Level Description diff --git a/docs/API_reference/zh/networklib/ftp.md b/docs/API_reference/zh/networklib/ftp.md index 84d01009..37e95710 100644 --- a/docs/API_reference/zh/networklib/ftp.md +++ b/docs/API_reference/zh/networklib/ftp.md @@ -2,7 +2,7 @@ FTP(File Transfer Protocol)是一种用于在计算机网络中传输文件的标准协议,它基于客户端-服务器模型,通过控制连接和数据连接实现文件的上传、下载和管理操作。 -> ftplib是python源码实现,如对应固件版本未默认支持。用户可使用源码ftplib.py,放默认目录/usr下,使用时,将from ftplib import FTP 改为from usr.ftplib import FTP. +> ftplib是python源码实现,如对应固件版本未默认支持。用户可使用源码[ftplib.py](https://github.com/QuecPython/ftplib),放默认目录/usr下,使用时,将from ftplib import FTP 改为from usr.ftplib import FTP. ## 构造函数 diff --git a/docs/API_reference/zh/networklib/umqtt.md b/docs/API_reference/zh/networklib/umqtt.md index 1594a485..673a9074 100644 --- a/docs/API_reference/zh/networklib/umqtt.md +++ b/docs/API_reference/zh/networklib/umqtt.md @@ -2,7 +2,7 @@ 模块功能:提供创建MQTT客户端发布订阅功能。 -> umqtt 是python源码实现,如对应固件版本未默认支持。用户可使用源码 umqtt.py,放默认目录/usr下,使用时,将from umqtt import MQTTClient 改为from usr.umqtt import MQTTClient. +> umqtt 是python源码实现,如对应固件版本未默认支持。用户可使用源码 [umqtt.py](https://github.com/QuecPython/umqtt),放默认目录/usr下,使用时,将from umqtt import MQTTClient 改为from usr.umqtt import MQTTClient. ``` QoS级别说明 -- Gitee