From: Claudio Takahasi <cktakahasi@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Re: [Bluez-users] PANU service search
Date: Mon, 28 Mar 2005 16:46:26 -0300 [thread overview]
Message-ID: <e1effdeb05032811466fe34801@mail.gmail.com> (raw)
In-Reply-To: <1112037740.9016.45.camel@pegasus>
[-- Attachment #1: Type: text/plain, Size: 3133 bytes --]
Hi Marcel,
The code for support search for PANU service is attached. The change
is very small
but will help me create a PAN for UPnP application in ad hoc scenario.
Regards,
Claudio.
On Mon, 28 Mar 2005 21:22:20 +0200, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Claudio,
>
> > I will try explain my problem more deeply.
> >
> > Bluetooth Extended Service Discovery Profile (ESDP) for Universal Plug
> > and Play(UPnP)
> > defines how devices with Bluetooth wireless communications can use the
> > Bluetooth
> > Service Discovery Protocol (SDP) initially to discover other devices
> > that support UPnP
> > services and retrieve information about these services.
> > For more details see http://www.bluetooth.org document: ESDP_for_UPnP_V0.95.pdf
> >
> > According with this profile three approach can be implemented:
> > 1. L2CAP -based Solution: focus on layering UPnP services
> > over the L2CAP layer of the Bluetooth protocol stack for use by
> > devices that lack IP support.
> > 2. IP-based Solution using PAN Profile: focus on layering UPnP
> > services over the Bluetooth Personal Area Networking (PAN) Profile.
> > 3. IP-based Solution using LAN Access Profile : focus on layering UPnP
> > services over the Bluetooth Local Area Network (LAN) Access Profile.
> >
> > I choose the SECOND because I have to address ad hoc and NAP scenarios. The 3th
> > option doesn't support multiple connections. The first option is not
> > feasible for me
> > because a UPnP service can be available in a server that belong to a
> > LAN. Therefore,
> > using L2CAP -based Solution I will not be able to search UPnP service
> > in a device
> > that doesn't belongs directly to the PAN.
> >
> >
> > After select the SECOND approach two scenarios exist:
> > - Ad Hoc scenario
> > The Control Point* device(role GN) will establish a PAN with PANUs
> > devices(listen enabled), assign IP to the nodes and after search for
> > UPnP services. The Control Point is the active member, it search for other
> > devices and must foward packet to all devices that belongs to the PAN.
> >
> > - NAP scenario
> > If a NAP(listen enabled) is available, the Control Point(role PANU)
> > will connect to
> > the NAP and search for UPnP service in the LAN
>
> and I still don't see your problem here. Everything is available for
> doing this.
>
> > I implemented the search for PANU service and tested. Now, what is the
> > procedure to
> > submit a new patch. I am not sure if this small enhancement can be
> > usefull for the
> > bluez community.
>
> Create a patch and post it to the bluez-devel mailing list.
>
> Regards
>
> Marcel
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: panu_support.diff --]
[-- Type: text/x-patch; name="panu_support.diff", Size: 2599 bytes --]
--- bluez-utils-2.15/tools/sdptool.c 2004-12-25 16:06:02.000000000 -0200
+++ bluez-utils-2.15-panu/tools/sdptool.c 2005-03-28 14:09:33.245185360 -0300
@@ -1599,6 +1599,69 @@
return ret;
}
+
+static int add_panu(sdp_session_t *session, svc_info_t *si)
+{
+ sdp_list_t *svclass_id, *pfseq, *apseq, *root;
+ uuid_t root_uuid, ftrn_uuid, l2cap_uuid, bnep_uuid;
+ sdp_profile_desc_t profile[1];
+ sdp_list_t *aproto, *proto[2];
+ sdp_record_t record;
+ uint16_t lp = 0x000f, ver = 0x0100;
+ sdp_data_t *psm, *version;
+ int ret = 0;
+
+ memset((void *)&record, 0, sizeof(sdp_record_t));
+ record.handle = 0xffffffff;
+ sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
+ root = sdp_list_append(NULL, &root_uuid);
+ sdp_set_browse_groups(&record, root);
+ sdp_list_free(root, NULL);
+
+ sdp_uuid16_create(&ftrn_uuid, PANU_SVCLASS_ID);
+ svclass_id = sdp_list_append(NULL, &ftrn_uuid);
+ sdp_set_service_classes(&record, svclass_id);
+ sdp_list_free(svclass_id, NULL);
+
+ sdp_uuid16_create(&profile[0].uuid, PANU_PROFILE_ID);
+ profile[0].version = 0x0100;
+ pfseq = sdp_list_append(NULL, &profile[0]);
+ sdp_set_profile_descs(&record, pfseq);
+ sdp_list_free(pfseq, NULL);
+
+ sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
+ proto[0] = sdp_list_append(NULL, &l2cap_uuid);
+ psm = sdp_data_alloc(SDP_UINT16, &lp);
+ proto[0] = sdp_list_append(proto[0], psm);
+ apseq = sdp_list_append(NULL, proto[0]);
+
+ sdp_uuid16_create(&bnep_uuid, BNEP_UUID);
+ proto[1] = sdp_list_append(NULL, &bnep_uuid);
+ version = sdp_data_alloc(SDP_UINT16, &ver);
+ proto[1] = sdp_list_append(proto[1], version);
+ apseq = sdp_list_append(apseq, proto[1]);
+
+ aproto = sdp_list_append(NULL, apseq);
+ sdp_set_access_protos(&record, aproto);
+
+ sdp_set_info_attr(&record, "PAN User", NULL, NULL);
+
+ if (sdp_record_register(session, &record, SDP_RECORD_PERSIST) < 0) {
+ printf("Service Record registration failed\n");
+ ret = -1;
+ goto end;
+ }
+ printf("PANU service registered\n");
+end:
+ sdp_data_free(version);
+ sdp_data_free(psm);
+ sdp_list_free(proto[0], 0);
+ sdp_list_free(proto[1], 0);
+ sdp_list_free(apseq, 0);
+ sdp_list_free(aproto, 0);
+ return ret;
+}
+
static int add_ctp(sdp_session_t *session, svc_info_t *si)
{
sdp_list_t *svclass_id, *pfseq, *apseq, *root;
@@ -1793,6 +1856,7 @@
{ "NAP", NAP_SVCLASS_ID, add_nap },
{ "GN", GN_SVCLASS_ID, add_gn },
+ { "PANU", PANU_SVCLASS_ID, add_panu },
{ "HID", HID_SVCLASS_ID, NULL },
{ "CIP", CIP_SVCLASS_ID, NULL },
next prev parent reply other threads:[~2005-03-28 19:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-28 13:22 [Bluez-users] PANU service search Claudio Takahasi
2005-03-28 13:29 ` [Bluez-devel] " Marcel Holtmann
2005-03-28 14:07 ` Claudio Takahasi
2005-03-28 14:18 ` Marcel Holtmann
2005-03-28 19:03 ` Claudio Takahasi
2005-03-28 19:22 ` Marcel Holtmann
2005-03-28 19:46 ` Claudio Takahasi [this message]
2005-03-28 20:01 ` Marcel Holtmann
2005-03-28 20:48 ` Claudio Takahasi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1effdeb05032811466fe34801@mail.gmail.com \
--to=cktakahasi@gmail.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox