Adding new profile, but not 128bit UUID's

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
essele
Offline
Last seen:3 months 1 week ago
Joined:2020-12-19 15:33
Adding new profile, but not 128bit UUID's

Hi,

I would like to implement a custom profile, but for a 16bit UUID based service (Environmental Sensing for example) .. where there is currently no profile in the SDK.

How do I do that?

All the custom profile examples are for 128but UUID's and the profile/custom code uses the 128bit calls specifically ... and I just can't figure out how to get a new profile in without using the profiles/custom bits. I'm assuming something can be done with user_prf_funcs[] but I just can't find any usable examples (even the HID one still uses custs1.)

Similarly ... if I wanted to replace an existing profile/app, for example the battery service .. how would I go about that?

Are there any examples anywhere?

Many thanks,

Lee.

Device:
PM_Dialog
Offline
Last seen:9 hours 13 min ago
Staff
Joined:2018-02-08 11:03
Hi essele,

Hi essele,

Thanks for your question online and happy new year! The Environmental Sensing Service is not included in the SDK. So, you will need to implement it by your own. You can take the existing profiles as a reference: sdk\ble_stack\profiles.

After the profile development, the app_XXX.c and app_XXX_task.c files should be also developed in order to include all the implementation and the message handling for the profile level implementation.

我建议首先检查低音概要文件as it contains the application layer. The BASS profile can be found in sdk\ble_stack\profiles\bas\bass SDK path and the application layer in sdk\app_modules\src\app_bass.

With regards to your follow up question, could you please clarify it? Why do you need to replace this service?

Thanks, PM_Dialog

essele
Offline
Last seen:3 months 1 week ago
Joined:2020-12-19 15:33
Thanks for the info ...

Thanks for the info ... however you haven't explained how I get my new profile to be executed. I can create both the profile and app modules, but I can't get the profile bits included unless I change one of the SDK files .. (they seem to be included in prf.c) ... which clearly I don't want to do. Or am I missing something?

On the "replacing an existing profile" question ... it was really because I don't like the current implementation ... the BASS profile is a great example, it has a load of code in there that does stuff with GPIO's (to use an LED as an alert) ... I don't want any of that, and whilst it does support some compiler directives to limit the functionality, I still need to provide a GPIO port and pin ... I know it won't be used, but it's just horrible!

Lee.

PM_Dialog
Offline
Last seen:9 hours 13 min ago
Staff
Joined:2018-02-08 11:03
Hi There,

Hi There,

Apologies for the delay. In order to include and execute your own profile, you should just need to check how an SDK profile is included in the application code. For instance, the BASS profiles could be taken as a reference. Please take a look at out BLE SDK examples.

Thanks, PM_Dialog