Class SecureNetworkBeacon
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSecureNetworkBeacon
(byte[] beaconData) Constructs aSecureNetworkBeacon
object -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canOverwrite
(IvIndex ivIndex, Calendar updatedAt, boolean ivRecoveryActive, boolean isTestMode, boolean ivRecoveryOver42Allowed) This method returns whether the received Secure Network Beacon can override the current IV Index.byte[]
Returns the authentication value of the beaconint
Returns the beacon type valueint
getFlags()
Returns the flags of the secure network beaconReturns the iv index of the beacon or the nodebyte[]
Returns the network id of the beacon or the nodeboolean
Returns true if Key Refresh Procedure is active.toString()
-
Field Details
-
BEACON_DATA_LENGTH
public static final int BEACON_DATA_LENGTH- See Also:
-
-
Constructor Details
-
SecureNetworkBeacon
public SecureNetworkBeacon(byte[] beaconData) Constructs aSecureNetworkBeacon
object- Parameters:
beaconData
- beacon data advertised by the mesh beacon- Throws:
IllegalArgumentException
- if service data provide is invalid
-
-
Method Details
-
toString
-
getBeaconType
public int getBeaconType()Description copied from class:MeshBeacon
Returns the beacon type value- Specified by:
getBeaconType
in classMeshBeacon
-
getFlags
public int getFlags()Returns the flags of the secure network beacon -
isKeyRefreshActive
public boolean isKeyRefreshActive()Returns true if Key Refresh Procedure is active. -
getNetworkId
public byte[] getNetworkId()Returns the network id of the beacon or the node -
getIvIndex
Returns the iv index of the beacon or the node -
getAuthenticationValue
public byte[] getAuthenticationValue()Returns the authentication value of the beacon -
canOverwrite
protected boolean canOverwrite(IvIndex ivIndex, Calendar updatedAt, boolean ivRecoveryActive, boolean isTestMode, boolean ivRecoveryOver42Allowed) This method returns whether the received Secure Network Beacon can override the current IV Index.The following restrictions apply: 1. Normal Operation state must last for at least 96 hours. 2. IV Update In Progress state must take at least 96 hours and may not be longer than 144h. 3. IV Index must not decrease. 4. If received Secure Network Beacon has IV Index greater than current IV Index + 1, the device will go into IV Index Recovery procedure. In this state, the 96h rule does not apply and the IV Index or IV Update Active flag may change before 96 hours. 5. If received Secure Network Beacon has IV Index greater than current IV Index + 42, the beacon should be ignored (unless a setting in MeshNetworkManager is set to disable this rule). 6. The node shall not execute more than one IV Index Recovery within a period of 192 hours.
Note: Library versions before 2.2.2 did not store the last IV Index, so the date and IV Recovery flag are optional.
- parameters: - target: The IV Index to compare. - date: The date of the most recent transition to the current IV Index. - ivRecoveryActive: True if the IV Recovery procedure was used to restore the IV Index on the previous connection. - ivTestMode: True, if IV Update test mode is enabled; false otherwise. - ivRecoveryOver42Allowed: Whether the IV Index Recovery procedure should be limited to allow maximum increase of IV Index by 42. - returns: True, if the Secure Network beacon can be applied; false otherwise. - since: 2.2.2 - seeAlso: Bluetooth Mesh Profile 1.0.1, section 3.10.5.
-