diff --git a/src/bluetooth_sdp.h b/src/bluetooth_sdp.h index 2a424222a..b14a29472 100644 --- a/src/bluetooth_sdp.h +++ b/src/bluetooth_sdp.h @@ -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 diff --git a/src/classic/device_id_server.c b/src/classic/device_id_server.c index 9fa2ea31e..8c3e19539 100644 --- a/src/classic/device_id_server.c +++ b/src/classic/device_id_server.c @@ -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 ); diff --git a/tool/bluetooth_sdp.py b/tool/bluetooth_sdp.py index 0c8ae26a5..85adcf01c 100755 --- a/tool/bluetooth_sdp.py +++ b/tool/bluetooth_sdp.py @@ -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')