Hi Lukasz, > > > > In my thought , this method user also can get signd_cnt after signed_write_cmd. > > In encode_pdu function, after we encode pdu with CSRK, then it will > > update sign_cnt in the bt_att structure for next signed write command. > > > > If client of bt_att need to update its sign_cnt in the storage, when > > bt_att_send for SIGNED_WRITE_COMMAND return ture, user can call > > bt_att_get_local_csrk to get newest sign_cnt and store it. > > The thing is that it is not "if". We need to make sure that sign counter is updated > in the database and I think that having callback is convenient for that. Of course you > can have some helper which retrieves sign counter after each att transaction and > then store it. > > We need to remember that local sign counter is valid as long as CSRK is, so in > order to do any sign write after reconnect we need to have updated sing counter, > otherwise remote will reject write command. > We can see android/gatt.c , when gatt_signed_write_cmd done, Call bt_update_sign_count to upate and store the signed_cnt. There is the same condition here. You can call bt_att_get_local_csrk to update and Store it after signed write command, it is more easy than to register callback to listen the Signed_cnt change. And I don't see any callback trigger condition for this signed_cnt parameter in the bt_att_send function. Best Regards Chaojie Gu ��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�