Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
org.direct_bt.PairingMode Enum Reference

Bluetooth secure pairing mode. More...

Collaboration diagram for org.direct_bt.PairingMode:

Public Member Functions

 PairingMode (final byte v)
 

Static Public Member Functions

static PairingMode get (final String name) throws IllegalArgumentException
 Maps the specified name to a constant of PairingMode. More...
 
static PairingMode get (final byte value)
 Maps the specified integer value to a constant of PairingMode. More...
 

Public Attributes

 NONE =((byte)0)
 No pairing mode, implying no secure connections, no encryption and no MITM protection. More...
 
 NEGOTIATING =((byte)1)
 Pairing mode in negotiating, i.e. More...
 
 JUST_WORKS =((byte)2)
 Just Works. More...
 
 PASSKEY_ENTRY_ini =((byte)3)
 Passkey Entry input by initiator. More...
 
 PASSKEY_ENTRY_res =((byte)4)
 Passkey Entry input by responder. More...
 
 NUMERIC_COMPARE_ini =((byte)5)
 Visual comparison of digit sequence (PIN) input by initiator, shown on both devices. More...
 
 NUMERIC_COMPARE_res =((byte)6)
 Visual comparison of digit sequence (PIN) input by responder, shown on both devices. More...
 
 OUT_OF_BAND =((byte)7)
 Utilizing a second factor secret to be used as a secret, e.g. More...
 
 PRE_PAIRED =((byte)8)
 Reusing encryption keys from previous pairing. More...
 
final byte value
 

Detailed Description

Bluetooth secure pairing mode.

BT Core Spec v5.2: Vol 1, Part A, 5 Security Overview
BT Core Spec v5.2: Vol 1, Part A, 5.4 LE SECURITY
BT Core Spec v5.2: Vol 3, Part H (SM): 2.3.5.1 Selecting key generation method Table 2.8

<p<blockquote>

See get(byte) for its native integer mapping.

See also
SMPPairingState
Since
2.1.0

Definition at line 40 of file PairingMode.java.

Constructor & Destructor Documentation

◆ PairingMode()

org.direct_bt.PairingMode.PairingMode ( final byte  v)

Definition at line 96 of file PairingMode.java.

Member Function Documentation

◆ get() [1/2]

static PairingMode org.direct_bt.PairingMode.get ( final byte  value)
static

Maps the specified integer value to a constant of PairingMode.

Parameters
valuethe integer value to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type, using NONE if not supported.

Definition at line 82 of file PairingMode.java.

◆ get() [2/2]

static PairingMode org.direct_bt.PairingMode.get ( final String  name) throws IllegalArgumentException
static

Maps the specified name to a constant of PairingMode.

Implementation simply returns valueOf(String). This maps the constant names itself to their respective constant.

Parameters
namethe string name to be mapped to a constant of this enum type.
Returns
the corresponding constant of this enum type.
Exceptions
IllegalArgumentExceptionif the specified name can't be mapped to a constant of this enum type as described above.

Definition at line 73 of file PairingMode.java.

Here is the caller graph for this function:

Member Data Documentation

◆ JUST_WORKS

org.direct_bt.PairingMode.JUST_WORKS =((byte)2)

Just Works.

Random key exchange with encryption but no MITM protection.

Definition at line 46 of file PairingMode.java.

◆ NEGOTIATING

org.direct_bt.PairingMode.NEGOTIATING =((byte)1)

Pairing mode in negotiating, i.e.

Pairing Feature Exchange in progress.

Definition at line 44 of file PairingMode.java.

◆ NONE

org.direct_bt.PairingMode.NONE =((byte)0)

No pairing mode, implying no secure connections, no encryption and no MITM protection.

Definition at line 42 of file PairingMode.java.

◆ NUMERIC_COMPARE_ini

org.direct_bt.PairingMode.NUMERIC_COMPARE_ini =((byte)5)

Visual comparison of digit sequence (PIN) input by initiator, shown on both devices.

Responder produces and display artifact. Random key exchange with additional secret (PIN) and encryption and MITM protection.

Definition at line 52 of file PairingMode.java.

◆ NUMERIC_COMPARE_res

org.direct_bt.PairingMode.NUMERIC_COMPARE_res =((byte)6)

Visual comparison of digit sequence (PIN) input by responder, shown on both devices.

Initiator produces and displays artifact. Random key exchange with additional secret (PIN) and encryption and MITM protection.

Definition at line 54 of file PairingMode.java.

◆ OUT_OF_BAND

org.direct_bt.PairingMode.OUT_OF_BAND =((byte)7)

Utilizing a second factor secret to be used as a secret, e.g.

NFC field. Random key exchange with additional secret (2FA) and encryption and potential MITM protection.

Definition at line 56 of file PairingMode.java.

◆ PASSKEY_ENTRY_ini

org.direct_bt.PairingMode.PASSKEY_ENTRY_ini =((byte)3)

Passkey Entry input by initiator.

Responder produces and display artifact. A known digit sequence (PIN) must be given as a secret to be validated on the device. Random key exchange with additional secret (PIN) and encryption and MITM protection.

Definition at line 48 of file PairingMode.java.

◆ PASSKEY_ENTRY_res

org.direct_bt.PairingMode.PASSKEY_ENTRY_res =((byte)4)

Passkey Entry input by responder.

Initiator produces and display artifact. A known digit sequence (PIN) must be given as a secret to be validated on the device. Random key exchange with additional secret (PIN) and encryption and MITM protection.

Definition at line 50 of file PairingMode.java.

◆ PRE_PAIRED

org.direct_bt.PairingMode.PRE_PAIRED =((byte)8)

Reusing encryption keys from previous pairing.

Definition at line 58 of file PairingMode.java.

◆ value

final byte org.direct_bt.PairingMode.value

Definition at line 60 of file PairingMode.java.


The documentation for this enum was generated from the following file: