Hello Community,
According to my Applicatrion, it is so that I have to receive data from BLE App and send them to a different Device where these values are to be written. The Second device is connected to the Nordic BLE chip using UART and I am suppose to build the interface Software which translates data from App to Second Device and viceversa.
For this purpose, we have decided to use the Authorised Read and Write for every Characteristic. I have successfully implemented the Read / Write with Authorisation request- reply from BLE Chip to App. The problem is following:
On every read request, I have to coomunicate with the second device and get the data and send it as a response to the read request to the APP. And this process of communicating with the second device takes about 10 ms so that I could actually send a response with the correct data to the read request.
The same thing with the Write request, i.e when I receive data from the APP, I have to send it to my Second device and wait till it is successfully written in the second device and then send the response to the APP that the write process was successful.
But unfortunately, I am always getting the error GATT_INVALID_ATTR_LENGTH whenver I try to send a response to the write request after a few milliseconds from the write request.
All I would like to know is is it actually possible to respond with a delay. I have a read in one of the discussions, that the response should be sent within 30 sec. But 30 sec in my case is a lot and it should somehow work in my case.
If its possible, then I would like to have an example code or so where I can refer to or atleast the important points to be noted when I would like to execute the Authorisation with a delay.
Your Suggestions are highly appreciated!
Thanks and regards,
Kumar