This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE security

Hello,

Using BLE Scanner app (available for Android), i'm able to change the device name. I can also write other values for each characteristic.

How can we protect a BLE Network from Writing ? (Read only)

Thanks.

  • Change the flags on the characteristics' meta data character properties to only have 'read', you can also set the security mode for write to 'no access'

    // configure the characteristic metadata - everything is readable only
    char_md.char_props.read = 1;
    
    // configure the attribute metadata
    BLE_GAP_CONN_SEC_MODE_SET_OPEN( &attr_md.read_perm ); 
    BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS( &attr_md.write_perm ); 
    
Related