From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] piconet..
Date: Sat, 11 Dec 2004 13:10:35 +0100 [thread overview]
Message-ID: <1102767035.19086.18.camel@pegasus> (raw)
In-Reply-To: <016d01c4df70$a8e297d0$6401000a@zool>
Hi Steffen,
> > > PS. I belive that the PSM in the L2CAP layer can serve more than one
> > > client or am I totally wrong? otherwise I should update the PSM
> > > everytime a new client connect..
> >
> > It can also serve multiple PSM on the same ACL link.
>
> Ok.. how do I do that?
>
> Currently I am setting the PSM on my socket like this:
>
> <code snip>
> loc_addr.l2_family = AF_BLUETOOTH;
>
> bacpy(&loc_addr.l2_bdaddr, local_bdaddr);
>
> loc_addr.l2_psm = htobs(psm);
>
>
> if (bind(sk, (struct sockaddr *) &loc_addr, sizeof(loc_addr)) < 0) {
>
> printf("could not bind socket: %i\n", sk);
>
> syslog(LOG_ERR, "Can't bind socket. %s(%d)", strerror(errno), errno);
>
> exit(1);
>
> }
>
> </code snip>
you call listen() and then accept() for every incoming connection. It is
the same as for TCP/IP.
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://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-12-11 12:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-11 10:20 [Bluez-devel] piconet Steffen Larsen
2004-12-11 11:28 ` Marcel Holtmann
2004-12-11 11:00 ` Steffen Larsen
2004-12-11 12:10 ` Marcel Holtmann [this message]
2004-12-11 12:10 ` Steffen Larsen
2004-12-11 15:33 ` Steffen Larsen
2004-12-11 16:44 ` Marcel Holtmann
2004-12-11 16:29 ` Steffen Larsen
2004-12-11 17:37 ` Marcel Holtmann
2004-12-11 17:50 ` Steffen Larsen
2004-12-13 9:48 ` Steffen Larsen
2004-12-13 9:54 ` Steffen Larsen
2004-12-13 11:05 ` Marcel Holtmann
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=1102767035.19086.18.camel@pegasus \
--to=marcel@holtmann.org \
--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