2005-05-20 07:57:38

by Mayank Batra

[permalink] [raw]
Subject: Re: [Bluez-devel] Creating more than one instance of BlueZ

Brad,

> I think the best you can expect is for bluez to see
> hci0 and hci1. then
> you've got to make sure your apps choose the right
> adapter.
>
>

That is not possible since we have only one set of
modules for l2cap, rfcomm, bnep etc.

So even if I tell my app to use which adapter, only
one app will have exclusive access to the modules.
And the other app will be waiting for the first app to
free the modules.

A deadlock!

Mayank

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-05-20 14:10:56

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Creating more than one instance of BlueZ

Mayank,

if you run "hciconfig" with two adapters connected, you see both hci0
and hci1. you also see their bdaddrs.

iirc, when you create a bt socket we usually set "any" as the source
(remember setting local_addr with bacpy(&local_addr, BDADDR_ANY) in
a2recv.c). you can use a specific adapter and that is what you have to
do when you have two adapters and you want to go out on a specific one.

when you connect to a service, obviously you can specify the bdaddress
to connect to.

most of the core bluez code will allow you to set the src address using
command-line arguments (a good example is -i <hciX|bdaddr> in hidd) but
we've been lazy in the btsco code about that.

brad

Mayank Batra wrote:
> Brad,
>
>
>>I think the best you can expect is for bluez to see
>>hci0 and hci1. then
>>you've got to make sure your apps choose the right
>>adapter.
>>
>>
>
>
> That is not possible since we have only one set of
> modules for l2cap, rfcomm, bnep etc.
>
> So even if I tell my app to use which adapter, only
> one app will have exclusive access to the modules.
> And the other app will be waiting for the first app to
> free the modules.
>
> A deadlock!
>
> Mayank
>
> ________________________________________________________________________
> Yahoo! India Matrimony: Find your life partner online
> Go to: http://yahoo.shaadi.com/india-matrimony
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-05-20 08:17:22

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Creating more than one instance of BlueZ

Hi Mayank,

> > I think the best you can expect is for bluez to see
> > hci0 and hci1. then
> > you've got to make sure your apps choose the right
> > adapter.
>
> That is not possible since we have only one set of
> modules for l2cap, rfcomm, bnep etc.
>
> So even if I tell my app to use which adapter, only
> one app will have exclusive access to the modules.
> And the other app will be waiting for the first app to
> free the modules.
>
> A deadlock!

this is simply wrong. No application will ever have exclusive access to
a kernel module. Or do you have to wait for your HTTP connection while
you are doing SMTP?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel