adv_data = bytearrayx02x01x02 + bytearraylenname + 1 0x09 + name
The code snippet is creating a byte array called "adv_data".
The byte array is constructed by concatenating three parts:
- The first part is a byte array with three elements: '\x02', '\x01', and '\x02'.
- The second part is a byte array with the length of the variable "name" plus one, and the value 0x09. The length is obtained by using the len() function on the "name" variable.
- The third part is the byte representation of the "name" variable.
Overall, the "adv_data" byte array is constructed by combining these three parts
原文地址: https://www.cveoy.top/t/topic/h8Zd 著作权归作者所有。请勿转载和采集!