蓝牙API搜不到设备
发布于 6 年前 作者 oxia 1347 次浏览 来自 问答

使用蓝牙API无法扫描到周边蓝牙设备,请问那里弄错了,或者漏了吗? 操作步骤如下

  1. wx.openBluetoothAdapter

返回 {openBluetoothAdapter:ok}

2. wx.getBluetoothAdapterState

返回 {

            available: true,

           discovering: false,

            getBluetoothAdapterState: ok

       }

  1. wx.startBluetoothDevicesDiscovery

返回 {

            available: true,

isDiscovering: true,

            startBluetoothDevicesDiscovery: ok

}

  1.  wx.onBluetoothAdapterStateChange

返回 {

            available: true,

discovering: true

}

  1. wx.getBluetoothDevices

返回 {

            getBluetoothDevices: ok,

            devices: []

}

  1. wx.getBluetoothAdapterState

返回 {

            available: true,

discovering: false,

            getBluetoothAdapterState: ok

}

回到顶部