Hi,
I have Six services in my project to be advertised and make available to the user at a time.
- first I have faced problem while advertising two vendor UUID's.I solved that issue by adverting one in advertising packet and the other in scan response packet.
- Next I tried advertising three vendor UUID's.I was unable to advertise and then I was suggested by nRF Engineer to use EA as done in ble_app_rscs example.
- I did the same but I was able to advertise services but unable to scan services on nRF Connect for mobile.And it is same with ble_app_rscs.Then after going through several posts with similar issues I understood that it is most likely due to the Phone not supporting AE.
- And then I was suggested that If I am unable to use AE, there is no way to advertise more than two vendor UUIDs simultaniously.The only way to implement is to advertise a vendor UUID, stop advertising, update your advertising packet with another UUID and start advertising again.
The link is my previous post https://devzone.nordicsemi.com/f/nordic-q-a/62153/advertising-services related to adverising services.
Before starting the procedure mentioned in last point.
when I kept on trying to advertise multiple services.In one way I was able do it.i.e I simply added services to m_adv_uuids and set appropriate value for NRF_SDH_BLE_VS_UUID_COUNT
and changed ram start location and ram maximum size.I found that five services that I have added in globally declared array i.e m_adv_uuid are able to advertise and scan on nRF Connect for mobile.
Then when I was rechecking the code I found that there is also locally declared m_adv_uuid with one service in it.I just commented it out and then tested again application then I was stuck with an error12.Again if I remove comment and check its working status then again it is able to advertise all the services which were declared globally.The below are the code snippets.
This is the globally declared array.
In below image If I remove highlighted statement it is displaying error12.If I run by including that statement then I am able to advertise all declared services.
Can you please let me know if the approach that I have implemented is correct or not?In this way I am able to make services available at a time to the user.But unable to understand what that locally declared variable is doing internally.
I even tried by changing solicitated variable with uuids_complete and uuids_mre_avaiable.I was getting same Error12.
Thanks & Regards,
Swathi P.