From f693a54c2c5e870737d51aebf15e69165dfcd6d0 Mon Sep 17 00:00:00 2001 From: Felix Hou Date: Mon, 3 Jun 2024 15:13:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20():=20<=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A0=E7=BA=BF=E8=AE=A4=E8=AF=81=E6=96=B9=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0STA=E6=96=AD=E5=BC=80=E5=8E=9F=E5=9B=A0>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit <增加无线认证方式,增加STA断开原因> 固件版本: N/A 是否需要文案翻译: 是/否 --- docs/API_reference/en/wifilib/WLAN.md | 27 +++++++++++++++++++-------- docs/API_reference/zh/wifilib/WLAN.md | 27 +++++++++++++++++++-------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/docs/API_reference/en/wifilib/WLAN.md b/docs/API_reference/en/wifilib/WLAN.md index 9cc5a389..570704f4 100644 --- a/docs/API_reference/en/wifilib/WLAN.md +++ b/docs/API_reference/en/wifilib/WLAN.md @@ -608,13 +608,15 @@ Returns an error code, `int` type. ### Authentication Modes -| Authentication Mode | Value | Description | -| ------------------- | ----- | ----------------------------------------------- | -| AUTH_OPEN | 0 | Open system authentication | -| AUTH_WEP | 1 | Wired Equivalent Privacy (WEP) authentication | -| AUTH_WPA_PSK | 2 | WPA pre-shared key (PSK) authentication | -| AUTH_WPA2_PSK | 3 | WPA2 pre-shared key (PSK) authentication | -| AUTH_WPA_WPA2_PSK | 4 | Mixed mode with WPA and WPA2 PSK authentication | +| Authentication Mode | Value | Description | +| ------------------- | ----- | ------------------------------------------------- | +| AUTH_OPEN | 0 | Open system authentication | +| AUTH_WEP | 1 | Wired Equivalent Privacy (WEP) authentication | +| AUTH_WPA_PSK | 2 | WPA pre-shared key (PSK) authentication | +| AUTH_WPA2_PSK | 3 | WPA2 pre-shared key (PSK) authentication | +| AUTH_WPA_WPA2_PSK | 4 | Mixed mode with WPA and WPA2 PSK authentication | +| AUTH_WPA3_PSK | 5 | WPA3 pre-shared key (PSK) authentication | +| AUTH_WPA2_WPA3_PSK | 6 | Mixed mode with WPA2 and WPA3 PSK authentication | ### Encryption Modes @@ -634,6 +636,16 @@ Returns an error code, `int` type. | NETCFG_WEBCONFIG | 1 | Web configuration | | NETCFG_BLECONFIG | 2 | BLE configuration | +### Reason for STA disconnection + +| Configuration Mode | Value | Description | +| ---------------------- | ----- | --------------- | +| REASON_USER_DISCONNECT | 1 | User disconnect | +| REASON_BEACON_LOST | 2 | Beacon lost | +| REASON_AP_DISCONNECT | 3 | AP disconnect | +| REASON_SCAN_NOT_FOUND | 4 | Scan not found | +| REASON_PWD_ERROR | 5 | password error | + ### Error Codes | Error Code | Value | Description | @@ -693,7 +705,6 @@ Returns an error code, `int` type. | 3200 | EVENT_STA_CONNECTED | 3203 | Connected to Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
mac`: Station's MAC address. | | 3200 | EVENT_STA_DISCONNECTED | 3204 | Disconnected from Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
ip`: Station's IP address. `
mac`: Station's MAC address. | | 3200 | EVENT_STA_IP_ASSIGNED | 3205 | IP Assigned to Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
ip`: Station's IP address. `
mac`: Station's MAC address. | -| 3200 | EVENT_AP_STOP | 3206 | AP Mode Stop | None | | 3300 | EVENT_STA_START_CONN | 3301 | Start Connecting to AP | None | | 3300 | EVENT_CONN_SUCCEED | 3302 | Connection to AP Successful | Returns information about the connected AP,`dict` type. `
ssid`: Wireless access point name, `str` type.`
password`: Wireless access point password, `str` type. `
bssid`: Wireless access point MAC address, `str` type. `
channel`: Current channel, `int` type. `
rssi`: Signal strength of the wireless access point, `int` type. `
auth`: Authentication mode, `int` type. `
cipher`: Encryption mode, `int` type. | | 3300 | EVENT_CONN_FAILED | 3303 | Connection to AP Failed | None | diff --git a/docs/API_reference/zh/wifilib/WLAN.md b/docs/API_reference/zh/wifilib/WLAN.md index 32e26ccc..168713bf 100644 --- a/docs/API_reference/zh/wifilib/WLAN.md +++ b/docs/API_reference/zh/wifilib/WLAN.md @@ -607,13 +607,15 @@ WLAN.netcfg(enable=True, type=nic.NETCFG_SMARTCONFIG, timeout=120) ### 认证方式 -| 认证方式 | 值 | 说明 | -| ----------------- | -- | ------------------------------------ | -| AUTH_OPEN | 0 | 开放式身份认证 | -| AUTH_WEP | 1 | 有线等效加密身份认证 | -| AUTH_WPA_PSK | 2 | WPA预共享密钥身份认证 | -| AUTH_WPA2_PSK | 3 | WPA2预共享密钥身份认证 | -| AUTH_WPA_WPA2_PSK | 4 | 混合模式,结合WPA和WPA2的PSK身份认证 | +| 认证方式 | 值 | 说明 | +| ------------------ | -- | ------------------------------------- | +| AUTH_OPEN | 0 | 开放式身份认证 | +| AUTH_WEP | 1 | 有线等效加密身份认证 | +| AUTH_WPA_PSK | 2 | WPA预共享密钥身份认证 | +| AUTH_WPA2_PSK | 3 | WPA2预共享密钥身份认证 | +| AUTH_WPA_WPA2_PSK | 4 | 混合模式,结合WPA和WPA2的PSK身份认证 | +| AUTH_WPA3_PSK | 5 | WPA3预共享密钥身份认证 | +| AUTH_WPA2_WPA3_PSK | 6 | 混合模式,结合WPA2和WPA3的PSK身份认证 | ### 加密方式 @@ -633,6 +635,16 @@ WLAN.netcfg(enable=True, type=nic.NETCFG_SMARTCONFIG, timeout=120) | NETCFG_WEBCONFIG | 1 | web配网 | | NETCFG_BLECONFIG | 2 | ble配网 | +### STA断开原因 + +| 配网方式 | 值 | 说明 | +| ---------------------- | -- | ------------------ | +| REASON_USER_DISCONNECT | 1 | 用户主动断开 | +| REASON_BEACON_LOST | 2 | 失去Beacon信号 | +| REASON_AP_DISCONNECT | 3 | 无线接入点主动断开 | +| REASON_SCAN_NOT_FOUND | 4 | 没有找到特定的网络 | +| REASON_PWD_ERROR | 5 | 密码错误 | + ### 错误码 | 错误码 | 说明 | 值 | @@ -692,7 +704,6 @@ WLAN.netcfg(enable=True, type=nic.NETCFG_SMARTCONFIG, timeout=120) | 3200 | EVENT_STA_CONNECTED | 3203 | 与Station建立连接 | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
mac`: Station的MAC地址。 | | 3200 | EVENT_STA_DISCONNECTED | 3204 | 与Station断开连接 | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
ip`: Station的IP地址。`
mac`: Station的MAC地址。 | | 3200 | EVENT_STA_IP_ASSIGNED | 3205 | 已为Station分配IP | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
ip`: Station的IP地址。`
mac`: Station的MAC地址。 | -| 3200 | EVENT_AP_STOP | 3206 | 停止AP模式 | None | | 3300 | EVENT_STA_START_CONN | 3301 | 开始连接AP | None | | 3300 | EVENT_CONN_SUCCEED | 3302 | 连接AP成功 | 返回已连接的AP信息,`dict`类型。 `
ssid`: 无线接入点名称,`str`类型。`
password`: 无线接入点密码,`str`类型。 `
bssid`: 无线接入点MAC地址,`str`类型。 `
channel`: 当前所处信道,`int`类型。 `
rssi`: 无线接入点信号强度,`int`类型。 `
auth`: 认证方式,`int`类型。 `
cipher`: 加密方式,`int`类型。 | | 3300 | EVENT_CONN_FAILED | 3303 | 连接AP失败 | None | -- Gitee From 266bf39302bb49baab34d7801c78e16435f2d7ce Mon Sep 17 00:00:00 2001 From: Felix Hou Date: Mon, 3 Jun 2024 15:25:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=20():=20<=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A0=E7=BA=BF=E8=AE=A4=E8=AF=81=E6=96=B9=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0STA=E6=96=AD=E5=BC=80=E5=8E=9F=E5=9B=A0>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit <增加无线认证方式,增加STA断开原因> 固件版本: N/A 是否需要文案翻译: 是/否 --- docs/API_reference/en/wifilib/WLAN.md | 1 + docs/API_reference/zh/wifilib/WLAN.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/API_reference/en/wifilib/WLAN.md b/docs/API_reference/en/wifilib/WLAN.md index 570704f4..3bc87fce 100644 --- a/docs/API_reference/en/wifilib/WLAN.md +++ b/docs/API_reference/en/wifilib/WLAN.md @@ -705,6 +705,7 @@ Returns an error code, `int` type. | 3200 | EVENT_STA_CONNECTED | 3203 | Connected to Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
mac`: Station's MAC address. | | 3200 | EVENT_STA_DISCONNECTED | 3204 | Disconnected from Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
ip`: Station's IP address. `
mac`: Station's MAC address. | | 3200 | EVENT_STA_IP_ASSIGNED | 3205 | IP Assigned to Station | Returns information about the Station,`dict` type. `
aid`: ID assigned by AP to Station. `
ip`: Station's IP address. `
mac`: Station's MAC address. | +| 3200 | EVENT_AP_STOP | 3206 | AP Mode Stop | None | | 3300 | EVENT_STA_START_CONN | 3301 | Start Connecting to AP | None | | 3300 | EVENT_CONN_SUCCEED | 3302 | Connection to AP Successful | Returns information about the connected AP,`dict` type. `
ssid`: Wireless access point name, `str` type.`
password`: Wireless access point password, `str` type. `
bssid`: Wireless access point MAC address, `str` type. `
channel`: Current channel, `int` type. `
rssi`: Signal strength of the wireless access point, `int` type. `
auth`: Authentication mode, `int` type. `
cipher`: Encryption mode, `int` type. | | 3300 | EVENT_CONN_FAILED | 3303 | Connection to AP Failed | None | diff --git a/docs/API_reference/zh/wifilib/WLAN.md b/docs/API_reference/zh/wifilib/WLAN.md index 168713bf..f9ab35a8 100644 --- a/docs/API_reference/zh/wifilib/WLAN.md +++ b/docs/API_reference/zh/wifilib/WLAN.md @@ -704,6 +704,7 @@ WLAN.netcfg(enable=True, type=nic.NETCFG_SMARTCONFIG, timeout=120) | 3200 | EVENT_STA_CONNECTED | 3203 | 与Station建立连接 | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
mac`: Station的MAC地址。 | | 3200 | EVENT_STA_DISCONNECTED | 3204 | 与Station断开连接 | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
ip`: Station的IP地址。`
mac`: Station的MAC地址。 | | 3200 | EVENT_STA_IP_ASSIGNED | 3205 | 已为Station分配IP | 返回Station的信息,`dict`类型。`
aid`: AP为Station分配的id。`
ip`: Station的IP地址。`
mac`: Station的MAC地址。 | +| 3200 | EVENT_AP_STOP | 3206 | 停止AP模式 | None | | 3300 | EVENT_STA_START_CONN | 3301 | 开始连接AP | None | | 3300 | EVENT_CONN_SUCCEED | 3302 | 连接AP成功 | 返回已连接的AP信息,`dict`类型。 `
ssid`: 无线接入点名称,`str`类型。`
password`: 无线接入点密码,`str`类型。 `
bssid`: 无线接入点MAC地址,`str`类型。 `
channel`: 当前所处信道,`int`类型。 `
rssi`: 无线接入点信号强度,`int`类型。 `
auth`: 认证方式,`int`类型。 `
cipher`: 加密方式,`int`类型。 | | 3300 | EVENT_CONN_FAILED | 3303 | 连接AP失败 | None | -- Gitee