This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding service_data to advertising (custom service)

Hi guys,

i asked a similar question [1] few days ago, but yesterday i stumbled over the "service_data" type when advertising packages.

I've written a custom service (uuid: 0x1004) with a custom base-uuid (i don't know if its necessary to mention :). Is it now possible to send additional information corresponding to this custom service? Or is the usage of the service_data just allowed for registered services of Bluetooth SIG?

ble_advdata_service_data_t 	srv_data;
uint8_array_t			   	data_array;
uint8_t						data[1];

data[0] = 0x01
data_array.p_data = data;
data_array.size = sizeof(data);
srv_data.service_uuid = SERVICE_UUID;
srv_data.data = data_array;

[...]
advdata.p_service_data_array 	= &srv_data;
advdata.service_data_count		= 1;

apparently it will be send, but in service data nothing shows up: image description

Thanks in advance, cheers!

[1] devzone.nordicsemi.com/.../

Parents
  • hi john,

    thanks for your comment. I'm not sure whats the common way is. I'm not sure.. using the manufacturers specific data portion looks little bit like an hack for me. I thought, i have a service, and i want to advertise little bit more information to this service -> service_data. But i'm not sure whats the right way is :) Is it possible to advertise the whole 128bit UUID? hm..

Reply
  • hi john,

    thanks for your comment. I'm not sure whats the common way is. I'm not sure.. using the manufacturers specific data portion looks little bit like an hack for me. I thought, i have a service, and i want to advertise little bit more information to this service -> service_data. But i'm not sure whats the right way is :) Is it possible to advertise the whole 128bit UUID? hm..

Children
No Data
Related