* [Bluez-devel] l2cap and multiple connections
@ 2004-05-14 17:36 Vladimeros Vladimerou
2004-05-14 17:41 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Vladimeros Vladimerou @ 2004-05-14 17:36 UTC (permalink / raw)
To: bluez-devel
Greetings everyone,
I'm trying to achieve multiple l2cap channels/connections (1 master to 5
slaves). I'm wondering if anyone knows the method off-hand, so that I
won't have to look into library and kernel source. I was naively
trying to bind several sockets to the same address, after issuing a
"setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));" but
even if this call returns "Success", the next bind() returns
"Address already in use". How is this conventionally done?
Do I have to step down to HCI?
I'm also wondering if l2cap is the fastest way to send a custom 64-byte
message to 5 clients (real-time application). Has anyone used SCO for
such a purpose?
thanks in advance,
-Vlad.
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-devel] l2cap and multiple connections
2004-05-14 17:36 [Bluez-devel] l2cap and multiple connections Vladimeros Vladimerou
@ 2004-05-14 17:41 ` Marcel Holtmann
2004-05-14 17:50 ` Vladimeros Vladimerou
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2004-05-14 17:41 UTC (permalink / raw)
To: Vladimeros Vladimerou; +Cc: BlueZ Mailing List
Hi Vlad,
> I'm trying to achieve multiple l2cap channels/connections (1 master to 5
> slaves). I'm wondering if anyone knows the method off-hand, so that I
> won't have to look into library and kernel source. I was naively
> trying to bind several sockets to the same address, after issuing a
> "setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));" but
> even if this call returns "Success", the next bind() returns
> "Address already in use". How is this conventionally done?
> Do I have to step down to HCI?
you should step down to a book for socket programming. Which actually
means bind() once and accept() often ;)
> I'm also wondering if l2cap is the fastest way to send a custom 64-byte
> message to 5 clients (real-time application). Has anyone used SCO for
> such a purpose?
SCO is for audio data only. How often must I repeat this. Maybe eSCO is
able to serve the real-time need, but I am not really sure about it.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-devel] l2cap and multiple connections
2004-05-14 17:41 ` Marcel Holtmann
@ 2004-05-14 17:50 ` Vladimeros Vladimerou
2004-05-14 17:56 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Vladimeros Vladimerou @ 2004-05-14 17:50 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ Mailing List
Thanks Marcel, but...
> Hi Vlad,
>
> > I'm trying to achieve multiple l2cap channels/connections (1 master to 5
> > slaves). I'm wondering if anyone knows the method off-hand, so that I
> > won't have to look into library and kernel source. I was naively
> > trying to bind several sockets to the same address, after issuing a
> > "setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));" but
> > even if this call returns "Success", the next bind() returns
> > "Address already in use". How is this conventionally done?
> > Do I have to step down to HCI?
>
> you should step down to a book for socket programming. Which actually
> means bind() once and accept() often ;)
I know this is how it's normally done, but since
I was using HCI before, and connections had to be initiated by the
"master", I thought the method I mentioned was the way to use.
So, from what your saying, I should listen() and accept() at the
bluetooth "master"? Is there an implicit role-change command
happening somewhere, cause if I accept at the "master", otherwise,
that would mean that the connection is initiated by the "slave", which
is not as the bluetooth spec, right? How does it work?
> > I'm also wondering if l2cap is the fastest way to send a custom 64-byte
> > message to 5 clients (real-time application). Has anyone used SCO for
> > such a purpose?
>
> SCO is for audio data only. How often must I repeat this. Maybe eSCO is
> able to serve the real-time need, but I am not really sure about it.
"eSCO"? Never heard about that. Thanks, I'll look into that.
>
> Regards
>
> Marcel
>
>
Thanks a lot for the quick reply,
-Vlad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-devel] l2cap and multiple connections
2004-05-14 17:50 ` Vladimeros Vladimerou
@ 2004-05-14 17:56 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-05-14 17:56 UTC (permalink / raw)
To: Vladimeros Vladimerou; +Cc: BlueZ Mailing List
Hi Vlad,
> > you should step down to a book for socket programming. Which actually
> > means bind() once and accept() often ;)
>
> I know this is how it's normally done, but since
> I was using HCI before, and connections had to be initiated by the
> "master", I thought the method I mentioned was the way to use.
>
> So, from what your saying, I should listen() and accept() at the
> bluetooth "master"? Is there an implicit role-change command
> happening somewhere, cause if I accept at the "master", otherwise,
> that would mean that the connection is initiated by the "slave", which
> is not as the bluetooth spec, right? How does it work?
the master is the device that creates the connection. That is what the
Bluetooth specification says. This means that an access point for
example is not a master per se, but it can tell a client to become
slave. Look at the L2CAP socket options for the master link policy.
> "eSCO"? Never heard about that. Thanks, I'll look into that.
It is part of the Bluetooth 1.2 specification.
Regards
Marcel
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-05-14 17:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-14 17:36 [Bluez-devel] l2cap and multiple connections Vladimeros Vladimerou
2004-05-14 17:41 ` Marcel Holtmann
2004-05-14 17:50 ` Vladimeros Vladimerou
2004-05-14 17:56 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox