收藏
回答

startBLEPeripheralAdvertising里的UUID数组为空可以发送吗?

api:startBLEPeripheralAdvertisin

设备:安卓

微信版本 8.0.10

fail:  {errMsg: "startBLEPeripheralAdvertising:fail:invalid data", errCode: 10013
    wx.openBluetoothAdapter({
      mode'peripheral',
      success: (res) => {
        wx.createBLEPeripheralServer().then(res => {
          res.server.startAdvertising({
            advertiseRequest: {
              connectable: false,
              deviceName'newDeviceName',
              serviceUuids: [],
              manufacturerData: [{
                manufacturerId'0xFF',
                manufacturerSpecificData: buffer
              }]
            },
            powerLevel'medium'
          }).then(res => {
            console.log('success: ', res)
            if (res.errCode == 0) {
              app.showT('发送成功''success'2000)
            }
          }, res => {
            console.log("fail: ", res)
          })
        })
      },
      fail: (res) => {}
    })
!!搜索ibeacons设备发现它的serviceUuids为空
回答关注问题邀请回答
收藏
登录 后发表内容