2006-11-28 12:32:06

by Olivier Le Pogam

[permalink] [raw]
Subject: Re: [Bluez-devel] Master / Slave question

Hi Peter,

> There is no real hard limit for the number of adapters you can use with
> BlueZ. Link key managment may become a little bit confusing (on the phone
> side) because the Link key is bound to the BT address of the adaptor. So
> if a phone connects to, say adaptor 1 the first time and then to adaptor 2
> the second time it must pair again 8if your application needs security at
> all).

That's ok as I don't need security to be enabled :)

> I think most phones should, in general, support Master/Slave switch.
> However, even when th Bluetooth implementation on the phone supports it,
> it is possible that a role switch request is rejected on the profile layer
> (depends on implementation).

Unfortunately, Nokia mobile phones (implementing the JSR 82) have a
problem with role switch, and definetely can't do it ... So if they
initiate the connection, they will remain master, and my linux bluetooth
key slave :) Trying to force to "master=true" in the btspp: URL or
putting lm=master in hcid.conf automatically raises a "role switch"
exception Nokia phone-side.

> For a server application like yours I would suggest to use the role
> switch feature in a more relaxed way. So, once a connection comes in try
> to do a role switch. If it succeed it is fine and you're able to accept an
> additional connection. If it fails you're out of resources but at least
> can service the current connection.
>
> However, if I understand it right you can not set this behaviour in
> hcid.conf. You have to implement it in your application.

What do you mean by implementing this in my application ? Is it
possible to manually deal with this in my server application ? Would you
have a location with examples ?

Thanks a lot, I feel more clever now, and at least understand why I
haven't succeeded !

Oli



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2006-11-29 22:54:38

by Mark S. Townsley

[permalink] [raw]
Subject: Re: [Bluez-devel] Master / Slave question

I read/heard somewhere that newer silicons that supports automatic
master/slave role switch creates problems in the HCI layer and connections
could get dropped if you have a BT radio that supports that auto-switching.

Can someone confirm or discredit this?


On 11/29/06, Peter Wippich <[email protected]> wrote:
>
>
> Salut Oli,
>
> > > For a server application like yours I would suggest to use the role
> > > switch feature in a more relaxed way. So, once a connection comes in
> try
> > > to do a role switch. If it succeed it is fine and you're able to
> accept an
> > > additional connection. If it fails you're out of resources but at
> least
> > > can service the current connection.
> > >
> > > However, if I understand it right you can not set this behaviour in
> > > hcid.conf. You have to implement it in your application.
> >
> > What do you mean by implementing this in my application ? Is it
> > possible to manually deal with this in my server application ? Would you
> > have a location with examples ?
> >
> Actualy, the only sample I'm aware of for such things is hcid. I've not
> checked how it handles the case when lm master is set and the remote
> device rejects the role switch. From the documentation I assume it will
> cancel the connection, but this may be wrong.
> Marcel ??
> If it just ignores a rejected role switch and keeps the connection you
> have the behaviour I outlined above.
> If it cancel the connection may be the easiest way is to modify hcid.
>
> Peter
>
>
> | Peter Wippich Voice: +49 30 46776411 |
> | G&W Instruments GmbH fax: +49 30 46776419 |
> | Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
> | D-13355 Berlin / Germany |
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>


Attachments:
(No filename) (2.29 kB)
(No filename) (3.55 kB)
(No filename) (347.00 B)
(No filename) (164.00 B)
Download all attachments

2006-11-29 12:11:24

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] Master / Slave question


Salut Oli,

> > For a server application like yours I would suggest to use the role
> > switch feature in a more relaxed way. So, once a connection comes in try
> > to do a role switch. If it succeed it is fine and you're able to accept an
> > additional connection. If it fails you're out of resources but at least
> > can service the current connection.
> >
> > However, if I understand it right you can not set this behaviour in
> > hcid.conf. You have to implement it in your application.
>
> What do you mean by implementing this in my application ? Is it
> possible to manually deal with this in my server application ? Would you
> have a location with examples ?
>
Actualy, the only sample I'm aware of for such things is hcid. I've not
checked how it handles the case when lm master is set and the remote
device rejects the role switch. From the documentation I assume it will
cancel the connection, but this may be wrong.
Marcel ??
If it just ignores a rejected role switch and keeps the connection you
have the behaviour I outlined above.
If it cancel the connection may be the easiest way is to modify hcid.

Peter


| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel