This Page Contains DEPRECATED INFORMATION!

BLE Security

[DEPRECATED] security.setModeLevel(mode, level)

(ref : Core Spec 4.2 Vol.3 Part.C 10)
This function use setIndicateSecurityLevel,setAuth,setEnableKeyTypes.

  • LE Security Mode 1

    • Level 1 – No security. No authentication and no encryption.
    • Level 2 – Unauthenticated pairing with encryption.
    • Level 3 – Authenticated pairing with encryption.
    • Level 4 – Authenticated Secure Connections pairing with encryption.
  • LE Security Mode 2

    • Level 1 – Unauthenticated pairing with data signing.
    • Level 2 – Authenticated pairing with data signing. (Mode 2 is only used for connection-based data signing.)

Now, we are support Mode1 level1,2 only.

This function can call once only.
If call more, call security.onerror.

To change setting, obniz Board require reboot.


obniz.ble.security.onerror = function() {
    console.error('security set params error');
    obniz.reboot();
};
security.setModeLevel(1, 2); //LE Security Mode 1, Level 2

[DEPRECATED] security.setIndicateSecurityLevel(level)

When obniz Board is pheripheral mode and a central connected,
obniz Board require to the central paring request include security level which want to use.

This function set the security level request to central.
If set 0, don't send paring request.

obniz.ble.security.setEncryptionLevel(1);

[DEPRECATED] security.setAuth([auth_type1, auth_type2 ...])

Set authorization type.

  • bonding
  • mitm
    man-in-the-middle authorization. not suppported
  • secure_connection
    not suppported
obniz.ble.security.setAuth(['bonding']);
obniz.ble.security.setAuth(['bonding','mitm','secure_connection']);

[DEPRECATED] security.setEnableKeyTypes([key_type1, key_type2 ...])

Set security keys to use.

  • LTK

    Long-Term Key
  • IRK
    Identity Resolving Key
  • CSRK
    Connection Signature Resolving Key

This function can call once only.
If call more, call security.onerror.

To change setting, obniz Board require reboot.


obniz.ble.security.onerror = function() {
    console.error('security set params error');
    obniz.reboot();
};

obniz.ble.security.setEnableKeyTypes(['IRK', 'LTK']);

[DEPRECATED] security.setKeyMaxSize(num)

[DEPRECATED] security.onerror(param)

Call when error occured.


obniz.ble.security.onerror = function() {
    console.error('security set params error');
    obniz.reboot();
};

obniz.ble.security.setEnableKeyTypes(['IRK', 'LTK']);

You will Get in Few Days

Circuit for Starter “obniz Board” is available on Amazon and other online stores.
You can get it at below

Our products and resellers

Forum

Visit our developer’s forum to discuss and discover technologies.

Forum

Contact

Feel free to contact out support and technical team.

Contact us