Create multiple characteristics in a single BLE 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.
6 posts / 0 new
Last post
mahmed106
Offline
Last seen:1 month 2 weeks ago
加入:2019-05-03所
Create multiple characteristics in a single BLE Service?

Hi dialog

I want to create multiple characteristics in a single service, right now i am working on pxp reporter and added my custom service from the dialog website tutorial. Its working great, but now i want to add more characteristics but cannot find an example code or tutorial.

Thanks

Device:
PM_Dialog
Offline
Last seen:2天21小时前
工作人员
加入:2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

Please check theSW Example: DA1468x BLE customer servicesoftware example from our support website. This example includes 2 custom services. The custom service 1 includes 3 characteristic declarations. Have a look at my_service_2[] structure. You can add more than 3 characteristics.

Also, you could checkCustom Bluetooth Low Energy Profileas well.

Thanks, PM_Dialog

mahmed106
Offline
Last seen:1 month 2 weeks ago
加入:2019-05-03所
I have tried this example

I have tried this example code. The services and characteristics are showing in the mobile via BLE, but i am not able to understand that how i send the data to the mobile, when i do a read request.

Where in the main application code i send the data and how. Please eleborate.

Thanks

PM_Dialog
Offline
Last seen:2天21小时前
工作人员
加入:2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

If I understood correctly, your requirement is to create a notifiable characteristic and send data to the mobile phone over notifications? Is this correct?

Thanks, PM_Dialog

mahmed106
Offline
Last seen:1 month 2 weeks ago
加入:2019-05-03所
Yes , Half part is solved as

Yes , Half part is solved as i send data as read callback, It great . Thanks to your code (y)

Now i want to work on notifiable characteristics .

PM_Dialog
Offline
Last seen:2天21小时前
工作人员
加入:2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

You should create the characteristics as the example but enable the notifications property.

Thanks, PM_Dialog