Creating a New Custom Service

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
Utkarash
Offline
Last seen:12 months 3 days ago
加入: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:4 days 7 hours ago
工作人员
加入: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:12 months 3 days ago
加入:2019-01-18 06:36
Hello,

Hello,

Thank you For You Help

Thanks and Regards

Utkarash