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
2 changes: 1 addition & 1 deletion en-us/api/QuecPythonClasslib.md
Original file line number Diff line number Diff line change
Expand Up @@ -8501,7 +8501,7 @@ def ble_gatt_set_param():

| Parameter | Type | Description |
| --------- | ----- | ------------------------------------------------------------ |
| data | Array | Advertising data which is no more than 31 octets. Pay attention to the type of this parameter. The advertising data is organized in the program and it needs to be converted through bytearray() before it can be passed in to the API. As shown in below example.<br>Format of advertising data:<br>The content of advertising data. The format is the combination of length+type+data. An advertising data can contain multiple combinations in this format. For example, there are 2 combinations in the example below. The first one is "0x02, 0x01, 0x05". 0x02 means that there are 2 data - 0x01 and 0x05. 0x01 is the type; 0x05 is the specific data. The second one consists of the length obtained by the length of BLE name plus 1 (1 octet needs to be added as it contains the data that represents type), type 0x09 and the data represented by the corresponding specific encoded value of name.<br>For detailed information of type value, please refer to the following link:<br/>[Generic Access Pfofile](https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned Number Types/Generic Access Profile.pdf) |
| data | Array | Advertising data which is no more than 31 octets. Pay attention to the type of this parameter. The advertising data is organized in the program and it needs to be converted through bytearray() before it can be passed in to the API. As shown in below example.<br>Format of advertising data:<br>The content of advertising data. The format is the combination of length+type+data. An advertising data can contain multiple combinations in this format. For example, there are 2 combinations in the example below. The first one is "0x02, 0x01, 0x05". 0x02 means that there are 2 data - 0x01 and 0x05. 0x01 is the type; 0x05 is the specific data. The second one consists of the length obtained by the length of BLE name plus 1 (1 octet needs to be added as it contains the data that represents type), type 0x09 and the data represented by the corresponding specific encoded value of name.<br>For detailed information of type value, please refer to the following link:<br/>[Generic Access Pfofile](https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Generic%20Access%20Profile.pdf) |

* Return Value

Expand Down
2 changes: 1 addition & 1 deletion zh-cn/api/QuecPythonClasslib.md
Original file line number Diff line number Diff line change
Expand Up @@ -8952,7 +8952,7 @@ def ble_gatt_set_param():

| 参数 | 类型 | 说明 |
| ---- | ---- | ------------------------------------------------------------ |
| data | 数组 | 广播数据,广播数据最长不超过31个字节。注意该参数的类型,程序中组织好广播数据后,需要通过bytearray()来转换,然后才能传入接口,具体处理参考下面的示例。<br>关于广播数据的格式说明:<br>广播数据的内容,采用 length+type+data 的格式。一条广播数据中可以包含多个这种格式数据的组合,比如示例中就包含了两个,第一个是 "0x02, 0x01, 0x05",0x02表示后面有两个数据,分别是0x01和0x05,0x01即type,0x05表示具体数据;第二个是ble名称长度加1(因为还要包含一个表示type的数据,所以长度需要加1)得到的长度、type 0x09以及name对应的具体编码值表示的data组成的。<br>关于type具体值代表的含义,请参考如下连接:<br/>[Generic Access Pfofile](https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned Number Types/Generic Access Profile.pdf) |
| data | 数组 | 广播数据,广播数据最长不超过31个字节。注意该参数的类型,程序中组织好广播数据后,需要通过bytearray()来转换,然后才能传入接口,具体处理参考下面的示例。<br>关于广播数据的格式说明:<br>广播数据的内容,采用 length+type+data 的格式。一条广播数据中可以包含多个这种格式数据的组合,比如示例中就包含了两个,第一个是 "0x02, 0x01, 0x05",0x02表示后面有两个数据,分别是0x01和0x05,0x01即type,0x05表示具体数据;第二个是ble名称长度加1(因为还要包含一个表示type的数据,所以长度需要加1)得到的长度、type 0x09以及name对应的具体编码值表示的data组成的。<br>关于type具体值代表的含义,请参考如下连接:<br/>[Generic Access Pfofile](https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Generic%20Access%20Profile.pdf) |

* 返回值

Expand Down