# stopBluetoothDevicesDiscovery(Object object)

Stops searching for Bluetooth peripheral devices nearby. Please call this API to stop the search if the target device has been discovered.

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | V3.25.0+ | V3.25.0+ | **X** | V7.35.0+ | Preview
Web app | V3.44.0+ | V3.44.0+ | **X** | V7.35.0+ | Preview

## Input

Inherits [standard object input](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM), without extension property:

## Output

Inherits [standard object output](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM#8c92acb8), without extension property

##  Sample code

```js
tt.stopBluetoothDevicesDiscovery({ 
    success(res) {
      console.log(JSON.stringify(res));
    },
    fail(res) {
      console.log(`stopBluetoothDevicesDiscovery fail: ${JSON.stringify(res)}`);
    }
});
```

Sample return object for `success`:
```json
{
    "errMsg": "stopBluetoothDevicesDiscovery:ok"
}
```
Sample return object for `Fail`:
```json
{
    "errMsg": "stopBluetoothDevicesDiscovery:fail not init",
    "errCode": 10000
}
```

## Error code

If a `fail` object is returned, an [errCode property](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM#a825f4c8) that indicates the error code will be contained.

For more information about error codes, refer to [Bluetooth API Error Codes](https://open.feishu.cn/document/uYjL24iN/uYzNxYjL2cTM24iN3EjN).
