From 7c7ed48b071119c2c7806fd47dc6b0604635b154 Mon Sep 17 00:00:00 2001 From: "burols.wang" Date: Mon, 6 Sep 2021 20:07:50 +0800 Subject: [PATCH] =?UTF-8?q?BC25PA=E5=B9=B3=E5=8F=B0pythonSDK=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=8E=A5=E5=8F=A3=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en-us/api/QuecPythonClasslib.md | 220 ++++++++++++++++++++++-- en-us/api/QuecPythonThirdlib.md | 9 + zh-cn/api/QuecPythonClasslib.md | 294 ++++++++++++++++++++------------ zh-cn/api/QuecPythonThirdlib.md | 11 ++ 4 files changed, 411 insertions(+), 123 deletions(-) diff --git a/en-us/api/QuecPythonClasslib.md b/en-us/api/QuecPythonClasslib.md index e2863e6..030938d 100644 --- a/en-us/api/QuecPythonClasslib.md +++ b/en-us/api/QuecPythonClasslib.md @@ -77,6 +77,10 @@ This function starts the dial-up and activates the data link. -1 Failed execution. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -110,6 +114,9 @@ After calling this interface, the user_apn.json will be created in the user part -1 Failed execution. +* note + + The BC25PA platform does not support this method. * Example ```python @@ -138,6 +145,10 @@ This function registers the callback function to send the notification when the -1 Failed execution. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -293,6 +304,10 @@ if __name__ == '__main__': Function: Provides base station positioning interface to obtain coordinate information. +* note + + The BC25PA platform does not support this module function. + ##### Obtain Coordinate Information > **cellLocator.getLocation(serverAddr, port, token, timeout, profileID)** @@ -403,6 +418,10 @@ NA Returns the phone number in string type, or returns -1 if failed. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -468,7 +487,11 @@ This function enables PIN authentication, and then you need to enter the correct 0 Successful execution. -1 Failed execution. + +* note + The BC25PA platform pin password supports up to eight digits. + * Example ```python @@ -495,7 +518,11 @@ This function disables PIN authentication 0 Successful execution. -1 Failed execution. + +* note + The BC25PA platform pin password supports up to eight digits. + * Example ```python @@ -522,7 +549,11 @@ PIN authentication. Only can be called after sim.enablePin(pin) is executed succ 0 Successful execution. -1 Failed execution. + +* note + The BC25PA platform pin password supports up to eight digits. + * Example ```python @@ -550,7 +581,11 @@ This function unlocks the SIM card. When PIN/PIN2 code is wrongly input for time 0 Successful execution. -1 Failed execution. + +* note + The BC25PA platform pin password supports up to eight digits. + * Example ```python @@ -578,7 +613,11 @@ Changes PIN. 0 Successful execution. -1 Failed execution. + +* note + The BC25PA platform pin password supports up to eight digits. + * Example ```python @@ -619,6 +658,10 @@ Description: `phone_number` – String type. Phone number. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -655,6 +698,10 @@ This function writes a phone number record. -1 Failed execution. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -684,6 +731,10 @@ This function registers the listening callback function. This function will be t -1 Failed execution. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -717,6 +768,10 @@ This function sets the SIM card hot-plugging related configurations. -1 Failed execution. +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -748,6 +803,10 @@ Description: `insertlevel` – High/low level (0/1). +* note + + The BC25PA platform does not support this method. + Example ```python @@ -963,7 +1022,8 @@ def voice_callback(args): #### sms - SMS Function: Provides SMS related APIs. - +Note: The BC25PA platform does not support this module function. + ##### Send the Message in TEXT Mode > **sms.sendTextMsg(phoneNumber, msg, codeMode)** @@ -1420,6 +1480,10 @@ This function sets APN. -1 Failed execution +* note + + The BC25PA platform does not support this module function. + ##### Obtain the Current APN > **net.getApn(simid)** @@ -1438,6 +1502,10 @@ This function obtains the current APN. -1 Failed execution. +* note + + The BC25PA platform does not support this module function. + ##### Obtain CSQ > **net.csqQueryPoll()** @@ -1531,6 +1599,8 @@ The description of the return value for LTE: ##### Obtain RAT and Roaming Configuration +>**net.getConfig()** + The function obtains the current RAT and the roaming configuration. * Parameter @@ -1541,6 +1611,10 @@ NA If the execution is failed, -1 is returned. If the execution is successful, a tuple including the current primary RAT and roaming configuration is returned. +* note + + The BC25PA platform does not support this module function. + RAT | Value | RAT | @@ -1593,7 +1667,10 @@ The function sets the current RAT and the roaming configuration. -1 Failed execution. +* note + The BC25PA platform does not support this module function. + ##### Obtain the Network Mode @@ -1959,7 +2036,7 @@ This function sets the current modem functionality. #### checkNet - Wait for Network to be Ready Function: The checkNet module is mainly used for the script programs [auto-startup], and provides APIs to wait for the network to be ready. If it times out or exits abnormally, the program returns an error code. Therefore, if there are network-related operations in the your program, the method in the checkNet module should be called at the beginning of the user program to wait for the network to be ready. Of course, you can also implement the functions of this module by yourselves. - +Note: The BC25PA platform does not support this module function. ##### Create checkNet Object > **import checkNet** @@ -2201,6 +2278,9 @@ Write upgrade package data stream -1 Failed execution +* note + + The BC25PA platform does not support this method. ##### Interface to Upgrade Step by Step and Refresh Cached Data to Flash @@ -2219,7 +2299,9 @@ None -1 Failed execution +* note + The BC25PA platform does not support this method. ##### Interface to Upgrade Step by Step and Verify the Data @@ -2237,6 +2319,10 @@ None -1 Failed execution +* note + + The BC25PA platform does not support this method. + * Example ```python @@ -2350,7 +2436,7 @@ if __name__ == '__main__': #### app_fota - Upgrade User File Module function: Upgrade user file - +Note: The BC25PA platform does not support this module function. ##### Create an app_fota Object 1. Import app_fota module @@ -2427,7 +2513,7 @@ In this example, assuming that `http://www.example.com/test.txt`fails to be down #### audio - Audio Playback Module function: audio playback, supports to play files in TTS, mp3 and AMR. - +Note: The BC25PA platform does not support this module function. ##### TTS ###### Create the TTS Object @@ -3024,7 +3110,7 @@ Set audio volume. ##### Record Applicable versions: EC100Y(V0009) and above; EC600S(V0003) and above. - +Note: The BC25PA platform does not support this module function. ###### Create an Object > **import audio** @@ -3503,7 +3589,9 @@ The values returned are explained as follows: 0: Unknown +* note + BC25PA platform only does not support restart reason 5. ###### Get the Reason for the Last Powering Down of the Module @@ -3532,6 +3620,9 @@ None 0: Unknown +* note + + The BC25PA platform does not support this method. ###### Get Voltage of the Battery. @@ -3632,7 +3723,7 @@ pk.powerKeyEventRegister(pwk_callback) ##### PWM - +Note: The BC25PA platform does not support this module function. ###### Constant Description | Constent | Description | Usage Platform | @@ -3748,9 +3839,9 @@ if __name__ == '__main__': ###### Constant Description -| Constant | Description | Usage Platform | -| -------- | ------------- | ---------------------------------- | -| ADC.ADC0 | ADC Channel 0 | EC600S/EC600N/EC100Y/EC600U/EC200U | +| Constant | Description | Usage Platform | +| -------- | ------------- | ----------------------------------------- | +| ADC.ADC0 | ADC Channel 0 | EC600S/EC600N/EC100Y/EC600U/EC200U/BC25PA | | ADC.ADC1 | ADC Channel 1 | EC600S/EC600N/EC600U/EC200U | | ADC.ADC2 | ADC Channel 2 | EC600U/EC200U | | ADC.ADC3 | ADC Channel 3 | EC600U | @@ -3832,7 +3923,7 @@ Return 0 if the execution is successful, otherwise return -1. ##### USB It provides USB plug detection interface. - +Note: The BC25PA platform does not support this module function. ###### Create an USB Object > from misc import USB @@ -4066,6 +4157,26 @@ Function: GPIO read and write operations. | Pin.PULL_PU | -- | Pull-up mode | | Pin.PULL_PD | -- | Pull-down mode | +Constant description for BC25PA platform +| Constant | Applicable Platform | Description | +| ---------------- | -------------------------------------- | -------------- | +| Pin.GPIO1 | BC25PA | GPIO3 | +| Pin.GPIO2 | BC25PA | GPIO4 | +| Pin.GPIO3 | BC25PA | GPIO5 | +| Pin.GPIO4 | BC25PA | GPIO6 | +| Pin.GPIO5 | BC25PA | GPIO16 | +| Pin.GPIO6 | BC25PA | GPIO20 | +| Pin.GPIO7 | BC25PA | GPIO21 | +| Pin.GPIO8 | BC25PA | GPIO22 | +| Pin.GPIO9 | BC25PA | GPIO23 | +| Pin.GPIO10 | BC25PA | GPIO25 | +| Pin.GPIO11 | BC25PA | GPIO28 | +| Pin.GPIO12 | BC25PA | GPIO29 | +| Pin.GPIO13 | BC25PA | GPIO30 | +| Pin.GPIO14 | BC25PA | GPIO31 | +| Pin.GPIO15 | BC25PA | GPIO32 | +| Pin.GPIO16 | BC25PA | GPIO33 | + **Corresponding Pin Number Description of GPIO** The GPIO pin numbers provided in this document correspond to the external pin numbers of the module. For example, the GPIO1 of the EC600S-CN module corresponds to the pin number 22, which is the external pin number of the module. Uses can refer to the corresponding hardware resource to view the external pin number of the module. @@ -4231,6 +4342,9 @@ if __name__ == '__main__': Function: UART serial data transmission +* note + BC25PA platform, only uart1 is supported + ###### Constant Description | Constant | Sedcription | @@ -4341,6 +4455,37 @@ Return 0 if the execution is successful, otherwise return -1. +###### Control 485 communication direction + +> **uart.control_485(UART.GPIOn, direction)** + +Before and after the serial port sends data, pull up and down the specified GPIO to indicate the direction of 485 communication. + +- parameter + +| Parameter | Type | Description | +| --------- | ---- | ------------------------------------------------------------ | +| GPIOn | int | For the GPIO pin number to be controlled, refer to the definition of pin module | +| direction | int | 1 - Indicates that the pin level changes as follows: the serial port pulls high from low before sending data, and then pulls low from high after sending data
0 - Indicates that the pin level changes as follows: the serial port pulls low from high before sending data, and then pulls high from low after sending data | + +- Return Value + +Return 0 if the execution is successful, otherwise return -1.。 + +* note + + The BC25PA platform does not support this method. + +- Example + +```python +>>> from machine import UART +>>> uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0) +>>> uart1.control_485(UART.GPIO24, 1) +``` + + + ###### Usage Example ```python @@ -4634,7 +4779,25 @@ Function: The module configures I/O pins to interrupt when an external event occ | Pin.PULL_PU | -- | Pull-up mode | | Pin.PULL_PD | -- | Pull-down mode | - +Constant description for BC25PA platform +| Constant | Applicable Platform | Description | +| ---------------- | -------------------------------------- | -------------- | +| Pin.GPIO1 | BC25PA | GPIO3 | +| Pin.GPIO2 | BC25PA | GPIO4 | +| Pin.GPIO3 | BC25PA | GPIO5 | +| Pin.GPIO4 | BC25PA | GPIO6 | +| Pin.GPIO5 | BC25PA | GPIO16 | +| Pin.GPIO6 | BC25PA | GPIO20 | +| Pin.GPIO7 | BC25PA | GPIO21 | +| Pin.GPIO8 | BC25PA | GPIO22 | +| Pin.GPIO9 | BC25PA | GPIO23 | +| Pin.GPIO10 | BC25PA | GPIO25 | +| Pin.GPIO11 | BC25PA | GPIO28 | +| Pin.GPIO12 | BC25PA | GPIO29 | +| Pin.GPIO13 | BC25PA | GPIO30 | +| Pin.GPIO14 | BC25PA | GPIO31 | +| Pin.GPIO15 | BC25PA | GPIO32 | +| Pin.GPIO16 | BC25PA | GPIO33 | ###### Create ExtInt Object @@ -4785,8 +4948,8 @@ Class function: A two-wire protocol used for communication between devices. | Constant | | Applicable Platform | | ----------------- | --------------------------- | --------------------------- | -| I2C.I2C0 | I2C channel index number: 0 | EC100Y/EC600U/EC200U | -| I2C.I2C1 | I2C channel index number: 1 | EC600S/EC600N/EC600U/EC200U | +| I2C.I2C0 | I2C channel index number: 0 | EC100Y/EC600U/EC200U/BC25PA | +| I2C.I2C1 | I2C channel index number: 1 | EC600S/EC600N/EC600U/EC200U/BC25PA | | I2C.STANDARD_MODE | Standard mode | | | I2C.FAST_MODE | Fast mode | | @@ -4811,9 +4974,9 @@ Class function: A two-wire protocol used for communication between devices. | ------------- | ------------------------------------------------------------ | | EC600U | I2C0:
SCL: Pin number 11
SDA: Pin number 12
I2C1:
SCL: Pin number 57
SDA: Pin number 56 | | EC200U | I2C0:
SCL: Pin number 41
SDA: Pin number 42
I2C1:
SCL:Pin number 141
SDA:Pin number 142 | -| EC600S/EC600N | I2C1:
SCL:Pin number 57
SDA:Pin number 56 | -| EC100Y | I2C0:
SCL:Pin nu mber57
SDA:Pin number 56 | - +| EC600S/EC600N | I2C1:
SCL: Pin number 57
SDA: Pin number 56 | +| EC100Y | I2C0:
SCL: Pin number 57
SDA: Pin number 56 | +| BC25PA | I2C0:
SCL: Pin number 22
SDA: Pin number 23
I2C1:
SCL: Pin number 20
SDA: Pin number 21 | - Exmaple ```python @@ -4943,6 +5106,7 @@ Adaptation version: EC100Y (V0009) and above; EC600S (V0002) and above. | EC200U | port0:
CS:Pin number 134
CLK:Pin number 133
MOSI:Pin number 132
MISO:Pin number 131
port1:
CS:Pin number 26
CLK:Pin number 27
MOSI:Pin number 24
MISO:Pin number 25 | | EC600S/EC600N | port0:
CS:Pin number 58
CLK:Pin number 61
MOSI:Pin number 60
MISO:Pin number 59
port1:
CS:Pin number 4
CLK:Pin number 1
MOSI:Pin number 3
MISO:Pin number 2 | | EC100Y | port0:
CS:Pin number 25
CLK:Pin number 26
MOSI:Pin number 27
MISO:Pin number 28
port1:
CS:Pin number 105
CLK:Pin number 104
MOSI:Pin number 107
MISO:Pin number 106 | +| BC25PA | port0:
CS:Pin number 6
CLK:Pin number 5
MOSI:Pin number 4
MISO:Pin number 3| - Example @@ -5056,6 +5220,8 @@ Class function: This module provides control of the LCD display. Adaptation version: EC100Y(V0009) and above; EC600S(V0002) and above. +Note: The BC25PA platform does not support this module function. + ###### Create LCD Object > **lcd = LCD()** @@ -5450,6 +5616,7 @@ if __name__ == '__main__': #### qrcode- QR Code Display Module function: Generate the corresponding QR code according to the input content. +Note: The BC25PA platform does not support this module function. > ​ qrcode.show(qrcode_str,magnification,start_x,start_y,Background_color,Foreground_color) @@ -5499,6 +5666,9 @@ wakelock's Identification number Successful execution. -1 Failed execution. +* note + + The BC25PA platform does not support this method. ##### Delete wake_lock Lock @@ -5517,6 +5687,9 @@ It deletes wake_lock lock. 0 Successful execution. +* note + + The BC25PA platform does not support this method. ##### Lock @@ -5535,6 +5708,9 @@ It deletes wake_lock lock. -1 Failed execution. +* note + + The BC25PA platform does not support this method. ##### Release Lock @@ -5555,7 +5731,9 @@ It releases lock. -1 Failed execution. +* note + The BC25PA platform does not support this method. ##### Automatic Sleep Mode Control @@ -5589,6 +5767,9 @@ NA It returns the number of wakelock locks that have been created. +* note + + The BC25PA platform does not support this method. ##### Example @@ -5804,6 +5985,8 @@ print(r.group(0)) #### wifiScan +Note: The BC25PA platform does not support this module function. + ##### Determine whether wifiScan is supported > **wifiScan.support()** @@ -6067,6 +6250,7 @@ wifi list:(2, [('F0:B4:29:86:95:C7': -79),('44:00:4D:D5:26:E0', -92)]) #### ble - Bluetooth Low Energy Module function: provide function of BLE GATT Server. Currently only 200U/600U modules support BLE. +Note: The BC25PA platform does not support this module function. ##### Initialize BLE and Register Callback Function @@ -7201,7 +7385,7 @@ if __name__ == '__main__': #### camera - Camera and Code Scan Module function: Preview, camera, video recorder, code scan (currently only preview and code scan are supported.) - +Note: The BC25PA platform does not support this module function. ##### Preview @@ -7423,7 +7607,7 @@ Scandecode.callback(callback) Module function: Get positioning data from GPS model of L76 module, including whether the module locates successfully, latitude, longitude, UTC time, positioning mode, number of satellites, number of visible satellites, azimuth angle, speed over the ground, geodetic height and so on. - +Note: The BC25PA platform does not support this module function. ###### Turn on GNSS Port to Read and Parse GNSS Data diff --git a/en-us/api/QuecPythonThirdlib.md b/en-us/api/QuecPythonThirdlib.md index 41ef9a1..1240347 100644 --- a/en-us/api/QuecPythonThirdlib.md +++ b/en-us/api/QuecPythonThirdlib.md @@ -1,5 +1,7 @@ #### aLiYun - Alibaba Cloud Service +Note: The BC25PA platform does not support this module function. + ##### Configure the Product and Device Information of Alibaba Cloud loT Suite Function : This module provides Alibaba Cloud loT suite client function. The current product node type only supports "device" and device authentication mode supports "unique-certificate-per-device authentication" and "unique-certificate-per-product authentication". @@ -276,6 +278,8 @@ if __name__ == '__main__': Function: This module provides Tencent Cloud loT suite client function. The current product node type only supports "device" and device authentication mode supports "unique-certificate-per-device authentication" and "unique-certificate-per-product authentication". +Note: The BC25PA platform does not support this module function. + ##### Configure the Product and Device Information of Tentent Cloud loT Suite. > **TXyun(productID, devicename, devicePsk, ProductSecret)** @@ -526,6 +530,8 @@ if __name__ == '__main__': Function: This module provides HTTP Client related Functions. +Note: The BC25PA platform does not support this module function. + ##### Send the GET Request > **request.get(url, data, headers,decode,sizeof,ssl_params)** @@ -1502,6 +1508,8 @@ if __name__ == '__main__': Function: This module provides the interface fir time synchronization. +Note: The BC25PA platform does not support this module function. + ##### Return the Current NTP Server Address > **ntptime.host** @@ -1619,6 +1627,7 @@ system.replSetEnable(1) # Enable interactive protection. #### ussl-SSL Algorithm +Note: The BC25PA platform does not support this module function. SSL cipher suite supports the algorithm as following: diff --git a/zh-cn/api/QuecPythonClasslib.md b/zh-cn/api/QuecPythonClasslib.md index fafb149..2929116 100644 --- a/zh-cn/api/QuecPythonClasslib.md +++ b/zh-cn/api/QuecPythonClasslib.md @@ -75,6 +75,10 @@ myprint() 成功返回整型值0,失败返回整型值-1。 +* 注意 + + BC25PA不支持此方法。 + * 示例 ```python @@ -106,6 +110,10 @@ myprint() 成功返回整型值0,失败返回整型值-1。 +* 注意 + + BC25PA不支持此方法。 + * 示例 ```python @@ -132,6 +140,10 @@ myprint() 注册失败返回整型-1,成功返回整型0。 +* 注意 + + BC25PA不支持此方法。 + * 示例 ```python @@ -286,6 +298,10 @@ if __name__ == '__main__': 模块功能:提供基站定位接口,获取坐标信息。 +* 注意 + + BC25PA平台不支持此模块。 + ##### 获取坐标 > **cellLocator.getLocation(serverAddr, port, token, timeout, profileID)** @@ -396,6 +412,10 @@ if __name__ == '__main__': 成功返回string类型的phone number,失败返回整型-1。 +* 注意 + + BC25PA不支持此方法。 + * 示例 ```python @@ -460,6 +480,10 @@ if __name__ == '__main__': 成功返回整型0,失败返回整型-1。 +* 注意 + + BC25PA平台PIN密码最大支持八位。 + * 示例 ```python @@ -485,6 +509,10 @@ if __name__ == '__main__': 成功返回整型0,失败返回整型-1。 +* 注意 + + BC25PA平台PIN密码最大支持八位。 + * 示例 ```python @@ -510,6 +538,10 @@ sim卡PIN码验证。需要在调用sim.enablePin(pin)成功之后,才能进 验证成功返回整型0,验证失败返回整型-1。 +* 注意 + + BC25PA平台PIN密码最大支持八位。 + * 示例 ```python @@ -536,6 +568,10 @@ sim卡解锁。当多次错误输入 PIN/PIN2 码后,SIM 卡状态为请求 PU 解锁成功返回整型0,解锁失败返回整型-1。 +* 注意 + + BC25PA平台PIN密码最大支持八位。 + * 示例 ```python @@ -562,6 +598,10 @@ sim卡解锁。当多次错误输入 PIN/PIN2 码后,SIM 卡状态为请求 PU 更改成功返回整型0,更改失败返回整型-1。 +* 注意 + + BC25PA平台PIN密码最大支持八位。 + * 示例 ```python @@ -602,6 +642,10 @@ sim卡解锁。当多次错误输入 PIN/PIN2 码后,SIM 卡状态为请求 PU `phone_number` – 电话号码,string类型 +* 注意 + + BC25PA平台不支持此方法。 + * 示例 ```python @@ -636,6 +680,10 @@ sim卡解锁。当多次错误输入 PIN/PIN2 码后,SIM 卡状态为请求 PU 写入成功返回整型0,写入失败返回整型-1。 +* 注意 + + BC25PA平台不支持此方法。 + 示例 ```python @@ -663,6 +711,10 @@ sim卡解锁。当多次错误输入 PIN/PIN2 码后,SIM 卡状态为请求 PU 注册成功返回整型0,失败返回整型-1。 +* 注意 + + BC25PA平台不支持此方法。 + * 示例 ```python @@ -694,6 +746,10 @@ sim.setCallback(cb) 设置成功返回整型0,设置失败返回整型-1。 +* 注意 + + BC25PA平台不支持此方法。 + 示例 ```python @@ -725,6 +781,10 @@ sim.setCallback(cb) `insertlevel` – 高低电平配置(0/1) +* 注意 + + BC25PA平台不支持此方法。 + 示例 ```python @@ -740,6 +800,8 @@ sim.setCallback(cb) 说明:4G only的版本必须打开volte才能正常使用电话功能。 +注意:BC25PA平台不支持此模块。 + ##### 设置自动应答时间 > **voiceCall.setAutoAnswer(seconds)** @@ -929,6 +991,8 @@ def voice_callback(args): 说明:当前QuecPython底层为非volte版本,暂不支持电信发送短信。 +注意:BC25PA平台不支持此模块。 + ##### 发送TEXT类型消息 > **sms.sendTextMsg(phoneNumber, msg, codeMode)** @@ -1359,7 +1423,9 @@ sms.setCallback(cb) 设置成功返回整型值0,设置失败返回整型值-1。 +* 注意 + BC25PA平台不支持此方法。 ##### 获取当前APN @@ -1377,7 +1443,9 @@ sms.setCallback(cb) 成功返回获取到的APN,失败返回整型值-1。 +* 注意 + BC25PA平台不支持此方法。 ##### 获取csq信号强度 @@ -1508,6 +1576,10 @@ LTE网络系统返回值说明 | 17 | UMTS_LTE, dual link. not supported in EC100Y and EC200S | | 18 | GSM_UMTS_LTE, dual link. not supported in EC100Y and EC200S | +* 注意 + + BC25PA平台不支持此方法。 + * 示例 ```python @@ -1534,6 +1606,9 @@ LTE网络系统返回值说明 设置成功返回整型值0,设置失败返回整型值-1。 +* 注意 + + BC25PA平台不支持此方法。 ##### 获取网络配置模式 @@ -1909,6 +1984,8 @@ LTE list: 模块功能:checkNet模块主要用于【开机自动运行】的用户脚本程序,该模块提供API用来阻塞等待网络就绪,如果超时或者其他异常退出会返回错误码,所以如果用户的程序中有涉及网络相关的操作,那么在用户程序的开始应该调用 checkNet 模块中的方法以等待网络就绪。当然,用户也可以自己实现这个模块的功能。 +注意:BC25PA平台不支持此模块。 + ##### 创建checkNet对象 > **import checkNet** @@ -2157,6 +2234,9 @@ fota_obj.httpDownload(url1="http://www.example.com/fota1.bin",url2="http://www.e 写入成功返回整型值0,写入失败返回值整型值-1。 +* 注意 + + BC25PA平台不支持此方法。 ##### 分步升级接口,刷新缓存数据到flash @@ -2173,6 +2253,9 @@ fota_obj.httpDownload(url1="http://www.example.com/fota1.bin",url2="http://www.e 刷新成功返回整型值0,刷新失败返回整型值-1。 +* 注意 + + BC25PA平台不支持此方法。 ##### 分步升级接口,数据校验 @@ -2189,6 +2272,10 @@ fota_obj.httpDownload(url1="http://www.example.com/fota1.bin",url2="http://www.e 检验成功返回整型值0,校验失败返回整型值-1。 +* 注意 + + BC25PA平台不支持此方法。 + * 示例 ```python @@ -2303,6 +2390,8 @@ if __name__ == '__main__': 模块功能:用户文件升级 +注意:BC25PA平台不支持此模块。 + ##### 创建app_fota对象 1. 导入app_fota模块 @@ -2378,6 +2467,8 @@ download_list = [{'url': 'http://www.example.com/app.py', 'file_name': '/usr/app 模块功能:音频播放,支持TTS、mp3以及AMR文件播放。 +注意:BC25PA平台不支持此模块。 + ##### TTS ###### 创建TTS对象 @@ -2986,6 +3077,8 @@ audio初始化未完成返回整型值-1,初始化完成返回整型值0。 适配版本:EC100Y(V0009)及以上;EC600S(V0003)及以上。 +注意:BC25PA平台不支持此模块。 + ###### 创建一个对象 > **import audio** @@ -3461,6 +3554,9 @@ while 1: 0:未知 +* 注意 + + BC25PA平台支持仅不支持重启原因5。 ###### 获取模块上次关机原因 @@ -3488,6 +3584,9 @@ while 1: 0:未知 +* 注意 + + BC25PA平台支持仅不支持此方法。 ###### 获取电池电压 @@ -3590,6 +3689,8 @@ pk.powerKeyEventRegister(pwk_callback) ##### PWM +注意:BC25PA平台支持仅不支持此模块。 + ###### 常量说明 | 常量 | 说明 | 使用平台 | @@ -3705,12 +3806,12 @@ if __name__ == '__main__': ###### 常量说明 -| 常量 | 说明 | 适用平台 | -| -------- | -------- | ---------------------------------- | -| ADC.ADC0 | ADC通道0 | EC600S/EC600N/EC100Y/EC600U/EC200U | -| ADC.ADC1 | ADC通道1 | EC600S/EC600N/EC600U/EC200U | -| ADC.ADC2 | ADC通道2 | EC600U/EC200U | -| ADC.ADC3 | ADC通道3 | EC600U | +| 常量 | 说明 | 适用平台 | +| -------- | -------- | ----------------------------------------- | +| ADC.ADC0 | ADC通道0 | EC600S/EC600N/EC100Y/EC600U/EC200U/BC25PA | +| ADC.ADC1 | ADC通道1 | EC600S/EC600N/EC600U/EC200U | +| ADC.ADC2 | ADC通道2 | EC600U/EC200U | +| ADC.ADC3 | ADC通道3 | EC600U | @@ -3790,6 +3891,8 @@ ADC功能初始化。 提供USB插拔检测接口。 +注意:BC25PA平台支持仅不支持此模块。 + ###### 创建USB对象 > from misc import USB @@ -4023,6 +4126,27 @@ usb.setCallback(usb_callback) | Pin.PULL_PU | -- | 上拉模式 | | Pin.PULL_PD | -- | 下拉模式 | +对于BC25PA平台常量说明 + +| 常量 | 适配平台 | 说明 | +| ---------------- | ------------------------ | -------- | +| Pin.GPIO1 | BC25PA | GPIO3 | +| Pin.GPIO2 | BC25PA | GPIO4 | +| Pin.GPIO3 | BC25PA | GPIO5 | +| Pin.GPIO4 | BC25PA | GPIO6 | +| Pin.GPIO5 | BC25PA | GPIO16 | +| Pin.GPIO6 | BC25PA | GPIO20 | +| Pin.GPIO7 | BC25PA | GPIO21 | +| Pin.GPIO8 | BC25PA | GPIO22 | +| Pin.GPIO9 | BC25PA | GPIO23 | +| Pin.GPIO10 | BC25PA | GPIO25 | +| Pin.GPIO11 | BC25PA | GPIO28 | +| Pin.GPIO12 | BC25PA | GPIO29 | +| Pin.GPIO13 | BC25PA | GPIO30 | +| Pin.GPIO14 | BC25PA | GPIO31 | +| Pin.GPIO15 | BC25PA | GPIO32 | +| Pin.GPIO16 | BC25PA | GPIO33 | + **GPIO对应引脚号说明** 文档中提供的GPIO引脚号对应的为模块外部的引脚编号,例如EC600S下GPIO1对应引脚号22,这里的引脚号22为模块外部的引脚编号。可参考提供的硬件资料查看模块外部的引脚编号。 @@ -4188,6 +4312,10 @@ if __name__ == '__main__': 类功能:uart串口数据传输。 +* 注意 + + BC25PA平台,仅支持UART1。 + ###### 常量说明 | 常量 | 说明 | @@ -4201,14 +4329,14 @@ if __name__ == '__main__': ###### 创建uart对象 -> **uart = UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)** +> **uart = UART(UART.UARTn, buadrate, databits, parity, stopbits, flowctl)** * 参数 | 参数 | 类型 | 说明 | | :------- | :--- | ------------------------------------------------------------ | | UARTn | int | UARTn作用如下:
UART0 - DEBUG PORT
UART1 – BT PORT
UART2 – MAIN PORT
UART3 – USB CDC PORT | -| baudrate | int | 波特率,常用波特率都支持,如4800、9600、19200、38400、57600、115200、230400等 | +| buadrate | int | 波特率,常用波特率都支持,如4800、9600、19200、38400、57600、115200、230400等 | | databits | int | 数据位(5~8),展锐平台当前仅支持8位 | | parity | int | 奇偶校验(0 – NONE,1 – EVEN,2 - ODD) | | stopbits | int | 停止位(1~2) | @@ -4315,6 +4443,10 @@ if __name__ == '__main__': 成功返回整型0,失败返回整型-1。 +* 注意 + + BC25PA平台不支持此方法。 + - 示例 ```python @@ -4619,7 +4751,26 @@ if __name__ == '__main__': | Pin.PULL_PU | -- | 上拉模式 | | Pin.PULL_PD | -- | 下拉模式 | +对于BC25PA平台常量说明 +| 常量 | 适配平台 | 说明 | +| ---------------- | ------------------------ | -------- | +| Pin.GPIO1 | BC25PA | GPIO3 | +| Pin.GPIO2 | BC25PA | GPIO4 | +| Pin.GPIO3 | BC25PA | GPIO5 | +| Pin.GPIO4 | BC25PA | GPIO6 | +| Pin.GPIO5 | BC25PA | GPIO16 | +| Pin.GPIO6 | BC25PA | GPIO20 | +| Pin.GPIO7 | BC25PA | GPIO21 | +| Pin.GPIO8 | BC25PA | GPIO22 | +| Pin.GPIO9 | BC25PA | GPIO23 | +| Pin.GPIO10 | BC25PA | GPIO25 | +| Pin.GPIO11 | BC25PA | GPIO28 | +| Pin.GPIO12 | BC25PA | GPIO29 | +| Pin.GPIO13 | BC25PA | GPIO30 | +| Pin.GPIO14 | BC25PA | GPIO31 | +| Pin.GPIO15 | BC25PA | GPIO32 | +| Pin.GPIO16 | BC25PA | GPIO33 | ###### 创建ExtInt对象 @@ -4764,8 +4915,8 @@ if __name__ == '__main__': | 常量 | | 适用平台 | | ----------------- | ----------------- | ----------------------------- | -| I2C.I2C0 | i2c 通路索引号: 0 | EC100Y/EC600U/EC200U | -| I2C.I2C1 | i2c 通路索引号: 1 | EC600S/EC600N/EC600U/EC200U | +| I2C.I2C0 | i2c 通路索引号: 0 | EC100Y/EC600U/EC200U/BC25PA | +| I2C.I2C1 | i2c 通路索引号: 1 | EC600S/EC600N/EC600U/EC200U/BC25PA | | I2C.STANDARD_MODE | 标准模式 | | | I2C.FAST_MODE | 快速模式 | | @@ -4792,7 +4943,7 @@ if __name__ == '__main__': | EC200U | I2C0:
SCL: 引脚号41
SDA: 引脚号42
I2C1:
SCL:引脚号141
SDA:引脚号142 | | EC600S/EC600N | I2C1:
SCL:引脚号57
SDA:引脚号56 | | EC100Y | I2C0:
SCL:引脚号57
SDA:引脚号56 | - +| BC25PA | I2C0:
SCL: 引脚号22
SDA: 引脚号23
I2C1:
SCL:引脚号20
SDA:引脚号21 | - 示例 ```python @@ -4917,6 +5068,7 @@ if __name__ == '__main__': | EC200U | port0:
CS:引脚号134
CLK:引脚号133
MOSI:引脚号132
MISO:引脚号131
port1:
CS:引脚号26
CLK:引脚号27
MOSI:引脚号24
MISO:引脚号25 | | EC600S/EC600N | port0:
CS:引脚号58
CLK:引脚号61
MOSI:引脚号60
MISO:引脚号59
port1:
CS:引脚号4
CLK:引脚号1
MOSI:引脚号3
MISO:引脚号2 | | EC100Y | port0:
CS:引脚号25
CLK:引脚号26
MOSI:引脚号27
MISO:引脚号28
port1:
CS:引脚号105
CLK:引脚号104
MOSI:引脚号107
MISO:引脚号106 | +| BC25PA | port0:
CS:引脚号6
CLK:引脚号5
MOSI:引脚号4
MISO:引脚号3| - 示例 @@ -5030,6 +5182,9 @@ if __name__ == '__main__': 适配版本:EC100Y(V0009)及以上;EC600S(V0002)及以上。 +* 注意 + BC25PA平台不支持此模块功能。 + ###### 创建LCD对象 > **lcd = LCD()** @@ -5411,6 +5566,9 @@ if __name__ == '__main__': 模块功能:根据输入的内容,生成对应的二维码。 +* 注意 + BC25PA平台不支持此模块功能。 + > ​ qrcode.show(qrcode_str,magnification,start_x,start_y,Background_color,Foreground_color) - 参数 @@ -5458,6 +5616,9 @@ if __name__ == '__main__': 成功返回wakelock的标识号,否则返回-1。 +* 注意 + BC25PA平台不支持此方法。 + ##### 删除wake_lock锁 @@ -5475,6 +5636,8 @@ if __name__ == '__main__': 成功返回0。 +* 注意 + BC25PA平台不支持此方法。 ##### 加锁 @@ -5491,6 +5654,8 @@ if __name__ == '__main__': 成功返回0,否则返回-1。 +* 注意 + BC25PA平台不支持此方法。 ##### 释放锁 @@ -5509,7 +5674,8 @@ if __name__ == '__main__': 成功返回0,否则返回-1。 - +* 注意 + BC25PA平台不支持此方法。 ##### 自动休眠模式控制 @@ -5543,6 +5709,8 @@ if __name__ == '__main__': 返回已创建wakelock锁的数量。 +* 注意 + BC25PA平台不支持此方法。 ##### 使用示例 @@ -5760,6 +5928,8 @@ print(r.group(0)) #### wifiScan +注意:BC25PA平台不支持此方法。 + ##### 判断是否支持 wifiScan > **wifiScan.support()** @@ -6004,6 +6174,8 @@ wifi list:(2, [('F0:B4:29:86:95:C7': -79),('44:00:4D:D5:26:E0', -92)]) 模块功能:提供 BLE GATT Server 端功能。目前仅200U/600U平台支持。 +注意:BC25PA平台不支持模块功能。 + ##### 初始化 BLE 并注册回调函数 > **ble.serverInit(user_cb)** @@ -7104,6 +7276,8 @@ if __name__ == '__main__': 模块功能:实现摄像头预览,照相机,录像机,扫码功能(目前仅支持预览和扫码功能) +注意:BC25PA平台不支持模块功能。 + ##### 预览 @@ -7329,6 +7503,9 @@ Scandecode.callback(callback) 模块功能:对L76K GPS型号进行数据获取,可以得到模块定位是否成功,定位的经纬度数据,UTC授时时间,获取GPS模块的定位模式,获取GPS模块定位使用卫星数量,获取GPS模块定位可见卫星数量,获取定位方位角,GPS模块对地速度,模块定位大地高等数据信息。 +* 注意 + BC25PA平台不支持模块功能。 + > 暂时只支持EC600U CNLB ##### 打开GNSS串口,读取并解析GNSS数据 @@ -7517,96 +7694,3 @@ if __name__ == '__main__': 0.0 ``` - - - - -#### SecureData - 安全数据区 - -模块功能:模组提供一块裸flash区域及专门的读写接口供客户存贮重要信息,且信息在烧录固件后不丢失(烧录不包含此功能的固件无法保证不丢失)。提供一个存储和读取接口,不提供删除接口。 - -> 目前只支持EC600N、EC600S系列项目 - -##### 数据存储 - -SecureData.Store(index,databuf,len) - -- **参数** - -| 参数 | 类型 | 说明 | -| :------ | :-------- | ------------------------------------------------------------ | -| index | int | index范围为1-16:
1 - 8 最大存储50字节数据
9 - 12 最大存储100字节数据
13 - 14 最大存储500字节数据
15 - 16 最大存储1000字节数据 | -| databuf | bytearray | 待存储的数据数组 | -| len | int | 要写入数据的长度 | - -存储时按照databuf和len两者中长度较小的进行存储 - -**返回值** - --1: 参数有误 - -0: 执行正常 - - - -##### 数据读取 - -SecureData.Read(index,databuf,len) - -- **参数** - -| 参数 | 类型 | 说明 | -| :------ | :-------- | ----------------------------------------------- | -| index | int | index范围为1-16:
读取存储数据对应的索引号 | -| databuf | bytearray | 存储读取到的数据 | -| len | int | 要读取数据的长度 | - -若存储的数据没有传入的len大,则返回实际存储的数据长度 - -**返回值** - --2: 存储数据不存在且备份数据也不存在 - --1: 参数有误 - -其他 : 实际读取到的数据长度 - - - -- **示例** - -```python -import SecureData - -# 即将存储的数据buf -databuf = '\x31\x32\x33\x34\x35\x36\x37\x38' - -# 在index为1的存储区域中存储长度为8的数据databuf -SecureData.Store(1, databuf, 8) - -# 定义一个长度为20的数组用于读取存储的数据 -buf = bytearray(20) - -# 读取index为1的存储区域中的数据至buf中,将读取到数据的长度存储在变量len中 -len = SecureData.Read(1, buf, 20) - -# 输出读到的数据 -print(buf[:len]) -``` - - - -- **执行结果** - -```python ->>> import SecureData ->>> databuf = '\x31\x32\x33\x34\x35\x36\x37\x38' ->>> SecureData.Store(1, databuf, 8) -0 ->>> buf = bytearray(20) ->>> len = SecureData.Read(1, buf, 20) ->>> print(buf[:len]) -bytearray(b'12345678') ->>> -``` - diff --git a/zh-cn/api/QuecPythonThirdlib.md b/zh-cn/api/QuecPythonThirdlib.md index 281601e..b7d02cd 100644 --- a/zh-cn/api/QuecPythonThirdlib.md +++ b/zh-cn/api/QuecPythonThirdlib.md @@ -4,6 +4,8 @@ 模块功能:阿里云物联网套件客户端功能,目前的产品节点类型仅支持“设备”,设备认证方式支持“一机一密和“一型一密”。 +注意:BC25PA平台不支持模块功能。 + > **aLiYun(productKey, productSecret, DeviceName, DeviceSecret)** 配置阿里云物联网套件的产品信息和设备信息。 @@ -276,6 +278,8 @@ if __name__ == '__main__': 模块功能:腾讯云物联网套件客户端功能,目前的产品节点类型仅支持“设备”,设备认证方式支持“一机一密和“动态注册认证”。 +注意:BC25PA平台不支持模块功能。 + ##### 配置腾讯云物联网套件的产品信息和设备信息 > **TXyun(productID, devicename, devicePsk, ProductSecret)** @@ -526,6 +530,8 @@ if __name__ == '__main__': 模块功能:HTTP客户端的相关功能函数。 +注意:BC25PA平台不支持模块功能。 + ##### 发送GET请求 > **request.get(url, data, headers,decode,sizeof,ssl_params)** @@ -1503,6 +1509,8 @@ if __name__ == '__main__': 模块功能:该模块用于时间同步。 +注意:BC25PA平台不支持模块功能。 + ##### 返回当前的ntp服务器 > **ntptime.host** @@ -1621,6 +1629,9 @@ system.replSetEnable(1) # 开启交互保护 #### ussl-SSL算法 +* 注意 + BC25PA平台不支持模块功能。 + ssl加密算法套件支持 | 算法套件 |