* [Bluez-users] Re: adding Additional Protocol Descriptor List
@ 2005-12-14 7:30 Arch Sayo
2005-12-14 7:41 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Arch Sayo @ 2005-12-14 7:30 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1: Type: text/plain, Size: 3372 bytes --]
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,
> Thank you with that information on adding the 1284ID
attribute.
you are welcome. I assume it is working perfect now.
> Now, I am trying to add the Additional Protocol
Descriptor List to my
> sdp record. The Additional Protocol Descriptor List
is almost similar
> to the Protocol Descriptor List. The only difference
is that while the
> Protocol Descriptor List is a sequence of a sequence
of data (2
> levels), the Additional Protocol Descriptor List is
a sequence of a
> sequence of a sequence of data (3 levels) .I tried
doing this using
> the function sdp_set_access_protos() and just
substituting the
> Attribute ID in the function from
SDP_ATTR_PROTO_DESC_LIST to
> SDP_ATTR_ADD_PROTO_DESC_LIST. However, as you may
already know, this
> will not solve it since the Protocol Descriptor List
is only a
> sequence of a sequence.
>
> In this regard, I would like to ask how I will be
able to add a
> sequence of a sequence of a sequence of data to my
sdp record. Or in
> other words, how will I add the Additional Protocol
Descriptor List to
> 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
[-- Attachment #2: Type: text/html, Size: 5693 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Bluez-users] Re: adding Additional Protocol Descriptor List
2005-12-14 7:30 [Bluez-users] Re: adding Additional Protocol Descriptor List Arch Sayo
@ 2005-12-14 7:41 ` Marcel Holtmann
2005-12-14 9:29 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-12-14 7:41 UTC (permalink / raw)
To: bluez-users
Hi Arch,
> 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.
> <
> 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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] Re: adding Additional Protocol Descriptor List
2005-12-14 7:41 ` Marcel Holtmann
@ 2005-12-14 9:29 ` Marcel Holtmann
2005-12-15 8:35 ` [Bluez-users] just asking oj ravadilla
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-12-14 9:29 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
Hi Arch,
> > 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
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 2142 bytes --]
Index: include/sdp_lib.h
===================================================================
RCS file: /cvsroot/bluez/libs/include/sdp_lib.h,v
retrieving revision 1.12
diff -u -r1.12 sdp_lib.h
--- include/sdp_lib.h 9 Dec 2005 09:12:44 -0000 1.12
+++ include/sdp_lib.h 14 Dec 2005 09:27:40 -0000
@@ -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
diff -u -r1.33 sdp.c
--- src/sdp.c 9 Dec 2005 09:39:16 -0000 1.33
+++ src/sdp.c 14 Dec 2005 09:27:41 -0000
@@ -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;
}
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bluez-users] just asking
2005-12-14 9:29 ` Marcel Holtmann
@ 2005-12-15 8:35 ` oj ravadilla
2005-12-15 8:52 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: oj ravadilla @ 2005-12-15 8:35 UTC (permalink / raw)
To: bluez-users
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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bluez-users] just asking
2005-12-15 8:35 ` [Bluez-users] just asking oj ravadilla
@ 2005-12-15 8:52 ` Marcel Holtmann
2005-12-20 0:32 ` [Bluez-users] marcel@holtmann.org oj ravadilla
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-12-15 8:52 UTC (permalink / raw)
To: bluez-users
Hi OJ,
> 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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bluez-users] marcel@holtmann.org
2005-12-15 8:52 ` Marcel Holtmann
@ 2005-12-20 0:32 ` oj ravadilla
2005-12-20 0:46 ` Marcel Holtmann
0 siblings, 1 reply; 7+ messages in thread
From: oj ravadilla @ 2005-12-20 0:32 UTC (permalink / raw)
To: bluez-users
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
--- Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi OJ,
>
> > 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
> Bluez-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bluez-users
>
__________________________________________________
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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-12-20 0:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-14 7:30 [Bluez-users] Re: adding Additional Protocol Descriptor List Arch Sayo
2005-12-14 7:41 ` Marcel Holtmann
2005-12-14 9:29 ` Marcel Holtmann
2005-12-15 8:35 ` [Bluez-users] just asking oj ravadilla
2005-12-15 8:52 ` Marcel Holtmann
2005-12-20 0:32 ` [Bluez-users] marcel@holtmann.org oj ravadilla
2005-12-20 0:46 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).