summaryrefslogtreecommitdiffstats
path: root/sdpd
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-10-10 16:37:19 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-10-10 16:37:19 +0000
commit997f32ca18683a57c1e0ca83cf17214335b5f4c3 (patch)
treedf7d1ff351611da68e911a79acb7949c6eb1ef25 /sdpd
parent38f7e247cfe425a3e7b01aa24784b10231998125 (diff)
Publish device id information through EIR
Diffstat (limited to 'sdpd')
-rw-r--r--sdpd/service.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sdpd/service.c b/sdpd/service.c
index e51f4aed..eb8d304f 100644
--- a/sdpd/service.c
+++ b/sdpd/service.c
@@ -47,6 +47,10 @@ static sdp_record_t *server = NULL;
static uint8_t service_classes = 0x00;
static service_classes_callback_t service_classes_callback = NULL;
+static uint16_t did_vendor = 0x0000;
+static uint16_t did_product = 0x0000;
+static uint16_t did_version = 0x0000;
+
/*
* List of version numbers supported by the SDP server.
* Add to this list when newer versions are supported.
@@ -162,6 +166,20 @@ void create_ext_inquiry_response(const char *name, uint8_t *data)
ptr += len + 2;
}
+ if (did_vendor != 0x0000) {
+ uint16_t source = 0x0002;
+ *ptr++ = 9;
+ *ptr++ = 0x10;
+ *ptr++ = (source & 0x00ff);
+ *ptr++ = (source & 0xff00) >> 8;
+ *ptr++ = (did_vendor & 0x00ff);
+ *ptr++ = (did_vendor & 0xff00) >> 8;
+ *ptr++ = (did_product & 0x00ff);
+ *ptr++ = (did_product & 0xff00) >> 8;
+ *ptr++ = (did_version & 0x00ff);
+ *ptr++ = (did_version & 0xff00) >> 8;
+ }
+
ptr[1] = 0x03;
for (; list; list = list->next) {
@@ -293,6 +311,10 @@ void register_device_id(const uint16_t vendor, const uint16_t product,
info("Adding device id record for %04x:%04x", vendor, product);
+ did_vendor = vendor;
+ did_product = product;
+ did_version = version;
+
record->handle = sdp_next_handle();
sdp_record_add(BDADDR_ANY, record);