From 2ad90b2cf9221882a0c415254e0f8f269906ade8 Mon Sep 17 00:00:00 2001 From: "mia.zhong" Date: Fri, 18 Nov 2022 13:42:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[EG915UEUABR03A01M08=5FOCPU=5FQPY]=E6=96=B0?= =?UTF-8?q?=E5=A2=9ENAT=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en-us/api/QuecPythonClasslib.md | 59 +++++++++++++++++++++++++++++++++ zh-cn/api/QuecPythonClasslib.md | 57 +++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) diff --git a/en-us/api/QuecPythonClasslib.md b/en-us/api/QuecPythonClasslib.md index 67555f2..84bbdae 100644 --- a/en-us/api/QuecPythonClasslib.md +++ b/en-us/api/QuecPythonClasslib.md @@ -5211,6 +5211,65 @@ USBNET.open() +###### get the status of NAT enablement + +> **USBNET.getNat(simid, pid)** + +get the status of NAT enablement(Whether IPV6 is supported)(supported only on 8910) + +* Parameter + +| Parameter | Type | Description | +| -------- | -------- | ----------------------------------------------------- | +| simid | int | simid,value:0/1 ,(only SIM0 is supported now) | +| pid | int | PDP context index ,range:1-8 | + +* Return Value + +success:return the status of NAT enablement +0:enabled,means:IPV6 is supported +1:disabled,means:IPV6 is not supported + +failed: return -1 + +* Example + +```python +from misc import USBNET +USBNET.getNat(0, 1) +0 +``` + + + +###### set NAT + +> **USBNET.setNat(simid, pid, Nat)** + +set NAT,Restart takes effect (supported only on 8910) +(8910 platform: Usbnet.set_worktype () API will make the corresponding Nat value set to 1, so that the pid cannot dial up IPV6, so after close USBnet, you can use this interface to disable NAT and make IPV6 function normal) + +* Parameter + +| Parameter | Type | Description | +| -------- | -------- | ----------------------------------------------------- | +| simid | int | simid,value:0/1 ,(only SIM0 is supported now) | +| pid | int | PDP context index ,range:1-8 | +| Nat | int | Nat,value:0/1;0:IPV6 is supported;1:IPV6 is not supported | + +* Return Value + +Return 0 if successful, otherwise return -1 + +* Example + +```python +USBNET.setNat(0, 1, 0) +0 +``` + + + ##### Diversity antenna configuration API > **misc.antennaSecRXOffCtrl(\*args)** diff --git a/zh-cn/api/QuecPythonClasslib.md b/zh-cn/api/QuecPythonClasslib.md index 25ac6d3..8721657 100644 --- a/zh-cn/api/QuecPythonClasslib.md +++ b/zh-cn/api/QuecPythonClasslib.md @@ -5755,6 +5755,63 @@ USBNET.open() +###### 获取Nat使能情况 + +> **USBNET.getNat(simid, pid)** + +获取某一路网卡的Nat使能情况(是否支持ipv6拨号)(仅在8910平台支持) + +* 参数 + +| 参数 | 参数类型 | 参数说明 | +| ----- | -------- | ------------------------------ | +| simid | int | simid,范围:0/1 ,目前仅支持0 | +| pid | int | PDP索引, 展锐平台范围1-8 | + +* 返回值 + +成功:返回Nat使能情况,整型0/1,0:使能,支持ipv6拨号;1:未使能,不支持ipv6拨号 + +失败:返回整型-1 + +* 示例 + +```python +from misc import USBNET +USBNET.getNat(0, 1) +0 +``` + + + +###### Nat设置 + +> **USBNET.setNat(simid, pid, Nat)** + +Nat设置,设置成功后重启生效(仅在8910平台支持) +(8910平台USBNET.set_worktype()接口调用的时候会使对应的Nat值变为1,使得该pid无法IPV6拨号,所以在close USBnet后,可以使用该接口关闭NAT,使IPV6功能正常) + +* 参数 + +| 参数 | 参数类型 | 参数说明 | +| ----- | -------- | -------------------------------------------------- | +| simid | int | simid,范围:0/1,目前仅支持0 | +| pid | int | PDP索引, 展锐平台范围1-8 | +| Nat | int | Nat,范围:0/1;0:支持ipv6拨号;1:不支持ipv6拨号 | + +* 返回值 + +设置成功返回整型0,设置失败返回整型-1 + +* 示例 + +```python +USBNET.setNat(0, 1, 0) +0 +``` + + + ##### 分集天线配置接口 > **misc.antennaSecRXOffCtrl(\*args)** From e569ae6a4659f2e740235dff96798f08b13a7f16 Mon Sep 17 00:00:00 2001 From: "mia.zhong" Date: Mon, 21 Nov 2022 09:41:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[usbnet.nat]pid=E8=8C=83=E5=9B=B4=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BA1-7=EF=BC=8C=E5=92=8C=E6=8B=A8=E5=8F=B7?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en-us/api/QuecPythonClasslib.md | 4 ++-- zh-cn/api/QuecPythonClasslib.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en-us/api/QuecPythonClasslib.md b/en-us/api/QuecPythonClasslib.md index 84bbdae..df96474 100644 --- a/en-us/api/QuecPythonClasslib.md +++ b/en-us/api/QuecPythonClasslib.md @@ -5222,7 +5222,7 @@ get the status of NAT enablement(Whether IPV6 is supported)(supported only on 89 | Parameter | Type | Description | | -------- | -------- | ----------------------------------------------------- | | simid | int | simid,value:0/1 ,(only SIM0 is supported now) | -| pid | int | PDP context index ,range:1-8 | +| pid | int | PDP context index ,range:1-7 | * Return Value @@ -5254,7 +5254,7 @@ set NAT,Restart takes effect (supported only on 8910) | Parameter | Type | Description | | -------- | -------- | ----------------------------------------------------- | | simid | int | simid,value:0/1 ,(only SIM0 is supported now) | -| pid | int | PDP context index ,range:1-8 | +| pid | int | PDP context index ,range:1-7 | | Nat | int | Nat,value:0/1;0:IPV6 is supported;1:IPV6 is not supported | * Return Value diff --git a/zh-cn/api/QuecPythonClasslib.md b/zh-cn/api/QuecPythonClasslib.md index 8721657..1d849fb 100644 --- a/zh-cn/api/QuecPythonClasslib.md +++ b/zh-cn/api/QuecPythonClasslib.md @@ -5766,7 +5766,7 @@ USBNET.open() | 参数 | 参数类型 | 参数说明 | | ----- | -------- | ------------------------------ | | simid | int | simid,范围:0/1 ,目前仅支持0 | -| pid | int | PDP索引, 展锐平台范围1-8 | +| pid | int | PDP索引, 展锐平台范围1-7 | * 返回值 @@ -5796,7 +5796,7 @@ Nat设置,设置成功后重启生效(仅在8910平台支持) | 参数 | 参数类型 | 参数说明 | | ----- | -------- | -------------------------------------------------- | | simid | int | simid,范围:0/1,目前仅支持0 | -| pid | int | PDP索引, 展锐平台范围1-8 | +| pid | int | PDP索引, 展锐平台范围1-7 | | Nat | int | Nat,范围:0/1;0:支持ipv6拨号;1:不支持ipv6拨号 | * 返回值