disconnection after 20 seconds when notifying

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

I've written a simple program to test the BLE notifications.

   

This will update a counter every 2 seconds.

   

After about 20-24 seconds with connection is lost.

   

I've attached my code, if someone could have a look and tell me where i'm going wrong.

   

kind regard,

   

Damian

0 Likes
1 Solution
Anonymous
Not applicable

Hi bobgoar,

   

thanks for your feedback.

   

In CySmart, were you presssing the notify button to start receiving the notifications? I've found that the timeout would occur once i pressed this button. I'm assuming that this sends a write request that i wasn't responding to.

   

I've added code to respond to it, and now it works fine. 

   

originally i thought notifications would already be enabled as that is how i set it up the CCCD in the component profile. Apparently that's not how it works.

   

 thanks for your time, i appreciate it.

   

regards,

   

Damian

View solution in original post

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Damian,

   

Could you please let us know whether you are testing the project on pioneer kit or custom board?

   

Have you checked the Disconnect reason on UART?

   

Thanks,
Anjana

0 Likes
Anonymous
Not applicable

Hi Anjana,

   

i am using the CY8kit-042 BLE with the 022001-EVAL plugin board

   

on the uart the last event code is 40 decimal and previous to that is 66.

   

regards,

   

damian

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Daman_Aus Well I am not seeing your issue on my system.  I Press the reset button and the Green Advertising green led comes on and then I open CySmart on my Phone and I get a 65 and then a 39 then a message that says Device Gap Connected then an Event code of 42 I didn't experience the time out you saw.  Right now it has been on for over 2 minutes and the Blue led is on. 

0 Likes
Anonymous
Not applicable

Hi bobgoar,

   

thanks for your feedback.

   

In CySmart, were you presssing the notify button to start receiving the notifications? I've found that the timeout would occur once i pressed this button. I'm assuming that this sends a write request that i wasn't responding to.

   

I've added code to respond to it, and now it works fine. 

   

originally i thought notifications would already be enabled as that is how i set it up the CCCD in the component profile. Apparently that's not how it works.

   

 thanks for your time, i appreciate it.

   

regards,

   

Damian

0 Likes