In this section you will learn how to get information about detected bluetooth devices. Results might differ on different platforms as not everything is available/detectable on each platform:
For function reference and examples we assume, that we imported systeminformation as follows:
const si = require('systeminformation');
Detected Bluetooth Devices
All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|---|---|---|---|---|---|---|---|
| si.bluetoothDevices(cb) | [{...}] | X | X | X | bluetooth device informatiom | ||
| [0].device | X | X | X | device name | |||
| [0].name | X | X | X | name | |||
| [0].address | X | X | X | address | |||
| [0].batteryPercent | X | X | X | battery level percent | |||
| [0].manufacturer | X | X | X | manufacturer | |||
| [0].type | X | type of device | |||||
| [0].connected | X | connected | |||||
Example
[
{
id: 0,
name: 'MacBook Microphone',
manufacturer: 'Apple Inc.',
revision: null,
driver: null,
default: true,
channel: 'Built-In',
in: true,
out: false,
status: 'online'
},
{
id: 1,
name: 'MacBook Speaker',
manufacturer: 'Apple Inc.',
revision: null,
driver: null,
default: true,
channel: 'Built-In',
in: false,
out: true,
status: 'online'
}
]
| |||||||