BLE disconnections with CYBLE-224110-00.

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

cross mob
baye_4029466
Level 1
Level 1
First question asked 5 replies posted First reply posted

Hi,

We are using CYBLE-224110-00 on our device.

for a test, we used 30 devices (the BLE mode is client) connected to mobile phones in a room (the distance between the devices is ~50cm).

during the test, we get a lot of BLE disconnections.

My questions are:

1. Is there any known issue with BLE disconnections in a busy BLE environment?

2. Are there any BLE firmware configuration to control the BLE channel hopping or the channel the BLE uses while connected?

Thanks,

Barak.

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

1. Could you please check in non noisy environment and let me know your observations ? Please check the disconnection reason. In firmware, you can get the event parameter value from the CYBLE_EVT_GAP_DEVICE_DISCONNECTED event as follows:
Printf  ("Error code is: 0x%x \r\n",*(uint8 *) eventParam);
Check the error code, and find the corresponding description from the “HCI error commands”.

Please follow the below steps before programming your project.
a. Make sure you have kept Bless interrupt high priority (go to .cydwr of project -> Interrupts tab -> make bless interrupt priority to 0 (highest)).
b. Call CyBle_ProcessEvents in regular intervals. If any custom function is there which will consume more time for execution, please call CyBle_ProcessEvents inside it.
c. If you have any Interrupt routine in your project then don't write big code inside ISR. Instead, set a variable inside ISR and check the variable status and call the function in main loop.
d. Please set the ECO capacitor trim value for the CYBLE-224110-00 EZ-BLE module correctly. The trim values should be changed to the values provided by CYBLE-224110-00 EZ-BLE module’s datasheet.

2. Please refer to the below APIs in BLE component datasheet.

a. CyBle_GapcSetHostChannelClassification(uint8 *channelMap) function sets channel classification for data channels. This classification persists until it is overwritten by a subsequent call to this function or the controller is reset.
b. CyBle_GapGetChannelMap (uint8 bdHandle, uint8 *channelMap) function reads the channel map for data channels. Please refer BLE component datasheet for more information.

Thanks,
P Yugandhar.

View solution in original post

0 Likes
8 Replies
kama_1693131
Level 5
Level 5
Distributor - Marubun (Japan)
50 sign-ins 25 sign-ins 10 likes received

Hi Barak,

Following discussion is not same device, but it may helps for you.

I think 30 devices too much connections.

How many BLE peripherals can be connected over HCI on CYW43438

Thanks,

Matayoshi

0 Likes

Hello Matayoshi,

Sorry. my writing wasn't clear.

I meant I have 30 devices connected to 30 mobile phones. each device connected to a mobile phone. the problem is the BLE disconnections of few devices. (probably, the disconnection came from the mobile phone side after it didnt receive response and disconnet the device by the android layer).

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

1. Could you please check in non noisy environment and let me know your observations ? Please check the disconnection reason. In firmware, you can get the event parameter value from the CYBLE_EVT_GAP_DEVICE_DISCONNECTED event as follows:
Printf  ("Error code is: 0x%x \r\n",*(uint8 *) eventParam);
Check the error code, and find the corresponding description from the “HCI error commands”.

Please follow the below steps before programming your project.
a. Make sure you have kept Bless interrupt high priority (go to .cydwr of project -> Interrupts tab -> make bless interrupt priority to 0 (highest)).
b. Call CyBle_ProcessEvents in regular intervals. If any custom function is there which will consume more time for execution, please call CyBle_ProcessEvents inside it.
c. If you have any Interrupt routine in your project then don't write big code inside ISR. Instead, set a variable inside ISR and check the variable status and call the function in main loop.
d. Please set the ECO capacitor trim value for the CYBLE-224110-00 EZ-BLE module correctly. The trim values should be changed to the values provided by CYBLE-224110-00 EZ-BLE module’s datasheet.

2. Please refer to the below APIs in BLE component datasheet.

a. CyBle_GapcSetHostChannelClassification(uint8 *channelMap) function sets channel classification for data channels. This classification persists until it is overwritten by a subsequent call to this function or the controller is reset.
b. CyBle_GapGetChannelMap (uint8 bdHandle, uint8 *channelMap) function reads the channel map for data channels. Please refer BLE component datasheet for more information.

Thanks,
P Yugandhar.

0 Likes

Hello P Yugandhar,

Thank you for the detailed answer.

1. Sorry. my writing wasn't clear.

I meant I have 30 devices connected to 30 mobile phones. each device connected to a mobile phone. the problem is the BLE disconnections of few devices. (probably, the disconnection came from the mobile phone side after it didn't receive response and disconnect the device by the android layer).

All of the steps you mentioned are fulfilled on my firmware.

2. I will check the channels map and update.

0 Likes

Hello,

Did you got the time to check the channels map ? Could you please provide some update ?

Thanks,

P Yugandhar.

0 Likes

Hello,

Yes I did.

After connection, I used the function CyBle_GapGetChannelMap. I did it few times and the result are different each time.

These are the results:

FF,00,FE,00,1E

FF,00,FE,00,1E

11,C0,FF,00,1C

00,F0,FF,00,18

01,F0,FF,03,00

Thanks,

Barak.

0 Likes

Hello,

Did you call the API CyBle_GapcSetHostChannelClassification function for setting the channel classification for data channels? If yes, then please check the API result of the function CyBle_GapcSetHostChannelClassification. Please refer to the API description in the BLE component datasheet for more information.

Please share your project, if you are still facing any issue.

Thanks,
P Yugandhar.

0 Likes

Hello,

I just understood that my problem is not while the unit is connected by the connection itself.

It looks like if I have to many units on the same room, some are connectable (advertising every 1msec) and some are not connectable(advertising every 1 sec). it is very hard to connect to the units. I don't think it is relevant to this ticket.

Thanks anyway for the support,

Barak.

0 Likes