小程序发送广播api中advertiseRequest的deviceName参数不赋值就能正常发送,但是赋值为任意字符串或16进制字符串都会导致如下参数过长错误:
微信版本:7.0.15
调试版本:2.11.1
开发工具版本:1.02.191180
startAdvertising fail: {errCode: 10008, errMsg: "startBLEPeripheralAdvertising:fail:data too large"}
BLEPeripheralServer.startAdvertising(Object Object)
startAdvertising({
advertiseRequest: {
deviceName: "0101",
serviceUuids: [data.UUID_SERVICE],
manufacturerData: [{
manufacturerId: '0x627a',
manufacturerSpecificData: typedArray.buffer,
}]
},
上次微信回复我的这里的长度规则:
有deviceName:3+(2+deviceName.length)+2+2+manufacturerSpecificData.length+18<=31字节
无deviceName:3+2+2+manufacturerSpecificData.length+18<=31字节
文章链接:https://developers.weixin.qq.com/community/develop/doc/0002eaa8e54ef0da189a5a58b56400
你好,是Android还是iOS?请提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)