Respected nordic community,
I am working on one project where right now i try to make custom service read operation through nrf52832 in segger studio. From my device(mobile), i have done write operation throgh custom service and try to do same with read. But the problem is when i am doing read authentication from my program and try to read in mobile application, at that time device got disconnected automatically.
so my question is where should i need to make change in code and where the problem happens in code means in which function ??
In my code, there are some place where i make changes for read operation : attr_md.rd_auth = 1;
for read operation, first i have completed all the process for write operation and then event get create for read operation in below mention function.
void ble_cus_on_ble_evt( ble_evt_t const * p_ble_evt, void * p_context)
In this function there is one case ( case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST:) where process goes in and i did not make any changes in this case, simply i just check event gets generate or not. But, because of event generate, my device gets disconnected. am i making right step for read operation ? is this all function right for read operation ? do i need and other function or do need to make other any changes in code. ?
if this information is not enough i can upload my code too. please reply me for that.
If possible write all step for custom service read authentication .
Please reply as soon as possible.
Thanking you,
Regards
Urvisha Andani