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

nrf51822 password on characteristic

Good evening. I write a project on nrf51822 in which there are a number of services with a set of characteristics (write and read). I need to limit access to some characteristics with a password. Is it possible?

Parents
  • Yes. You can achieve this by setting the authorization flag (rd_auth and wr_auth for read and write authorization respectively) in the ble_gatts_attr_md_t type for a characteristic when initializing it. This allows you to intercept the write and read requests to decide whether the requests should be accepted or not.

    Here is the message flow chart for the write request with authorization.

    In general the message flow charts is good to use to see how this stuff works. You find them all here for the s130 v2.0.1.

Reply
  • Yes. You can achieve this by setting the authorization flag (rd_auth and wr_auth for read and write authorization respectively) in the ble_gatts_attr_md_t type for a characteristic when initializing it. This allows you to intercept the write and read requests to decide whether the requests should be accepted or not.

    Here is the message flow chart for the write request with authorization.

    In general the message flow charts is good to use to see how this stuff works. You find them all here for the s130 v2.0.1.

Children
Related