Class LinuxBluetoothDevice
java.lang.Object
oshi.hardware.common.AbstractBluetoothDevice
oshi.hardware.common.platform.linux.LinuxBluetoothDevice
- All Implemented Interfaces:
BluetoothDevice
Linux Bluetooth device enumeration via BlueZ filesystem paths.
Adapters are discovered from /sys/class/bluetooth/hciX. Paired devices are read from
/var/lib/bluetooth/<adapter-mac>/<device-mac>/info.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<BluetoothDevice> Gets Bluetooth devices known to the system.Methods inherited from class AbstractBluetoothDevice
getAdapterName, getAddress, getBatteryLevel, getMajorDeviceClass, getName, isConnected, isPaired, parseMajorDeviceClass, toStringModifier and TypeMethodDescriptionThe name of the adapter (e.g.,hci0) through which this device is known.The MAC address of the Bluetooth device in colon-separated format (e.g.,AA:BB:CC:DD:EE:FF).intThe battery level of the device as a percentage (0–100).The major Bluetooth device class (e.g., "Audio", "Phone", "Computer", "Peripheral", "Networking").getName()The user-visible name of the Bluetooth device.booleanWhether the device is currently connected to this system.booleanisPaired()Whether the device is paired (bonded) with this system.static StringparseMajorDeviceClass(int cod) Parses the major device class from the Bluetooth Class of Device (CoD) integer.toString()
-
Method Details
-
getBluetoothDevices
Gets Bluetooth devices known to the system.- Returns:
- a list of
BluetoothDeviceobjects
-