2021-05-27 12:32 AM
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!
2021-06-03 07:56 AM
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).
This 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
2021-06-07 06:56 AM
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".
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"
Jonas
2021-06-08 06:44 AM
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
2021-06-08 07:17 AM
Hello @Imen DAHMEN , Thank you for the mention.
Could you please share your ioc file @JBerg.4 to check it ?
Thanks, Khouloud
2021-06-14 12:55 AM
2021-08-17 07:15 AM
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
2021-08-25 03:02 AM
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.
2022-12-09 02:05 AM
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
2023-02-10 12:00 AM
i also struggle here with the maximum number of characteristics possible.
is there any new information?
greets peter