B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent

From MozillaWiki
< B2G‎ | Bluetooth‎ | WebBluetooth-v2
Revision as of 14:32, 2 March 2014 by Eric30 (talk | contribs) (Created page with "== Overview == BluetoothPairingEvent is carried as the argument of pairing related event handlers, such as adapter.ondisplaypasskeyreq(), adapter.onenterpasskeyreq() and adapt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

BluetoothPairingEvent is carried as the argument of pairing related event handlers, such as adapter.ondisplaypasskeyreq(), adapter.onenterpasskeyreq() and adapter.onpairingconfirmationreq(). Applications can get information about the address of the remote pairing device and the passkey which should be displayed on local UI.

Interface

interface BluetoothPairingEvent : Event
{
  readonly attribute DOMString address;
  readonly attribute unsigned long? passkey;
};

Attributes

address

Description
The address of remote pairing Bluetooth device.
Value type
DOMString
Default value
""

passkey

Description
A passkey may be generated during the pairing process when both devices support secure simple pairing(SSP). Although BluetoothPairingEvent would be used in several event handlers, only the one fired with adapter.ondisplaypasskeyreq() will have passkey being set. For other cases, this value should be set to null.
Value type
unsigned long?
Default value
null