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

Static passkey and write_no_response

Dear All, I'm trying to set a static passkey. I have created 2 custom characterestic. One characterestic is used for notifications and the other one for writing. For communication I'm using NRF Master Control app.

When I set in my second characterestic char_md.char_props.write = 1 (write request) my program works as expected. When I connect and first time try to write something it requires the passkey, but when I change it to char_md.char_props.write_wo_resp = 1 (write command) I can write any data without typing the passkey. It doesn't require to type a passkey. Please have a look at this file how I created services and characterstics.ble_mps.c Can someone help me to solve my the problem? Thanks a lot for your help.

Harut

Parents
  • @haruthakop: It would be easier if you can send us the whole project (and the SDK version) so we can compile here.

    Have you tried to read the value back after you write ? to make sure that the write command is actually executed and the value is updated?

    Note that with write command, there will be no response from the peripheral, telling that the write was not accepted because the link is not encrypted (Insufficient Authentication) as with write request.

    And without that "Insufficient Authentication" response, the phone won't automatically trigger bonding.

Reply
  • @haruthakop: It would be easier if you can send us the whole project (and the SDK version) so we can compile here.

    Have you tried to read the value back after you write ? to make sure that the write command is actually executed and the value is updated?

    Note that with write command, there will be no response from the peripheral, telling that the write was not accepted because the link is not encrypted (Insufficient Authentication) as with write request.

    And without that "Insufficient Authentication" response, the phone won't automatically trigger bonding.

Children
Related