Skip to content

Bluetooth

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 systeminspector as follows:

const si = require('@ambicuity/systeminspector');

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)

FunctionResult objectLinuxBSDMacWinSunComments
si.bluetoothDevices(cb)[{...}]XXXbluetooth device informatiom
[0].deviceXdevice name
[0].nameXXXname
[0].macDeviceXXMAC address device
[0].macHostXXMAC address host
[0].batteryPercentXbattery level percent
[0].manufacturerXXmanufacturer
[0].typeXXXtype of device
[0].connectedXXconnected

Examples

Example
const si = require('@ambicuity/systeminspector');
si.bluetoothDevices().then(data => console.log(data));
json
[
  {
    device: 'Magic Mouse 2',
    name: 'My Maus',
    manufacturer: 'Broadcom (0x5, 0x240C)',
    macDevice: '10-XX-XX-XX-XX-XX',
    macHost: '20-XX-XX-XX-XX-XX',
    batteryPercent: '74%',
    type: 'Mouse',
    connected: true
  },
  {
    device: 'Magic Keyboard with Numeric Keypad',
    name: 'My Keyboard',
    manufacturer: 'Broadcom (0x5, 0x240C)',
    macDevice: '10-XX-XX-XX-XX-XX',
    macHost: '20-XX-XX-XX-XX-XX',
    batteryPercent: '75%',
    type: 'Keyboard',
    connected: true
  },
]
Inspector AI
SystemInspector AI initialized. How can I help you query your hardware?