cancel
Showing results for 
Search instead for 
Did you mean: 

BLE GATT configuration: "Number of Services must be between 1 and 5" -- why?

JBerg.4
Associate II

When configuring BLE using STM32CubeIDE Device Configuration Tool with a custom template I can only set up to 5 services and 5 characteristics per service. What is the reason for that?

Is there a possibility to set more services and characteristics per service?

STM32CubeIDE 1.6.1

STM32WB5MM-DK

Thanks!

10 REPLIES 10
Imen.D
ST Employee

Hello @JBerg.4​ and welcome to the Community :)

The maximum number of service depending GATT database defined.

So for BLE GATT configuration, define the number of services you need : CFG_BLE_NUM_GATT_SERVICES , and you must add 2 regarding additional mandatory services used by the application (This parameter should be 2 plus the number of user services).

0693W00000Ba1JFQAZ.jpgThis is descrbed in the AN5289 Application note Building wireless applications with STM32WB Series microcontrollers

When your question is answered, please close this topic by choosing "Select as Best". This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JBerg.4
Associate II

Hello Imen,

Thanks for your answer!

Even if i change CFG_BLE_NUM_GATT_SERVICES to 10 the configuration tool doesn't allow me to put a higher number than 5 for the "number of services".

0693W00000BaIM1QAN.png 

I guess it could be a bug of the tool as in the information box of "Number of characteristics", that seems to depend on that maximum number of services, too.

"Parameter of services; maximum is 5"

0693W00000BaIOMQA3.png 

Jonas

Imen.D
ST Employee

Hi @JBerg.4​ ,

Thanks for your feedback. I will share this with CubeMx team for check.

Hello @Khouloud ZEMMELI​ , @Khouloud OTHMAN​ ,

Can you please check the issue with BLE GATT configuration in CubeMx (as reported by @JBerg.4​ ) and take the necessary actions, or provide explanation if needed.

Thanks,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello @Imen DAHMEN​ , Thank you for the mention.

Could you please share your ioc file @JBerg.4​  to check it ?

Thanks, Khouloud

JBerg.4
Associate II

Hello @Khouloud ZEMMELI​,

Thanks for your answer.

I've created a new project based on the STM32WB5MMG-DK called "BLE_Test" and attached it to this message. (not configured completely yet)

Thanks for your help!

Jonas

Hello @JBerg.4​ 

Sorry for the delay,

I'm back again to inform you that your request is internally under analysis, I'll keep you updated.

Thanks, Khouloud

FDESS.2
Associate II

Hello,

To see if the maximum number of services is a limitation of cubeMX, I add manually other services and increased CFG_BLE_NUM_GATT_SERVICES constant to 10, but after 5 call of aci_gatt_add_service() with differents defined services, the 6st call fail with a return code 0x48 (BLE_STATUS_OUT_OF_MEMORY).

I also added manually more than 5 characteritics for one service with aci_gatt_add_char() function, but I didn't reach a limitation in that case.

So is there a limitation in the BLE stack about the number of primary services ? Is it possible to share more memory to increase the number of services ?

Thank you for your help,

Fabien.

Lotta
Associate II

Hello @Khouloud ZEMMELI​ ,

Was there any further development on this topic. I too have the problem of services and characteristics both limited to 5 each.

I was able to manually add a 6th characteristic but the changes I had to make were to non-user-editable code and would therefore be a pain to recreate after every code generation for changes to the .ioc file.

Thank you in advance and best regards,

Carlotta

PLind.2
Associate

i also struggle here with the maximum number of characteristics possible.

is there any new information?

greets peter