We have a system which a BLE peripheral. It implements a set of characteristics for reading and then writing. We have implemented a write indication handler for a particular characteristic. This characteristic is 64 bytes long. When the central side of the connection writes this characteristic (using write-with-response) we run a ECDSA signature verification process inside the method pointed to by the app_process_catch_rest_cb. This operation takes approximately 1.2 seconds, which means that the handler is blocked in the CUSTS1_VAL_WRITE_IND handling inside the app_process_catch_rest_cb. This makes the central (iOS in this case) drop the connection, because the Supervision Timeout is 720ms (iOS specific).
We need to defer this ECDSA signature verification to some kind of "background thread" in the Dialog BLE SDK, but we have no knowledge of where to start looking.
Is there a Dialog/RiveraWave way of doing this in the 6.0.6 SDK on the 14585?
Hitly@xtel.dk,
The DA1458x products do not have a scheduler that can schedule the tasks into smaller processes in order to reduce the execution time of a task. The 1.2 sec execution time is too much. A possible solution might be to devide somehow the process and put ECDSA signature verification code snippet into app_on_ble_powered callback function.
Thanks, PM_Dialog
This is exactly what we expected, but wanted to see if there were some kind of other solution than the one suggested here. We have been investigating different devices; MacBook, iPhone and Android and they all have different initial Supervision Timeout parameters. 720 ms (iPhone), 2000 ms (MacBook) and 5000 ms (Android - Note 8). We have then been looking into the code for an initial Supervision Timeout parameter, but it does not seem to change anything. We have also been looking into the following document from Applehttps://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf(11.6节)。
Can you point out to us, how to change the initial connection paramters in the Dialog SDK. We expect it to be the "user_connection_param_conf" in the user_config.h file. But it does not seem to change anything.
Hitly@xtel.dk,
The user_connection_param_conf is for configuring the update connection parameters. Could you please check the user_gapm_conf structure placed into the user_config.h header file of the SDK?
Thanks, PM_Dialog