Is there a way to broadcast the service name in addition to service UUID in a custom service?
How can I add it to service structure ?
Is there a way to broadcast the service name in addition to service UUID in a custom service?
How can I add it to service structure ?
There isn't a name attached to any BLE service, so identifying a service by name isn't really possible in any standardized way, without the Central reading the name based on UUID from somewhere else.
OS when founds a service, in NSDictionary write kCBAdvDataServiceUUIDs as unknown + .
So, "Unknown" is, at this point, from iOS and not from nRF51822 broadcasted data.
Is it correct ?
Yes, that is correct. I'm not aware of any way you can get anything else than unknown there for custom services.
Two comments on this:
The advertisement data Service UUIDs are supported by the SoftDevice and you can include those when calling sd_ble_gap_adv_data_set(), you would need to use one of the BLE_GAP_AD_TYPE_xxBIT_SERVICE_UUID adv data types in the buffer provided.
Although you cannot name a service, you can associate a UTF-8 string with a characteristic, which is provided to the sd_ble_gatts_characteristic_add() via theses fields in ble_gatts_char_md_t:
p_char_user_desc char_user_desc_max_size char_user_desc_size
Carles
Thanks Carles.