From b305a75af9c9fefbe53957f372333fdf4a319c5d Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Mon, 12 Aug 2024 07:15:35 +0000 Subject: [PATCH 01/20] update docs/API_reference/en/peripherals/misc.USBNET.md. Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/peripherals/misc.USBNET.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/API_reference/en/peripherals/misc.USBNET.md b/docs/API_reference/en/peripherals/misc.USBNET.md index ce943fb4..78bfe4d8 100644 --- a/docs/API_reference/en/peripherals/misc.USBNET.md +++ b/docs/API_reference/en/peripherals/misc.USBNET.md @@ -106,9 +106,11 @@ USBNET.open() USBNET.getNat(simid, pid) ``` -Gets NAT enabling status of a specified network card (whether IPv6 dial-up is supported). +Gets NAT enabling status of a specified network card. -> Note: Only EC200U and EC600U series modules support this function. +> Note: Currently only EC200U/EC600U/EC800G series support. +> Note: If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. +> Note: If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. **Parameter:** @@ -117,7 +119,7 @@ Gets NAT enabling status of a specified network card (whether IPv6 dial-up is su **Return Value:** -If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: Enable and IPv6 dial-up is supported. `1`: Disable and IPv6 dial-up is not supported. +If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: The NAT mode is not enabled. `1`: The NAT mode was enabled. If failed, it returns integer `-1`. @@ -137,15 +139,17 @@ USBNET.getNat(0, 1) USBNET.setNat(simid, pid, nat) ``` -Sets NAT. After NAT is set successfully, the configuration takes effect after the module is rebooted. The nat value changes to 1 when you call *USBNET.set_worktype()*, in which case `pid` cannot perform IPv6 dial-up, thus this function can be called to disable NAT to turn IPv6 dial-up back to normal after USBNET is disabled. +Sets NAT. After the NAT configuration is successful, restart the module and the configuration takes effect. When usbnet.set_worktype () is called, the nat value changes to 1, and NAT mode is enabled for this pid. Therefore, after USBnet is closed, you can call this interface to disable NAT mode and restore the dialing function of this pid. -> Note: Only EC200U and EC600U series modules support this function. +> Note: Currently only EC200U/EC600U/EC800G series support. +> Note: If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. +> Note: If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. **Parameter:** - `simid` - Integer type. Range: 0 and 1. Currently only `0` is supported. - `pid` - Integer type. PDP index. Range: `1-7`. -- `Nat` - Integer type. Range: 0 and 1. `0`: IPv6 dial-up is supported; `1`: IPv6 dial-up is not supported. +- `Nat` - Integer type. Range: 0 and 1. `0`: The NAT mode is not enabled. `1`: The NAT mode was enabled. **Return Value:** -- Gitee From 22f68425c264e00e865db586dce4e522021b0d8f Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Mon, 12 Aug 2024 07:20:30 +0000 Subject: [PATCH 02/20] Revert "update docs/API_reference/en/peripherals/misc.USBNET.md." This reverts commit b305a75af9c9fefbe53957f372333fdf4a319c5d. --- docs/API_reference/en/peripherals/misc.USBNET.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/API_reference/en/peripherals/misc.USBNET.md b/docs/API_reference/en/peripherals/misc.USBNET.md index 78bfe4d8..ce943fb4 100644 --- a/docs/API_reference/en/peripherals/misc.USBNET.md +++ b/docs/API_reference/en/peripherals/misc.USBNET.md @@ -106,11 +106,9 @@ USBNET.open() USBNET.getNat(simid, pid) ``` -Gets NAT enabling status of a specified network card. +Gets NAT enabling status of a specified network card (whether IPv6 dial-up is supported). -> Note: Currently only EC200U/EC600U/EC800G series support. -> Note: If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. -> Note: If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. +> Note: Only EC200U and EC600U series modules support this function. **Parameter:** @@ -119,7 +117,7 @@ Gets NAT enabling status of a specified network card. **Return Value:** -If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: The NAT mode is not enabled. `1`: The NAT mode was enabled. +If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: Enable and IPv6 dial-up is supported. `1`: Disable and IPv6 dial-up is not supported. If failed, it returns integer `-1`. @@ -139,17 +137,15 @@ USBNET.getNat(0, 1) USBNET.setNat(simid, pid, nat) ``` -Sets NAT. After the NAT configuration is successful, restart the module and the configuration takes effect. When usbnet.set_worktype () is called, the nat value changes to 1, and NAT mode is enabled for this pid. Therefore, after USBnet is closed, you can call this interface to disable NAT mode and restore the dialing function of this pid. +Sets NAT. After NAT is set successfully, the configuration takes effect after the module is rebooted. The nat value changes to 1 when you call *USBNET.set_worktype()*, in which case `pid` cannot perform IPv6 dial-up, thus this function can be called to disable NAT to turn IPv6 dial-up back to normal after USBNET is disabled. -> Note: Currently only EC200U/EC600U/EC800G series support. -> Note: If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. -> Note: If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. +> Note: Only EC200U and EC600U series modules support this function. **Parameter:** - `simid` - Integer type. Range: 0 and 1. Currently only `0` is supported. - `pid` - Integer type. PDP index. Range: `1-7`. -- `Nat` - Integer type. Range: 0 and 1. `0`: The NAT mode is not enabled. `1`: The NAT mode was enabled. +- `Nat` - Integer type. Range: 0 and 1. `0`: IPv6 dial-up is supported; `1`: IPv6 dial-up is not supported. **Return Value:** -- Gitee From 3787185c99d3481489f25bf12364049c11977819 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Mon, 12 Aug 2024 07:28:17 +0000 Subject: [PATCH 03/20] update docs/API_reference/en/peripherals/misc.USBNET.md. Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/peripherals/misc.USBNET.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/API_reference/en/peripherals/misc.USBNET.md b/docs/API_reference/en/peripherals/misc.USBNET.md index ce943fb4..9db9760c 100644 --- a/docs/API_reference/en/peripherals/misc.USBNET.md +++ b/docs/API_reference/en/peripherals/misc.USBNET.md @@ -106,9 +106,11 @@ USBNET.open() USBNET.getNat(simid, pid) ``` -Gets NAT enabling status of a specified network card (whether IPv6 dial-up is supported). +Gets NAT enabling status of a specified network card. -> Note: Only EC200U and EC600U series modules support this function. +> Note:Currently only EC200U/EC600U/EC800G series support. +> Note:If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. +> Note:If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. **Parameter:** @@ -117,7 +119,7 @@ Gets NAT enabling status of a specified network card (whether IPv6 dial-up is su **Return Value:** -If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: Enable and IPv6 dial-up is supported. `1`: Disable and IPv6 dial-up is not supported. +If successful, it returns NAT enable situation. Integer type: 0 and 1. `0`: The NAT mode is not enabled. `1`: The NAT mode is enabled. If failed, it returns integer `-1`. @@ -137,15 +139,17 @@ USBNET.getNat(0, 1) USBNET.setNat(simid, pid, nat) ``` -Sets NAT. After NAT is set successfully, the configuration takes effect after the module is rebooted. The nat value changes to 1 when you call *USBNET.set_worktype()*, in which case `pid` cannot perform IPv6 dial-up, thus this function can be called to disable NAT to turn IPv6 dial-up back to normal after USBNET is disabled. +Sets NAT. After the NAT configuration is successful, restart the module and the configuration takes effect. When usbnet.set_worktype () is called, the nat value changes to 1, and NAT mode is enabled for this pid. Therefore, after USBnet is closed, you can call this interface to disable NAT mode and restore the dialing function of this pid. -> Note: Only EC200U and EC600U series modules support this function. +> Note:Currently only EC200U/EC600U/EC800G series support. +> Note:If NAT mode is enabled for the EC200U/EC600U series, the pid of the enabled route cannot perform IPv6 dial-up. +> Note:If NAT mode is enabled for the EC800G series, both IPv4 and IPv6 Pids of the enabled pid cannot dial up. **Parameter:** - `simid` - Integer type. Range: 0 and 1. Currently only `0` is supported. - `pid` - Integer type. PDP index. Range: `1-7`. -- `Nat` - Integer type. Range: 0 and 1. `0`: IPv6 dial-up is supported; `1`: IPv6 dial-up is not supported. +- `Nat` - Integer type. Range: 0 and 1. `0`: The NAT mode is not enabled; `1`: The NAT mode is enabled. **Return Value:** -- Gitee From 31e867ec540e04cb90a117395701f5229d6d0bcf Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Fri, 23 Aug 2024 09:14:24 +0000 Subject: [PATCH 04/20] =?UTF-8?q?update=20docs/API=5Freference/zh/networkl?= =?UTF-8?q?ib/uwebsocket.md.=20=E6=AD=A4=E5=8D=8F=E8=AE=AE=E6=98=AF?= =?UTF-8?q?=E6=94=AF=E6=8C=81str/byte=E4=BC=A0=E8=BE=93=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/networklib/uwebsocket.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API_reference/zh/networklib/uwebsocket.md b/docs/API_reference/zh/networklib/uwebsocket.md index 30581f17..533cc713 100644 --- a/docs/API_reference/zh/networklib/uwebsocket.md +++ b/docs/API_reference/zh/networklib/uwebsocket.md @@ -29,7 +29,7 @@ ws_client.send(msg) ``` **参数描述:** -* `msg` - str类型, 需要发送的数据 +* `msg` - str/byte类型, 需要发送的数据 @@ -42,7 +42,7 @@ ws_client.recv() ``` **返回值描述:** -* `result `- str类型, recv接受返回的结果, 当接受空值或None的时候, 为连接被关闭 +* `result `- str/byte类型, recv接受返回的结果, 当接受空值或None的时候, 为连接被关闭 -- Gitee From 53d1cfdcb79f063bd3d1e3a7b70f60198e1864c1 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Fri, 23 Aug 2024 09:18:07 +0000 Subject: [PATCH 05/20] =?UTF-8?q?update=20docs/API=5Freference/en/networkl?= =?UTF-8?q?ib/uwebsocket.md.=20=E6=AD=A4=E5=8D=8F=E8=AE=AE=E6=98=AF?= =?UTF-8?q?=E6=94=AF=E6=8C=81str/byte=E4=BC=A0=E8=BE=93=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/networklib/uwebsocket.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API_reference/en/networklib/uwebsocket.md b/docs/API_reference/en/networklib/uwebsocket.md index 128c0f99..6a20ae98 100644 --- a/docs/API_reference/en/networklib/uwebsocket.md +++ b/docs/API_reference/en/networklib/uwebsocket.md @@ -29,7 +29,7 @@ ws_client.send(msg) ``` **Parameter** -* `msg` – String type. The data to be sent. +* `msg` – String/Byte type. The data to be sent. @@ -43,7 +43,7 @@ ws_client.recv() **Return Value** -* `result `– String type. The returned result. When this value is null or None, the connection is closed. +* `result `– String/Byte type. The returned result. When this value is null or None, the connection is closed. -- Gitee From 84af6f03b950e227fbba0e00ab6337cf6cfb6780 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Tue, 10 Sep 2024 06:43:56 +0000 Subject: [PATCH 06/20] =?UTF-8?q?update=20docs/API=5Freference/zh/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E6=9B=B4=E6=96=B0DM9051=E4=BB=A5?= =?UTF-8?q?=E5=A4=AA=E7=BD=91=E5=8D=A1=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 16a2091f..001bf5f2 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) +class ethernet.W5500(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) ``` 加载DM9051驱动,初始化DM9051以太网卡,并返回DM9051网卡对象。 @@ -22,6 +22,9 @@ class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin= - `gateway` - 以太网卡的网关地址,若值为空字符串'',表示将 `ip` 地址的最后一位替换成`1`作为网关。 - `spi_port` - 连接`DM9051`的[SPI端口](./machine.SPI.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `SPI1` 端口。 - `spi_cs_pin` - 连接`DM9051`的 `SPI` 片选[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `Pin.GPIO13`。 +- `extint_pin` - 连接`DM9051`的外部中断[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示上次配置的值,程序中默认配置为 `Pin.GPIO19`。 +- `reset_pin` - 连接`DM9051`的重置[GPIO管脚](./machine.Pin.md),默认值为`-1`, 表示上次配置的值,程序中默认配置为 `Pin.GPIO17`。 +- `work_mode` - 以太网工作模式配置,默认为终端模式,`0`/`1` 分别表示终端模式/网关模式。终端模式表示该模块作为终端设备连接供网设备上网。网关模式表示该模块作为网关,为外部设备提供网络访问,通过`4G`上网。 ## 方法 -- Gitee From 88dea72f3fd50afd60812b5603a405d80502af9d Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Tue, 10 Sep 2024 06:47:02 +0000 Subject: [PATCH 07/20] Revert "update docs/API_reference/zh/peripherals/ethernet.DM9051.md." This reverts commit 84af6f03b950e227fbba0e00ab6337cf6cfb6780. --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 001bf5f2..16a2091f 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ ### `ethernet.DM9051` ```python -class ethernet.W5500(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) ``` 加载DM9051驱动,初始化DM9051以太网卡,并返回DM9051网卡对象。 @@ -22,9 +22,6 @@ class ethernet.W5500(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin= - `gateway` - 以太网卡的网关地址,若值为空字符串'',表示将 `ip` 地址的最后一位替换成`1`作为网关。 - `spi_port` - 连接`DM9051`的[SPI端口](./machine.SPI.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `SPI1` 端口。 - `spi_cs_pin` - 连接`DM9051`的 `SPI` 片选[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `Pin.GPIO13`。 -- `extint_pin` - 连接`DM9051`的外部中断[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示上次配置的值,程序中默认配置为 `Pin.GPIO19`。 -- `reset_pin` - 连接`DM9051`的重置[GPIO管脚](./machine.Pin.md),默认值为`-1`, 表示上次配置的值,程序中默认配置为 `Pin.GPIO17`。 -- `work_mode` - 以太网工作模式配置,默认为终端模式,`0`/`1` 分别表示终端模式/网关模式。终端模式表示该模块作为终端设备连接供网设备上网。网关模式表示该模块作为网关,为外部设备提供网络访问,通过`4G`上网。 ## 方法 -- Gitee From ab4990fde37b800db063ad9b720335eada700c43 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Tue, 10 Sep 2024 06:56:29 +0000 Subject: [PATCH 08/20] =?UTF-8?q?update=20docs/API=5Freference/zh/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E6=9B=B4=E6=96=B0DM9051=E4=BB=A5?= =?UTF-8?q?=E5=A4=AA=E7=BD=91=E5=8D=A1=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 16a2091f..588e4397 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) ``` 加载DM9051驱动,初始化DM9051以太网卡,并返回DM9051网卡对象。 @@ -22,6 +22,9 @@ class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin= - `gateway` - 以太网卡的网关地址,若值为空字符串'',表示将 `ip` 地址的最后一位替换成`1`作为网关。 - `spi_port` - 连接`DM9051`的[SPI端口](./machine.SPI.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `SPI1` 端口。 - `spi_cs_pin` - 连接`DM9051`的 `SPI` 片选[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `Pin.GPIO13`。 +- `extint_pin` - 连接`DM9051`的外部中断[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示上次配置的值,程序中默认配置为 `Pin.GPIO19`。 +- `reset_pin` - 连接`DM9051`的重置[GPIO管脚](./machine.Pin.md),默认值为`-1`, 表示上次配置的值,程序中默认配置为 `Pin.GPIO17`。 +- `work_mode` - 以太网工作模式配置,默认为终端模式,`0`/`1` 分别表示终端模式/网关模式。终端模式表示该模块作为终端设备连接供网设备上网。网关模式表示该模块作为网关,为外部设备提供网络访问,通过`4G`上网。 ## 方法 -- Gitee From c11edde9f679f2fbe309fe9038d4a7b91309ba8a Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Tue, 10 Sep 2024 07:34:40 +0000 Subject: [PATCH 09/20] =?UTF-8?q?update=20docs/API=5Freference/en/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E6=9B=B4=E6=96=B0DM9051=E4=BB=A5?= =?UTF-8?q?=E5=A4=AA=E7=BD=91=E5=8D=A1=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/peripherals/ethernet.DM9051.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/API_reference/en/peripherals/ethernet.DM9051.md b/docs/API_reference/en/peripherals/ethernet.DM9051.md index 8a3f3dbb..ec9c8a09 100644 --- a/docs/API_reference/en/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/en/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ This class controls Ethernet NIC devices of `DM9051`. ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) ``` Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC object. @@ -22,7 +22,9 @@ Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC obje - `gateway` - Gateway address of Ethernet NIC. The default value is an empty string'', indicating that the last bit of IP address is replaced with `1` as the gateway address. - `spi_port` - Connect to [SPI port](./machine.SPI.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `SPI1` port. - `spi_cs_pin` - Connect to `SPI` chip select [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO13`. - +- `extint_pin` - Connect to external interrupt [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO19`. +- `reset_pin` - Connect to reset [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO17`. +- `work_mode` - Configure Ethernet working mode. The default mode is terminal mode. `0` and `1` respectively represents terminal mode and gateway mode. Terminal mode indicates that the module is used as a terminal device to connect to a network supply device to access the network. Gateway mode indicates that the module is used as a gateway to provide network access for external devices through LTE network. ## Methods ### `DM9051.set_addr` -- Gitee From a083f0a47434683ed7425d9f9bc7821db0eca33f Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Thu, 12 Sep 2024 01:26:14 +0000 Subject: [PATCH 10/20] Revert "update docs/API_reference/zh/peripherals/ethernet.DM9051.md." This reverts commit ab4990fde37b800db063ad9b720335eada700c43. --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 588e4397..16a2091f 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) ``` 加载DM9051驱动,初始化DM9051以太网卡,并返回DM9051网卡对象。 @@ -22,9 +22,6 @@ class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin - `gateway` - 以太网卡的网关地址,若值为空字符串'',表示将 `ip` 地址的最后一位替换成`1`作为网关。 - `spi_port` - 连接`DM9051`的[SPI端口](./machine.SPI.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `SPI1` 端口。 - `spi_cs_pin` - 连接`DM9051`的 `SPI` 片选[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `Pin.GPIO13`。 -- `extint_pin` - 连接`DM9051`的外部中断[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示上次配置的值,程序中默认配置为 `Pin.GPIO19`。 -- `reset_pin` - 连接`DM9051`的重置[GPIO管脚](./machine.Pin.md),默认值为`-1`, 表示上次配置的值,程序中默认配置为 `Pin.GPIO17`。 -- `work_mode` - 以太网工作模式配置,默认为终端模式,`0`/`1` 分别表示终端模式/网关模式。终端模式表示该模块作为终端设备连接供网设备上网。网关模式表示该模块作为网关,为外部设备提供网络访问,通过`4G`上网。 ## 方法 -- Gitee From bb40a519dad23159ff27d2d688be0e9f8667b21b Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Thu, 12 Sep 2024 01:29:32 +0000 Subject: [PATCH 11/20] =?UTF-8?q?update=20docs/API=5Freference/zh/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E6=9B=B4=E6=96=B0dm9051=E4=BB=A5?= =?UTF-8?q?=E5=A4=AA=E7=BD=91=E5=8D=A1=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 16a2091f..8b51a8c4 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) ``` 加载DM9051驱动,初始化DM9051以太网卡,并返回DM9051网卡对象。 @@ -22,6 +22,11 @@ class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin= - `gateway` - 以太网卡的网关地址,若值为空字符串'',表示将 `ip` 地址的最后一位替换成`1`作为网关。 - `spi_port` - 连接`DM9051`的[SPI端口](./machine.SPI.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `SPI1` 端口。 - `spi_cs_pin` - 连接`DM9051`的 `SPI` 片选[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示使用上次配置的值,程序中默认配置为了 `Pin.GPIO13`。 +- `extint_pin` - 连接`DM9051`的外部中断[GPIO管脚](./machine.Pin.md),默认值为`-1`,表示上次配置的值,程序中默认配置为 `Pin.GPIO19`。 +- `reset_pin` - 连接`DM9051`的重置[GPIO管脚](./machine.Pin.md),默认值为`-1`, 表示上次配置的值,程序中默认配置为 `Pin.GPIO17`。 +- `work_mode` - 以太网工作模式配置,默认为终端模式,`0`/`1` 分别表示终端模式/网关模式。终端模式表示该模块作为终端设备连接供网设备上网。网关模式表示该模块作为网关,为外部设备提供网络访问,通过`4G`上网。 + +> 默认值各个平台有差异,建议定义可用GPIO使用。 ## 方法 -- Gitee From 1079c328f17a5e58815222400e5481ac6fafb67e Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Thu, 12 Sep 2024 01:30:08 +0000 Subject: [PATCH 12/20] Revert "update docs/API_reference/en/peripherals/ethernet.DM9051.md." This reverts commit c11edde9f679f2fbe309fe9038d4a7b91309ba8a. --- docs/API_reference/en/peripherals/ethernet.DM9051.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/API_reference/en/peripherals/ethernet.DM9051.md b/docs/API_reference/en/peripherals/ethernet.DM9051.md index ec9c8a09..8a3f3dbb 100644 --- a/docs/API_reference/en/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/en/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ This class controls Ethernet NIC devices of `DM9051`. ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) ``` Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC object. @@ -22,9 +22,7 @@ Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC obje - `gateway` - Gateway address of Ethernet NIC. The default value is an empty string'', indicating that the last bit of IP address is replaced with `1` as the gateway address. - `spi_port` - Connect to [SPI port](./machine.SPI.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `SPI1` port. - `spi_cs_pin` - Connect to `SPI` chip select [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO13`. -- `extint_pin` - Connect to external interrupt [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO19`. -- `reset_pin` - Connect to reset [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO17`. -- `work_mode` - Configure Ethernet working mode. The default mode is terminal mode. `0` and `1` respectively represents terminal mode and gateway mode. Terminal mode indicates that the module is used as a terminal device to connect to a network supply device to access the network. Gateway mode indicates that the module is used as a gateway to provide network access for external devices through LTE network. + ## Methods ### `DM9051.set_addr` -- Gitee From 9d4ccdfba8d1915eec1a97986036b0f75d7478af Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Thu, 12 Sep 2024 01:34:24 +0000 Subject: [PATCH 13/20] =?UTF-8?q?update=20docs/API=5Freference/en/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E6=9B=B4=E6=96=B0dm9051=E4=BB=A5?= =?UTF-8?q?=E5=A4=AA=E7=BD=91=E5=8D=A1=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/peripherals/ethernet.DM9051.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/API_reference/en/peripherals/ethernet.DM9051.md b/docs/API_reference/en/peripherals/ethernet.DM9051.md index 8a3f3dbb..0e51683e 100644 --- a/docs/API_reference/en/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/en/peripherals/ethernet.DM9051.md @@ -9,7 +9,7 @@ This class controls Ethernet NIC devices of `DM9051`. ### `ethernet.DM9051` ```python -class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1,spi_cs_pin=-1) +class ethernet.DM9051(mac, ip='', subnet='', gateway='', spi_port=-1, spi_cs_pin=-1, extint_pin=-1, reset_pin=-1, work_mode=0) ``` Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC object. @@ -22,6 +22,11 @@ Loads DM9051 driver, initializes DM9051 Ethernet NIC and returns DM9051 NIC obje - `gateway` - Gateway address of Ethernet NIC. The default value is an empty string'', indicating that the last bit of IP address is replaced with `1` as the gateway address. - `spi_port` - Connect to [SPI port](./machine.SPI.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `SPI1` port. - `spi_cs_pin` - Connect to `SPI` chip select [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO13`. +- `extint_pin` - Connect to external interrupt [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO19`. +- `reset_pin` - Connect to reset [GPIO pin](./machine.Pin.md) of `DM9051`. The default value is `-1`, indicating that the last configured value is used and the default configuration in the program is `Pin.GPIO17`. +- `work_mode` - Configure Ethernet working mode. The default mode is terminal mode. `0` and `1` respectively represents terminal mode and gateway mode. Terminal mode indicates that the module is used as a terminal device to connect to a network supply device to access the network. Gateway mode indicates that the module is used as a gateway to provide network access for external devices through LTE network. + +> The default value varies from platform to platform. It is recommended to define the available GPIO usage ## Methods -- Gitee From 6046812184b5ac4989f7a27758e87e812694690b Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 9 Oct 2024 05:55:55 +0000 Subject: [PATCH 14/20] =?UTF-8?q?update=20docs/API=5Freference/zh/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E4=BF=AE=E6=94=B9dm9051=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=9E=8B=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/peripherals/ethernet.DM9051.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API_reference/zh/peripherals/ethernet.DM9051.md b/docs/API_reference/zh/peripherals/ethernet.DM9051.md index 8b51a8c4..189f90dc 100644 --- a/docs/API_reference/zh/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/zh/peripherals/ethernet.DM9051.md @@ -2,7 +2,7 @@ 该类用于控制`DM9051`型号以太网网卡设备。 -> 当前仅支持EC600N系列 +> 当前仅支持EC600N/EG912N/EG915N系列及EC800MCN_LE ## 构造函数 -- Gitee From 26764211b0aa1d94047d15a8a570ad443effbd4c Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 9 Oct 2024 06:55:46 +0000 Subject: [PATCH 15/20] =?UTF-8?q?update=20docs/API=5Freference/en/peripher?= =?UTF-8?q?als/ethernet.DM9051.md.=20=E4=BF=AE=E6=94=B9dm9051=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=9E=8B=E5=8F=B7=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/en/peripherals/ethernet.DM9051.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API_reference/en/peripherals/ethernet.DM9051.md b/docs/API_reference/en/peripherals/ethernet.DM9051.md index 0e51683e..a9042858 100644 --- a/docs/API_reference/en/peripherals/ethernet.DM9051.md +++ b/docs/API_reference/en/peripherals/ethernet.DM9051.md @@ -2,7 +2,7 @@ This class controls Ethernet NIC devices of `DM9051`. -> Currently, only EC600N module series support this feature. +> Currently, only the EC600N/EG912N/EG915N series and EC800MCN_LE are supported. ## Constructor -- Gitee From a9ee7cd4e71837d7a17cff61ee609b893f622958 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 20 Nov 2024 07:20:12 +0000 Subject: [PATCH 16/20] =?UTF-8?q?update=20docs/API=5Freference/zh/stdlib/u?= =?UTF-8?q?io.md.=20=E6=9B=B4=E6=96=B0uio=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/stdlib/uio.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/API_reference/zh/stdlib/uio.md b/docs/API_reference/zh/stdlib/uio.md index e987fb9a..0436a843 100644 --- a/docs/API_reference/zh/stdlib/uio.md +++ b/docs/API_reference/zh/stdlib/uio.md @@ -2,6 +2,8 @@ `uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) +> 支持IOBase, BytesIO,FileIO, StringIO,TextIO。 + **示例**: ```python -- Gitee From 8be3256d170f74ce8e8c549d268372a0410af8b0 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 20 Nov 2024 07:24:59 +0000 Subject: [PATCH 17/20] =?UTF-8?q?update=20docs/API=5Freference/zh/stdlib/u?= =?UTF-8?q?io.md.=20=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/stdlib/uio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API_reference/zh/stdlib/uio.md b/docs/API_reference/zh/stdlib/uio.md index 0436a843..ccbeaa93 100644 --- a/docs/API_reference/zh/stdlib/uio.md +++ b/docs/API_reference/zh/stdlib/uio.md @@ -1,6 +1,6 @@ # uio - 输入输出流 -`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) +`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) > 支持IOBase, BytesIO,FileIO, StringIO,TextIO。 -- Gitee From bd8f3886b33954bbba666efb038d289491a648c7 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 20 Nov 2024 07:43:11 +0000 Subject: [PATCH 18/20] Revert "update docs/API_reference/zh/stdlib/uio.md." This reverts commit a9ee7cd4e71837d7a17cff61ee609b893f622958. --- docs/API_reference/zh/stdlib/uio.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/API_reference/zh/stdlib/uio.md b/docs/API_reference/zh/stdlib/uio.md index ccbeaa93..afa305cd 100644 --- a/docs/API_reference/zh/stdlib/uio.md +++ b/docs/API_reference/zh/stdlib/uio.md @@ -2,8 +2,6 @@ `uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) -> 支持IOBase, BytesIO,FileIO, StringIO,TextIO。 - **示例**: ```python -- Gitee From 0a0c6af99b4b95786b60e090a7e64442d883d4fd Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 20 Nov 2024 07:43:31 +0000 Subject: [PATCH 19/20] Revert "update docs/API_reference/zh/stdlib/uio.md." This reverts commit 8be3256d170f74ce8e8c549d268372a0410af8b0. --- docs/API_reference/zh/stdlib/uio.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API_reference/zh/stdlib/uio.md b/docs/API_reference/zh/stdlib/uio.md index afa305cd..e987fb9a 100644 --- a/docs/API_reference/zh/stdlib/uio.md +++ b/docs/API_reference/zh/stdlib/uio.md @@ -1,6 +1,6 @@ # uio - 输入输出流 -`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) +`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) **示例**: -- Gitee From 406bfcfefba160fafc413834a7f1b95c0d600731 Mon Sep 17 00:00:00 2001 From: moqiyi <85303405@qq.com> Date: Wed, 20 Nov 2024 07:51:18 +0000 Subject: [PATCH 20/20] =?UTF-8?q?update=20docs/API=5Freference/zh/stdlib/u?= =?UTF-8?q?io.md.=20=E6=9B=B4=E6=96=B0uio=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moqiyi <85303405@qq.com> --- docs/API_reference/zh/stdlib/uio.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/API_reference/zh/stdlib/uio.md b/docs/API_reference/zh/stdlib/uio.md index e987fb9a..b81b0673 100644 --- a/docs/API_reference/zh/stdlib/uio.md +++ b/docs/API_reference/zh/stdlib/uio.md @@ -1,6 +1,8 @@ # uio - 输入输出流 -`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) +`uio`模块包含其他类型的stream(类文件)对象和辅助函数。该模块实现相应CPython模块的子集。更多信息请参阅CPython文档:[io](https://docs.python.org/3.5/library/io.html#module-io) + +> 支持IOBase,BytesIO,FileIO, StringIO,TextIO。 **示例**: -- Gitee