Other Parts Discussed in Thread: CC2540
Hello.
In order to develop my project, I add some services to the original keyfob example.
One service has 3 characteristics, each one with a length of 256 bytes.
The second service has 1 characteristic with a length of 512 bytes.
To achieve successful trasmission of all bytes I needed to change the _ReadAttrCB routine for all services as discussed in a previous thread.
In the other side of the BLE communication, there is an application running and developed by a teammate.
At this moment, if we try to read only one of the services, the total time spent ( establish connection, data transfer and finish connection) is roughly around 2.5s-3s (Even so, i think it is very slow. Why?). Time counting is in the application.
Reading both services, there is an huge increase in reading time, more than 30s.
We tried to understand the problem, and we change array lengths in both services.
In the first service, all the characteristics length were set, each one, to only 2 bytes.
The characteristic of the second service was increased from 512 to 1024 bytes.
Reading only the second service, we get only 600 bytes from the bluetooth and take less than 3s to read.
I need your help to understand where is the problem (in cc2540 or in the application).
We also try to read only one characteristic in each connection. In the application a timer of 10ms and later of 100ms orders to establish a new connection and read a different caracteristic. This solution leads a smartphone malfunction.
Questions:
1 - Why we take so long to read one service/one characteristic? Data rate is 1Mbit/s...
2 - It is possible to know/track the problem of a maximum length of 600 bytes for one characteristic?
3 - How to decrease data transfer time for all the services? If we read, independently, the first service in 3s and the second service in 2.5s, why when we try to read both services in the same connection, we take 30s to read all the data?
Best Regards,
Tiago