adding Additional Protocol Descriptor List
Hi Marcel,
I have tried writing code to add the Additional Protocol Descriptor List. But it seems that the data still cannot be added as a 3-level sequence (sequence of a sequence of a sequence). The data I added for the Additional Protocol Descriptor List still look similar to the Protocol Descriptor List (2-level sequence of data).
Here is the code corresponding to adding the SDP attribute:
int sdp_set_add_access_protos(sdp_record_t *rec, const sdp_list_t *ap)
{
const sdp_list_t *p; const sdp_list_t *pp;
sdp_data_t *protos = 0;
for (p = ap->data; p; p = p->next) {
sdp_data_t *seq = access_proto_to_dataseq2(rec, (sdp_list_t *)p->data);
protos = sdp_seq_append(protos, seq); // protos = seq;
} sdp_attr_add(rec, SDP_ATTR_ADD_PROTO_DESC_LIST, protos); return 0;
}
int add_additional_proto(void)
{
/* Add Additional Protocol Descriptor List */ sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID); proto2[0] = sdp_list_append(0, &l2cap_uuid); apseq3 = sdp_list_append(0, proto2[0]); apseq2 = sdp_list_append(0, apseq3); sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID); proto2[1] = sdp_list_append(0, &rfcomm_uuid); channel2 = sdp_data_alloc(SDP_UINT8, &chan2); proto2[1] = sdp_list_append(proto2[1], channel2); apseq3 = sdp_list_append(apseq3, proto2[1]); sdp_uuid16_create(&obex_uuid, OBEX_UUID); proto2[2] = sdp_list_append(0, &obex_uuid); apseq3 = sdp_list_append(apseq3, proto2[2]); addproto = sdp_list_append(0, apseq3); sdp_set_add_access_protos(&record, addproto);
return 0;
}
As you can see, I changed the attribute ID to correspond to SDP_ATTR_ADD_PROTO_DESC_LIST (0x000d) in the sdp_set_add_access_protos(). However, the data was not added correctly. I would like to ask in what other parts of the code should I make corresponding changes to add the sdp data correctly.
Thank you for your time and efforts.
Arch Sayo
Hi Arch,
Quoted 1 line
Thank you with that information on adding the 1284ID
attribute.
you are welcome. I assume it is working perfect now.
Quoted 1 line
Now, I am trying to add the Additional Protocol
Descriptor List to my
Quoted 1 line
sdp record. The Additional Protocol Descriptor List
is almost similar
Quoted 1 line
to the Protocol Descriptor List. The only difference
is that while the
Quoted 1 line
Protocol Descriptor List is a sequence of a sequence
of data (2
Quoted 1 line
levels), the Additional Protocol Descriptor List is
a sequence of a
Quoted 1 line
sequence of a sequence of data (3 levels) .I tried
doing this using
Quoted 1 line
the function
sdp_set_access_protos()and just
substituting the
Quoted 1 line
Attribute ID in the function from
SDP_ATTR_PROTO_DESC_LIST to
Quoted 1 line
SDP_ATTR_ADD_PROTO_DESC_LIST. However, as you may
already know, this
Quoted 1 line
will not solve it since the Protocol Descriptor List
is only a
Quoted 3 lines
sequence of a sequence.
In this regard, I would like to ask how I will be
able to add a
Quoted 1 line
sequence of a sequence of a sequence of data to my
sdp record. Or in
Quoted 1 line
other words, how will I add the Additional Protocol
Descriptor List to
Quoted 1 line
my sdp record.
And again Collin already ran into the same problem, because you also
need them for HID. So I think we need a sdp_set_add_access_protos()
function for this job. Feel free to send me a patch.
Regards
Marcel
---------------------------------
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
Marcel Holtmann
maintainerHi Arch,
Quoted 5 lines
I have tried writing code to add the Additional Protocol Descriptor List. But it seems that the data still cannot be added as a 3-level sequence (sequence of a sequence of a sequence). The data I added for the Additional Protocol Descriptor List still look similar to the Protocol Descriptor List (2-level sequence of data).
you should coordinate with Collin, because he also needs this.
Quoted 2 lines
<
SPAN style="mso-spacerun: yes">
And please never post HTML emails to the mailing list. The plain old ASCII emails are still working perfect.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerHi Arch,
Quoted 7 lines
Quoted 5 lines
I have tried writing code to add the Additional Protocol Descriptor List. But it seems that the data still cannot be added as a 3-level sequence (sequence of a sequence of a sequence). The data I added for the Additional Protocol Descriptor List still look similar to the Protocol Descriptor List (2-level sequence of data).
you should coordinate with Collin, because he also needs this.
forget about that. I did the patch by myself. Feel free to try it out.
Regards
Marcel
Index: include/sdp_lib.h
===================================================================
RCS file: /cvsroot/bluez/libs/include/sdp_lib.h,v
retrieving revision 1.12
sdp_lib.h +6 -1
@@ -176,6 +176,11 @@int sdp_set_access_protos (sdp_record_t *rec,const sdp_list_t *proto);/* +* Set the additional access protocols of the record to those specified in proto +*/ +int sdp_set_add_access_protos (sdp_record_t *rec,const sdp_list_t *proto); + +/* * Get protocol port (i.e. PSM for L2CAP, Channel for RFCOMM) */ int sdp_get_proto_port (const sdp_list_t *list,int proto);
@@ -457,7 +462,7 @@/* * Get the additional access protocols from the service record */ -int sdp_get_add_access_protos (const sdp_record_t *rec,sdp_list_t **pap); +int sdp_get_add_access_protos (const sdp_record_t *rec,sdp_list_t **protos);/* * Extract the list of browse groups to which the service belongs.
Index: src/sdp.c
===================================================================
RCS file: /cvsroot/bluez/libs/src/sdp.c,v
retrieving revision 1.33
sdp.c +20 -2
@@ -1812,13 +1812,31 @@int sdp_set_access_protos (sdp_record_t *rec,const sdp_list_t *ap) {const sdp_list_t *p; -sdp_data_t *protos =0 ; +sdp_data_t *protos =NULL ;for (p = ap; p; p = p->next) { -sdp_data_t *seq =access_proto_to_dataseq (rec, (sdp_list_t *)p->data); +sdp_data_t *seq =access_proto_to_dataseq (rec, (sdp_list_t *) p->data); protos =sdp_seq_append (protos, seq); } +sdp_attr_add (rec,SDP_ATTR_PROTO_DESC_LIST , protos); + +return 0 ; +} + +int sdp_set_add_access_protos (sdp_record_t *rec,const sdp_list_t *ap) +{ +const sdp_list_t *p; +sdp_data_t *protos =NULL ; + +for (p = ap; p; p = p->next) { +sdp_data_t *seq =access_proto_to_dataseq (rec, (sdp_list_t *) p->data); + protos =sdp_seq_append (protos, seq); + } + +sdp_attr_add (rec,SDP_ATTR_ADD_PROTO_DESC_LIST , +sdp_data_alloc (SDP_SEQ8 , protos)); +return 0 ; }
[Bluez-users] just asking
Hi Marcel,
I'm just wondering if you conduct conventions/seminars about bluez and bluetooth?
Thanks,
OJ
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerRe: [Bluez-users] just asking
Hi OJ,
Quoted 2 lines
I'm just wondering if you conduct conventions/seminars about bluez and bluetooth?
yes, I do, but obvious they are not for free. Contact me directly in a separate email, if you need any further details.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
[Bluez-users] [email protected]
Hi Marcel,
Is there any scheduled convention for next year in the month of March or April? Will you be having it in asia? How much would it cost if I want to join?
Thanks,
OJ
Quoted 6 lines · --- Marcel Holtmann
Hi OJ,
Quoted 1 line
I'm just wondering if you conduct
conventions/seminars
Quoted 1 line
about bluez and bluetooth?
Quoted 12 lines
yes, I do, but obvious they are not for free.
Contact me directly in a
separate email, if you need any further details.Regards
Marcel
-------------------------------------------------------
Quoted 7 lines
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
Quoted 4 lines
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 1 line
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Marcel Holtmann
maintainerRe: [Bluez-users] [email protected]
Hi OJ,
Quoted 3 lines
Is there any scheduled convention for next year in the month of March or April? Will you be having it in asia? How much would it cost if I want to join?
I haven't planned anything for Asia next year. My schedule for 2006 is almost fresh and empty and so far I only know of an event in March some place in England and another one in Germany.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users