public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Meaning of hcitool -i dev con
@ 2008-06-26 18:27 Jui-Hao Chiang
  2008-06-26 20:56 ` Jui-Hao Chiang
  2008-06-26 21:07 ` Marcel Holtmann
  0 siblings, 2 replies; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-06-26 18:27 UTC (permalink / raw)
  To: bluez-devel

Hi, dear all:
I am currently using Cyber-Blue Bluetooth USB adapter and Motorola
Razr V3 for experiments.
My goal is to use one adapter to open 3 SCO connections with 3 V3 cell phones.
The chan_mobile in Asterisk gives me the way to connect the adapter to
one phone. But when I use hcitool -i hci1 con to show the connections,
I don't know how to explain the output (00:19:2C:D5:90:DF is cell
phone's address):

Connections:
	> SCO 00:19:2C:D5:90:DF handle 2 state 1 lm SLAVE
	< ACL 00:19:2C:D5:90:DF handle 1 state 1 lm MASTER ENCRYPT

Does this mean that the USB adapter is playing TWO roles (master and
slave) at the same moment??

Hope some one can give some hint.
Best regards

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] Meaning of hcitool -i dev con
  2008-06-26 18:27 [Bluez-devel] Meaning of hcitool -i dev con Jui-Hao Chiang
@ 2008-06-26 20:56 ` Jui-Hao Chiang
  2008-06-26 21:07 ` Marcel Holtmann
  1 sibling, 0 replies; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-06-26 20:56 UTC (permalink / raw)
  To: bluez-devel

Jui-Hao Chiang <windtracekimo <at> gmail.com> writes:

> 
> Hi, dear all:
> I am currently using Cyber-Blue Bluetooth USB adapter and Motorola
> Razr V3 for experiments.
> My goal is to use one adapter to open 3 SCO connections with 3 V3 cell phones.
> The chan_mobile in Asterisk gives me the way to connect the adapter to
> one phone. But when I use hcitool -i hci1 con to show the connections,
> I don't know how to explain the output (00:19:2C:D5:90:DF is cell
> phone's address):
> 
> Connections:
> 	> SCO 00:19:2C:D5:90:DF handle 2 state 1 lm SLAVE
> 	< ACL 00:19:2C:D5:90:DF handle 1 state 1 lm MASTER ENCRYPT
> 
> Does this mean that the USB adapter is playing TWO roles (master and
> slave) at the same moment??
> 
> Hope some one can give some hint.
> Best regards
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> 


I just tried to use the following to query the link mode of the adapter
[command]
hcitool -i hci1 cmd 0x02 0x0009 0x02 0x00
[output]
< HCI Command: ogf 0x02, ocf 0x0009, plen 2
  02 00 
> HCI Event: 0x0e plen 7
  01 09 08 00 02 00 00 
(If I did not make anything wrong)
0x02 is the OGF for Link Policy Command
0x0009 is the OCF for HCI_Role_Discovery
0x02 0x00 is the unit16 of connection handle

At the same time, I use "hcidump -i hci1 -w log" to listen, and then use
wireshark to view the log.
The last byte of HCI Event shows the current role is Master for this connection
handle.
So it seems confusing that "hcitool -i hci1 con" shows "Slave".




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] Meaning of hcitool -i dev con
  2008-06-26 18:27 [Bluez-devel] Meaning of hcitool -i dev con Jui-Hao Chiang
  2008-06-26 20:56 ` Jui-Hao Chiang
@ 2008-06-26 21:07 ` Marcel Holtmann
  2008-06-26 22:42   ` Jui-Hao Chiang
  1 sibling, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2008-06-26 21:07 UTC (permalink / raw)
  To: BlueZ development

Hi,

> I am currently using Cyber-Blue Bluetooth USB adapter and Motorola
> Razr V3 for experiments.
> My goal is to use one adapter to open 3 SCO connections with 3 V3 cell phones.
> The chan_mobile in Asterisk gives me the way to connect the adapter to
> one phone. But when I use hcitool -i hci1 con to show the connections,
> I don't know how to explain the output (00:19:2C:D5:90:DF is cell
> phone's address):
> 
> Connections:
> 	> SCO 00:19:2C:D5:90:DF handle 2 state 1 lm SLAVE
> 	< ACL 00:19:2C:D5:90:DF handle 1 state 1 lm MASTER ENCRYPT
> 
> Does this mean that the USB adapter is playing TWO roles (master and
> slave) at the same moment??

that is for the SCO connection. The ACL connection is the one that
counts. The SCO depends on the ACL connection.

Actually the the SCO/eSCO connections don't have a link mode. It is an
issue how these information are presented.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] Meaning of hcitool -i dev con
  2008-06-26 21:07 ` Marcel Holtmann
@ 2008-06-26 22:42   ` Jui-Hao Chiang
  2008-06-27  2:51     ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Jui-Hao Chiang @ 2008-06-26 22:42 UTC (permalink / raw)
  To: bluez-devel

Marcel Holtmann <marcel <at> holtmann.org> writes:

> > 	> SCO 00:19:2C:D5:90:DF handle 2 state 1 lm SLAVE
> > 	< ACL 00:19:2C:D5:90:DF handle 1 state 1 lm MASTER ENCRYPT
> > 
> > Does this mean that the USB adapter is playing TWO roles (master and
> > slave) at the same moment??
> 
> that is for the SCO connection. The ACL connection is the one that
> counts. The SCO depends on the ACL connection.
> 
> Actually the the SCO/eSCO connections don't have a link mode. It is an
> issue how these information are presented.
> 
> Regards
> 
> Marcel
> 
Thank you for the explanation.
This explains the output from hci command and hcidump.
Your words also reminds me that standard has said "before creating SCO, a ACL
link must exist".
But I am still confused about the handle.
If ACL first use handle 0, does that mean the upcoming SCO will use handle 0? 
Or another one?

If you have some time, please also try to look at my previous post "Multiple SCO
connections".

Sincerely,
Jui-Hao




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bluez-devel] Meaning of hcitool -i dev con
  2008-06-26 22:42   ` Jui-Hao Chiang
@ 2008-06-27  2:51     ` Marcel Holtmann
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2008-06-27  2:51 UTC (permalink / raw)
  To: BlueZ development

Hi,

> > > 	> SCO 00:19:2C:D5:90:DF handle 2 state 1 lm SLAVE
> > > 	< ACL 00:19:2C:D5:90:DF handle 1 state 1 lm MASTER ENCRYPT
> > > 
> > > Does this mean that the USB adapter is playing TWO roles (master and
> > > slave) at the same moment??
> > 
> > that is for the SCO connection. The ACL connection is the one that
> > counts. The SCO depends on the ACL connection.
> > 
> > Actually the the SCO/eSCO connections don't have a link mode. It is an
> > issue how these information are presented.
> >
> Thank you for the explanation.
> This explains the output from hci command and hcidump.
> Your words also reminds me that standard has said "before creating SCO, a ACL
> link must exist".
> But I am still confused about the handle.
> If ACL first use handle 0, does that mean the upcoming SCO will use handle 0? 
> Or another one?

the handle 0 is invalid first of all. The ACL link gets a handle and the
SCO link gets its own handle. Like you see it in the example above.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-27  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 18:27 [Bluez-devel] Meaning of hcitool -i dev con Jui-Hao Chiang
2008-06-26 20:56 ` Jui-Hao Chiang
2008-06-26 21:07 ` Marcel Holtmann
2008-06-26 22:42   ` Jui-Hao Chiang
2008-06-27  2:51     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox