sdp: provide BLUETOOTH_ATTRIBUTE_SERVICE_CLASS_ID_LIST and use in device_id_sever.c

This commit is contained in:
Matthias Ringwald 2017-02-23 12:00:02 +01:00
parent c4b3290d9e
commit d38c4adf3a
3 changed files with 4 additions and 3 deletions

View File

@ -142,7 +142,7 @@
#define BLUETOOTH_ATTRIBUTE_PRINTER_ADMIN_RUI_TOP_URL 0x0378
#define BLUETOOTH_ATTRIBUTE_DEVICE_NAME 0x037A
#define BLUETOOTH_ATTRIBUTE_SERVICE_RECORD_HANDLE 0x0000
#define BLUETOOTH_ATTRIBUTE_LIST 0x0001
#define BLUETOOTH_ATTRIBUTE_SERVICE_CLASS_ID_LIST 0x0001
#define BLUETOOTH_ATTRIBUTE_SERVICE_RECORD_STATE 0x0002
#define BLUETOOTH_ATTRIBUTE_SERVICE_ID 0x0003
#define BLUETOOTH_ATTRIBUTE_PROTOCOL_DESCRIPTOR_LIST 0x0004

View File

@ -61,7 +61,7 @@ void device_id_create_sdp_record(uint8_t *service, uint32_t service_record_handl
de_add_number(service, DE_UINT, DE_SIZE_32, service_record_handle);
// 0x0001 "Service Class ID List"
de_add_number(service, DE_UINT, DE_SIZE_16, 0x0001);
de_add_number(service, DE_UINT, DE_SIZE_16, BLUETOOTH_ATTRIBUTE_SERVICE_CLASS_ID_LIST);
attribute = de_push_sequence(service);
{
de_add_number(attribute, DE_UUID, DE_SIZE_16, BLUETOOTH_SERVICE_CLASS_PNP_INFORMATION );

View File

@ -53,7 +53,8 @@ def create_pretty_define(name):
name = name.replace('-','_')
name = name.replace('PnP', 'PNP')
name = name.replace('IPv', 'IPV')
name = name.replace('ServiceClassID','')
name = name.replace('ServiceDiscoveryServerServiceClassID', 'ServiceDiscoveryServer')
name = name.replace('BrowseGroupDescriptorServiceClassID', 'BrowseGroupDescriptor')
name = name.replace('&','and')
return camel_to_underscore(name).replace('__','_').replace('3_D','3D').replace('L2_CAP','L2CAP')