BLE AIOS Indications too slow?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jostc_3249391
Level 1
Level 1

Hello everyone,

I have a project that uses two CY8CKIT-042 PSoC 4 BLE Pioneer Kits, one configured as an AIOS server and the other as an AIOS client.

Within the AIOS server profile, I have an Aggregate characteristic that can be read or set for notifications or indications.  When set for notifications or indications, the Aggregate message is to be sent to the corresponding client every 40ms, roughly, but only if the BLE stack isn't busy.

The AIOS client is quite simple, taking the Aggregate data received from a notification or indication and transmitting it out a UART port, for debugging purposes.

I have an application running on a PC at the other end of the UART line listening to the messages from the AIOS client and keeping track of various things, including the average time between messages.  What I've found is that when I use notifications, the average time between the start of each message is roughly 40ms (where I expect it to be), but when I use indications, the average jumps up to 207ms.

Has anyone else encountered this issue and been able to get the average time between indications down?  If so, how were you able to do it?

NOTE: BLE stack at v3.54

Thank you,

Jon

0 Likes
1 Solution

Hi Gyan,

Thank you for your reply.

I did actually know the difference between notifications and indications (sections 4.10 and 4.11 in the Bluetooth spec. version 4.2 [Vol 3, Part G] for those who are curious).

Your point on the connection parameters was what helped my get to the heart of my issue.  For those having a similar problem, I had to set the Connection Interval Maximum to 7.5ms on the client device under GAP Settings->Connection parameters->Connection interval (the interval minimum was also set to 7.5ms).  This allowed the Aggregate to get through at an acceptable rate for our application and be able to receive a value confirmation on the server within a reasonable amount of time.  Having the connection interval so low does have an effect on power consumption though, as either BLESS and/or the CPU (I don't know what combination of the two specifically) will have to wake up out of whatever sleep mode it may be in to take care of BLE related computations (No, I didn't dig down into the stack to figure this out -- I used a scope and a resistor to measure/watch the power over J15).

Another note: Notifications appear to be affected by the connection intervals configured on the server (GAP Settings->Peripheral role->Peripheral preferred connection parameters), whereas Indications appear to be affected by the connection intervals on the client (GAP Settings->Connection parameters).

Thanks and have a great day,

Jon

View solution in original post

0 Likes
2 Replies