2004-03-04 02:59:51

by Thor Egil Skaug

[permalink] [raw]
Subject: [Bluez-users] HCI_switch_role

Does anyone know why the HCI_switch_role command takes a BDADDR argument
instead of
a connectionhandle?

The role_change event should be sent from both devices to their
respective sw stacks after this.

I don't understand the following from the BT specification:

1. Is the BDADDR the address of the remote device, or the local device
(to the caller)?

2. In the returned event, what bdaddr is returned to the
(HCI_switch_role) calling stack, and what bdaddr
is returned to the stack on the remote device?
3. What if there is more than one connection between two devices?

Thor


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-03-05 12:01:41

by Steven Singer

[permalink] [raw]
Subject: Re: [Bluez-users] HCI_switch_role

Marcel Holtmann wrote:
> Thor Egil Skaug wrote:
>> Is a slave allowed to switch role to master?
>
> every side can switch the role.

Strictly, both sides can attempt to initiate a switch. Both sides are
also allowed to refuse.

Provided the baseband supports it (check the features) and the link
manager has been told to allow it (check the link policy) then it
should be OK (barring a burst of radio noise that knocks out critical
radio packets - in which case, just try again).

Note that although you can read the features for both sides, you can
check only the local link policy. However, instead of all that, you may
as well just go ahead and try to switch.

- Steven
--



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

http://www.mimesweeper.com
**********************************************************************

2004-03-05 00:49:10

by Marcel Holtmann

[permalink] [raw]
Subject: RE: [Bluez-users] HCI_switch_role

Hi Thor,

> Is a slave allowed to switch role to master?

every side can switch the role.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-03-04 23:01:37

by Thor Egil Skaug

[permalink] [raw]
Subject: RE: [Bluez-users] HCI_switch_role

Is a slave allowed to switch role to master?

Thor


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-03-04 10:49:45

by Peter Stephenson

[permalink] [raw]
Subject: Re: [Bluez-users] HCI_switch_role

"Thor Egil Skaug" wrote:
> Does anyone know why the HCI_switch_role command takes a BDADDR argument
> instead of
> a connectionhandle?

It's not clear to me, either, but it may be for compatibility with the
role-change event when generated during connection creation: in that
case, the connection_complete event hasn't come up yet, so there's no
valid ACL handle. Hence it has to report the BD ADDR (as with
the connection_request event).

> The role_change event should be sent from both devices to their
> respective sw stacks after this.
>
> I don't understand the following from the BT specification:
>
> 1. Is the BDADDR the address of the remote device, or the local device
> (to the caller)?

The remote device.

> 2. In the returned event, what bdaddr is returned to the
> (HCI_switch_role) calling stack, and what bdaddr
> is returned to the stack on the remote device?

Each side reports the remote address (where it reports anything).

> 3. What if there is more than one connection between two devices?

There can't be, you can only have one ACL between any two devices.
This a specific error code acl_connection_already_exists or something
similar if you try and add another one.

pws


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

http://www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users