diff --git a/docs/API_reference/en/networklib/ftp.md b/docs/API_reference/en/networklib/ftp.md index 07f2e3f62630bb9990e8b776d0f2ab0158d7a849..a5d240fead08bf41aa6703a067517dbdd81010ca 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](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 ### `ftplib.FTP` diff --git a/docs/API_reference/en/networklib/umqtt.md b/docs/API_reference/en/networklib/umqtt.md index 9439f30185aafffeeefa2eb29d7d5861debcb379..5fd82eb7d7d1fc2d510aaa6ac8065de54660d81f 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](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 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 c70f725df33be7da1830257b09f921a444bdca1a..37e957103b2969887cb7f76475d0c68806a131d7 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](https://github.com/QuecPython/ftplib),放默认目录/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 00a6b029470667edcbf8fb99078a175ec92517d2..673a90742dfaa6bf5f6cc233996ff9f4e9b30250 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](https://github.com/QuecPython/umqtt),放默认目录/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 支持,布尔值类型。