Creating a New Custom Service

Learn MoreFAQsTutorials

3 posts / 0 new
Last post
Utkarash
Offline
Last seen:6 months 3 weeks ago
Joined:2019-01-18 06:36
Creating a New Custom Service

Hello All,

I am using a BLE peripheral example as a reference for developing my code.

I wanted to add a new Custom service in the same example and refering the documents and the code of BLE peripheral i Created new files for new custom service with different UUID's and name as user_cust2_svc.c and user_cust2_svc.h which replicated same as user_cust1_def.c and user_cust1_def.h .

I was able to build Code sucessfully but when check in BLE scanner i m not able to find my newly created Custom service.

So please can anyone help me at the earlyiest if am mising out on something

Thanks and Regards

Utkarash

Device:
PM_Dialog
Offline
Last seen:8 hours 45 min ago
Staff
Joined:2018-02-08 11:03
Hi Utkarash,

Hi Utkarash,

The SDK5.0.4 includes a second service as well. So, there are 2 custom service available and you could find them under sdk\ble_stack\profiles\custom\custs SDK path. In the ble_app_peripheral example, only the custom service 1 is implemented. In order to add the second service, you should do the following steps:

  • import to your project the custs2 / custs2_task under sdk_profiles folder
  • #include "custs2.h" into user_profiles_config.h’
  • #define EXCLUDE_DLG_CUSTS2 (0) into user_modules_config.h
  • Then, follow the implementation of custom service 1. Please check theTutorial 3 : Building Custom Profilestutorial form our support port. This might help you!

Thanks, PM_Dialog

Utkarash
Offline
Last seen:6 months 3 weeks ago
Joined:2019-01-18 06:36
Hello,

Hello,

Thank you For You Help

Thanks and Regards

Utkarash