* [Bluez-users] how to recognize whether the connected device is a headset
@ 2004-10-21 9:50 Chen Bin
2004-10-21 11:00 ` Fred Schaettgen
2004-10-21 17:41 ` Marcel Holtmann
0 siblings, 2 replies; 8+ messages in thread
From: Chen Bin @ 2004-10-21 9:50 UTC (permalink / raw)
To: bluez-users
Hi all,
Thanks very much for previous help from Holtman, and I happen a new
problem when I try to find out whether a connected device is a headset.
It can't be browsed using sdptool in both connected mode and discovery
mode(paring state), I wonder how I can know its charactics after
connected?
My phone will be appeared in 3G conference next month, so I am very
anxious about the bluetooth feature...
Holtman, any idea?
Thanks in advance!
Chen
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-21 9:50 [Bluez-users] how to recognize whether the connected device is a headset Chen Bin
@ 2004-10-21 11:00 ` Fred Schaettgen
2004-10-21 17:41 ` Marcel Holtmann
1 sibling, 0 replies; 8+ messages in thread
From: Fred Schaettgen @ 2004-10-21 11:00 UTC (permalink / raw)
To: bluez-users
On Thursday 21 October 2004 11:50, Chen Bin wrote:
> Hi all,
>
> Thanks very much for previous help from Holtman, and I happen a new
> problem when I try to find out whether a connected device is a headset.
>
> It can't be browsed using sdptool in both connected mode and discovery
> mode(paring state), I wonder how I can know its charactics after
> connected?
You can look at the device class first.
And instead of browsing try to search for the profile instead with
sdptool search --bdaddr <add> <uuid>
You are supposed to use the headset uuid (0x1108), but you can use the
L2CAP-UUID (0x100) just as well. This little trick will list almost every
service of a device, even if it's not in the public browse group.
Fred
--
Fred Schaettgen
bluez-devel@schaettgen.de
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-21 9:50 [Bluez-users] how to recognize whether the connected device is a headset Chen Bin
2004-10-21 11:00 ` Fred Schaettgen
@ 2004-10-21 17:41 ` Marcel Holtmann
2004-10-22 1:18 ` Chen Bin
` (2 more replies)
1 sibling, 3 replies; 8+ messages in thread
From: Marcel Holtmann @ 2004-10-21 17:41 UTC (permalink / raw)
To: Chen Bin; +Cc: BlueZ Mailing List
Hi Chen,
> Thanks very much for previous help from Holtman, and I happen a new
> problem when I try to find out whether a connected device is a headset.
>
> It can't be browsed using sdptool in both connected mode and discovery
> mode(paring state), I wonder how I can know its charactics after
> connected?
actually the class of device value can be inside the inquiry cache and
you will see it when a remote device requests a connection. However we
don't really store these information together with the connection to
make them available afterwards. Any patch is welcome.
What I don't get is why you can't browse when the device is connected?
Run "hcidump -X" as root and show it to us so we can see what happens.
> My phone will be appeared in 3G conference next month, so I am very
> anxious about the bluetooth feature...
What does this mean? Is it good or is it bad? And btw my first name is
Marcel and not Holtmann.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-21 17:41 ` Marcel Holtmann
@ 2004-10-22 1:18 ` Chen Bin
2004-10-22 10:32 ` Marcel Holtmann
2004-10-22 1:27 ` Chen Bin
2004-10-22 1:31 ` Chen Bin
2 siblings, 1 reply; 8+ messages in thread
From: Chen Bin @ 2004-10-22 1:18 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ Mailing List
Hi Marcel,
Below is the infomation I got when I am connecting to a headset and
using 'sdptool browse 00:0D:18:02:4F:C0' to find out the service
provided by the headset:
binch@debian:/new/bt/mBluetooth$ sdptool browse 00:0D:18:02:4F:C0
Browsing 00:0D:18:02:4F:C0 ...
binch@debian:/new/bt/mBluetooth$ hcitool con
Connections:
BTW: I actually have connected to the headset because when I press some
key in the headset I can get some reaction on hcidump, I don't know
whether hcitool con can't see the connection.
The headset is DKH-03. Thanks in advance.
The log of hcidump:
HCIDump - HCI packet analyzer ver 1.10
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
C0 4F 02 18 0D 00 18 CC 02 00 00 00 01
> HCI Event: Command Status (0x0f) plen 4
00 01 05 04
> HCI Event: PIN Code Request (0x16) plen 6
C0 4F 02 18 0D 00
< HCI Command: PIN Code Request Negative Reply (0x01|0x000e) plen 6
C0 4F 02 18 0D 00
> HCI Event: Command Complete (0x0e) plen 10
01 0E 04 00 C0 4F 02 18 0D 00
> HCI Event: Connect Complete (0x03) plen 11
18 29 00 C0 4F 02 18 0D 00 01 00
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
03
> HCI Event: Command Complete (0x0e) plen 4
01 1A 0C 00
< HCI Command: Write Authentication Enable (0x03|0x0020) plen 1
00
> HCI Event: Command Complete (0x0e) plen 4
01 20 0C 00
< HCI Command: Write Authentication Enable (0x03|0x0020) plen 1
00
> HCI Event: Command Complete (0x0e) plen 4
01 20 0C 00
< HCI Command: Write Encryption Mode (0x03|0x0022) plen 1
00
> HCI Event: Command Complete (0x0e) plen 4
01 22 0C 00
< HCI Command: Write Class of Device (0x03|0x0024) plen 3
00 01 00
> HCI Event: Command Complete (0x0e) plen 4
01 24 0C 00
< HCI Command: Write Local Name (0x03|0x0013) plen 248
4D 6F 62 69 6C 65 73 6F 66 74 20 28 30 29 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
> HCI Event: Command Complete (0x0e) plen 4
01 13 0C 00
< HCI Command: Create Connection (0x01|0x0005) plen 13
C0 4F 02 18 0D 00 18 CC 02 00 00 00 01
> HCI Event: Command Status (0x0f) plen 4
00 01 05 04
> HCI Event: PIN Code Request (0x16) plen 6
C0 4F 02 18 0D 00
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
C0 4F 02 18 0D 00 04 30 30 30 30 00 00 00 00 00 00 00 00 00
00 00 00
> HCI Event: Command Complete (0x0e) plen 10
01 0D 04 00 C0 4F 02 18 0D 00
> HCI Event: Link Key Notification (0x18) plen 23
C0 4F 02 18 0D 00 7F EE 97 25 9C CB 7E 48 C1 20 A8 A9 15 A2
62 4E 00
> HCI Event: Connect Complete (0x03) plen 11
00 29 00 C0 4F 02 18 0D 00 01 00
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
29 00 0F 00
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
C0 4F 02 18 0D 00 01
> HCI Event: Command Complete (0x0e) plen 6
01 0D 08 00 29 00
< ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0113 scid 0x0040 result 1 status 2
> ACL data: handle 0x0029 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0113 scid 0x0040 result 0 status 0
< ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0113 flags 0x0000 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
> ACL data: handle 0x0029 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
MTU 48
< ACL data: handle 0x0029 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0113 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0029 flags 0x02 dlen 24
L2CAP(d): cid 0x0113 len 20 [psm 1]
SDP SSA Req: tid 0x0 len 0xf
pat uuid-16 0x1002 (PubBrwsGrp)
max 0xffff
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x5
cnt 0x2
cont 00
< ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0113 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 0x0029 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0113 scid 0x0040
< HCI Command: Disconnect (0x01|0x0006) plen 3
29 00 13
> HCI Event: Command Status (0x0f) plen 4
00 01 06 04
> HCI Event: Disconn Complete (0x05) plen 4
00 29 00 16
Chen
在2004年10月22日的01:41,Marcel Holtmann写道:
> Hi Chen,
>
> > Thanks very much for previous help from Holtman, and I happen a new
> > problem when I try to find out whether a connected device is a headset.
> >
> > It can't be browsed using sdptool in both connected mode and discovery
> > mode(paring state), I wonder how I can know its charactics after
> > connected?
>
> actually the class of device value can be inside the inquiry cache and
> you will see it when a remote device requests a connection. However we
> don't really store these information together with the connection to
> make them available afterwards. Any patch is welcome.
>
> What I don't get is why you can't browse when the device is connected?
> Run "hcidump -X" as root and show it to us so we can see what happens.
>
> > My phone will be appeared in 3G conference next month, so I am very
> > anxious about the bluetooth feature...
>
> What does this mean? Is it good or is it bad? And btw my first name is
> Marcel and not Holtmann.
>
> Regards
>
> Marcel
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-22 1:18 ` Chen Bin
@ 2004-10-22 10:32 ` Marcel Holtmann
0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2004-10-22 10:32 UTC (permalink / raw)
To: Chen Bin; +Cc: BlueZ Mailing List
Hi Chen,
> Below is the infomation I got when I am connecting to a headset and
> using 'sdptool browse 00:0D:18:02:4F:C0' to find out the service
> provided by the headset:
>
> binch@debian:/new/bt/mBluetooth$ sdptool browse 00:0D:18:02:4F:C0
> Browsing 00:0D:18:02:4F:C0 ...
> binch@debian:/new/bt/mBluetooth$ hcitool con
> Connections:
>
> BTW: I actually have connected to the headset because when I press some
> key in the headset I can get some reaction on hcidump, I don't know
> whether hcitool con can't see the connection.
according to your dump, you are already disconnected at that time and
you really shouldn't play with "hcitool cc ...", because this creation
of a connection is not really recognized by the kernel. Use the L2CAP or
RFCOMM sockets instead.
In general a headset don't reacts on requests for the public browse
group and so you must search for a specific service.
sdptool search --bdaddr <bdaddr> {hs|hf}
> The headset is DKH-03.
>>From what company and what does "hcitool info ..." say about this
headset?
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-21 17:41 ` Marcel Holtmann
2004-10-22 1:18 ` Chen Bin
@ 2004-10-22 1:27 ` Chen Bin
2004-10-22 10:45 ` Marcel Holtmann
2004-10-22 1:31 ` Chen Bin
2 siblings, 1 reply; 8+ messages in thread
From: Chen Bin @ 2004-10-22 1:27 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ Mailing List
HI Marcel,
在2004年10月22日的01:41,Marcel Holtmann写道:
> Hi Chen,
>
> > Thanks very much for previous help from Holtman, and I happen a new
> > problem when I try to find out whether a connected device is a headset.
> >
> > It can't be browsed using sdptool in both connected mode and discovery
> > mode(paring state), I wonder how I can know its charactics after
> > connected?
>
> actually the class of device value can be inside the inquiry cache and
> you will see it when a remote device requests a connection. However we
> don't really store these information together with the connection to
> make them available afterwards. Any patch is welcome.
Can you tell me exactly how I can obtain the class of device, including
using which API or tool or which C file I need to check? I only know the
sdp approach (code in sdptool.c) to check the services provided by
device.
>
> What I don't get is why you can't browse when the device is connected?
> Run "hcidump -X" as root and show it to us so we can see what happens.
>
> > My phone will be appeared in 3G conference next month, so I am very
> > anxious about the bluetooth feature...
>
> What does this mean? Is it good or is it bad? And btw my first name is
> Marcel and not Holtmann.
Sorry,Marcel. What I am anxious about is this task is very urgent, the
bluetooth feature is very important(my boss says), if I can't
complish...
Sorry for expressing my individual trifle in this list...
Chen
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-22 1:27 ` Chen Bin
@ 2004-10-22 10:45 ` Marcel Holtmann
0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2004-10-22 10:45 UTC (permalink / raw)
To: Chen Bin; +Cc: BlueZ Mailing List
Hi Chen,
> > actually the class of device value can be inside the inquiry cache and
> > you will see it when a remote device requests a connection. However we
> > don't really store these information together with the connection to
> > make them available afterwards. Any patch is welcome.
>
> Can you tell me exactly how I can obtain the class of device, including
> using which API or tool or which C file I need to check? I only know the
> sdp approach (code in sdptool.c) to check the services provided by
> device.
this must be done inside the kernel code and actually there is still the
case where the master connects without a previous inquiry and so the
class of device can be unknown.
> > > My phone will be appeared in 3G conference next month, so I am very
> > > anxious about the bluetooth feature...
> >
> > What does this mean? Is it good or is it bad? And btw my first name is
> > Marcel and not Holtmann.
> Sorry,Marcel. What I am anxious about is this task is very urgent, the
> bluetooth feature is very important(my boss says), if I can't
> complish...
>
> Sorry for expressing my individual trifle in this list...
this is ok, but remember that your company wants to make money with a
product and we don't ;)
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bluez-users] how to recognize whether the connected device is a headset
2004-10-21 17:41 ` Marcel Holtmann
2004-10-22 1:18 ` Chen Bin
2004-10-22 1:27 ` Chen Bin
@ 2004-10-22 1:31 ` Chen Bin
2 siblings, 0 replies; 8+ messages in thread
From: Chen Bin @ 2004-10-22 1:31 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ Mailing List
Oh I have made a mistake in my previous mail, the hcitool con 's output
is right for when I press a button in headset, the headset is automatic
connected to my BT device, the link_key is requested so I can avoid
enter PIN code.
Chen
在2004年10月22日的01:41,Marcel Holtmann写道:
> Hi Chen,
>
> > Thanks very much for previous help from Holtman, and I happen a new
> > problem when I try to find out whether a connected device is a headset.
> >
> > It can't be browsed using sdptool in both connected mode and discovery
> > mode(paring state), I wonder how I can know its charactics after
> > connected?
>
> actually the class of device value can be inside the inquiry cache and
> you will see it when a remote device requests a connection. However we
> don't really store these information together with the connection to
> make them available afterwards. Any patch is welcome.
>
> What I don't get is why you can't browse when the device is connected?
> Run "hcidump -X" as root and show it to us so we can see what happens.
>
> > My phone will be appeared in 3G conference next month, so I am very
> > anxious about the bluetooth feature...
>
> What does this mean? Is it good or is it bad? And btw my first name is
> Marcel and not Holtmann.
>
> Regards
>
> Marcel
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-22 10:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-21 9:50 [Bluez-users] how to recognize whether the connected device is a headset Chen Bin
2004-10-21 11:00 ` Fred Schaettgen
2004-10-21 17:41 ` Marcel Holtmann
2004-10-22 1:18 ` Chen Bin
2004-10-22 10:32 ` Marcel Holtmann
2004-10-22 1:27 ` Chen Bin
2004-10-22 10:45 ` Marcel Holtmann
2004-10-22 1:31 ` Chen Bin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox