Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.
This API is available on Firefox OS for internal applications only.
Summary
The BluetoothDevice API provides information regarding a given Bluetooth device.
Interface overview
interface BluetoothDevice: EventTarget
{
readonly attribute DOMString address;
readonly attribute boolean connected;
readonly attribute unsigned long class;
readonly attribute DOMString icon;
readonly attribute DOMString name;
readonly attribute boolean paired;
readonly attribute DOMString[] services;
readonly attribute DOMString[] uuids;
};
Properties
BluetoothDevice.addressRead only- A string representing the address of the device on the Bluetooth micro-network.
BluetoothDevice.connectedRead only- A boolean indicating if the device is connected to the adapter (
true) or not (false). BluetoothDevice.classRead only- A number representing the Bluetooth "Class of Device" number for the device.
BluetoothDevice.iconRead only- A string indicating which kind of icon could be used to represent the device.
BluetoothDevice.nameRead only- The human readable name of the device.
BluetoothDevice.pairedRead only- A boolean indicating if the device is paired to the adapter (
true) or not (false). BluetoothDevice.servicesRead only- An
Arrayof strings indicating what kind of Bluetooth services the device is able to provide. BluetoothDevice.uuidsRead only- An
Arrayof strings indicating the UUIDs of each Bluetooth service the device is able to provide.
Methods
None.
Specification
Not part of any specification yet. It should be discussed as part of the W3C's System Applications Working Group.