Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions en-us/api/QuecPythonClasslib.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-7 |

* 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-7 |
| 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)**
Expand Down
57 changes: 57 additions & 0 deletions zh-cn/api/QuecPythonClasslib.md
Original file line number Diff line number Diff line change
Expand Up @@ -5755,6 +5755,63 @@ USBNET.open()



###### 获取Nat使能情况

> **USBNET.getNat(simid, pid)**

获取某一路网卡的Nat使能情况(是否支持ipv6拨号)(仅在8910平台支持)

* 参数

| 参数 | 参数类型 | 参数说明 |
| ----- | -------- | ------------------------------ |
| simid | int | simid,范围:0/1 ,目前仅支持0 |
| pid | int | PDP索引, 展锐平台范围1-7 |

* 返回值

成功:返回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-7 |
| Nat | int | Nat,范围:0/1;0:支持ipv6拨号;1:不支持ipv6拨号 |

* 返回值

设置成功返回整型0,设置失败返回整型-1

* 示例

```python
USBNET.setNat(0, 1, 0)
0
```



##### 分集天线配置接口

> **misc.antennaSecRXOffCtrl(\*args)**
Expand Down