public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] HFP Gateway profile
@ 2009-02-12  7:11 Zhao Forrest
  2009-02-12  7:31 ` event
  0 siblings, 1 reply; 6+ messages in thread
From: Zhao Forrest @ 2009-02-12  7:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: event, forrest.zhao

Hi,
I picked up Leonid's patch for HFP Gateway profile and split it into
4 smaller pieces. The main changes are:
1 the coding style fix to align with BlueZ coding style
2 fixed the obvious bugs in hf_io_cb();

The patch set include the following 4 patches:
1 add the D-Bus interface definition for HFP Audio gateway
2 add the basic framework support for HFP Audio gateway
3 the main part for HFP Audio gateway
4  IPC integration part for HFP Audio gateway

Leonid,
Since you're the original author of this patch you may know the best
of "HFP Audio gateway" patch. Let's work together to respond to the
review comments and push to patch into BlueZ upsteam :)

Thanks,
Forrest

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

* Re: [PATCH 0/4] HFP Gateway profile
  2009-02-12  7:11 [PATCH 0/4] HFP Gateway profile Zhao Forrest
@ 2009-02-12  7:31 ` event
  0 siblings, 0 replies; 6+ messages in thread
From: event @ 2009-02-12  7:31 UTC (permalink / raw)
  To: Zhao Forrest; +Cc: linux-bluetooth

On Thu, Feb 12, 2009 at 09:11, Zhao Forrest <forrest.zhao@gmail.com> wrote:
> Hi,
> I picked up Leonid's patch for HFP Gateway profile and split it into
> 4 smaller pieces. The main changes are:
> 1 the coding style fix to align with BlueZ coding style
> 2 fixed the obvious bugs in hf_io_cb();
>
> The patch set include the following 4 patches:
> 1 add the D-Bus interface definition for HFP Audio gateway
> 2 add the basic framework support for HFP Audio gateway
> 3 the main part for HFP Audio gateway
> 4  IPC integration part for HFP Audio gateway
>
> Leonid,
> Since you're the original author of this patch you may know the best
> of "HFP Audio gateway" patch. Let's work together to respond to the
> review comments and push to patch into BlueZ upsteam :)
>
> Thanks,
> Forrest
>
Hello Forrest,

I'll be glad to help you as much as I can.

Vale,
Leonid Movshovich

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

* Re: [PATCH 0/4] HFP Gateway profile
@ 2009-02-13  8:48 Thierry Pierret
  2009-02-13  9:00 ` Michele Noberasco
  2009-02-17  8:31 ` Zhao Forrest
  0 siblings, 2 replies; 6+ messages in thread
From: Thierry Pierret @ 2009-02-13  8:48 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

Hi,

I first tried the Leonid's patch with BlueZ 4.27. I've now applied your 
patches to the BlueZ 4.29. In both cases, the behaviour is the same when I 
attempt to connect my platform with a mobile (Nokia 6810) :

1°/ No "Headset" service is exported.
2°/ As soon as the mobile is paired and the "Handsfree" service is 
connected, the mobiledirectly disconnects. I cannot see in the logs what's 
wrong.

Something is wrong in my configuration. For comparison, could you provide 
the configuration files you used with your patches ?

As info, here are the logs :
- bt_hfp.log : the full log of the bluetoothd daemon before the mobile 
attempts to connect the platform handsfree.
- bt-hfp2.log : the only message the bluetoothd daemon displays when the 
mobile attempt to connect.
- bt-hfp-dump.log : a HCI dump log of the connection

Thanks for your help.
Regards.

Thierry

 

[-- Attachment #2: bt-hfp-dump.log --]
[-- Type: application/octet-stream, Size: 20918 bytes --]

$ hcidump -X -V
HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7
    bdaddr 00:0E:ED:01:DA:66 all 0
> HCI Event: Command Complete (0x0e) plen 6
    Delete Stored Link Key (0x03|0x0012) ncmd 1
    status 0x00 deleted 0


> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:0E:ED:01:DA:66 class 0x520204 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr 00:0E:ED:01:DA:66 role 0x00
    Role: Master
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 00:0E:ED:01:DA:66 role 0x00
    Role: Master
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:0E:ED:01:DA:66 type ACL encrypt 0x00
< ACL data: handle 42 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 42
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:0E:ED:01:DA:66 mode 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 42 slots 5
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
    handle 42 policy 0x0f
    Link policy: RSWITCH HOLD SNIFF PARK 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Command Complete (0x0e) plen 6
    Write Link Policy Settings (0x02|0x000d) ncmd 1
    status 0x00 handle 42
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
    handle 42 ptype 0xcc18
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 
> HCI Event: Command Status (0x0f) plen 4
    Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
    status 0x00 handle 42 ptype 0xff1e
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 2-DH1 2-DH3 2-DH5 3-DH1 3-DH3 3-DH5 
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Info rsp: type 2 result 1
      Not supported
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 672 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 42
    Features: 0xbf 0xee 0x0f 0x00 0x00 0x00 0x00 0x00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:0E:ED:01:DA:66 mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> ACL data: handle 42 flags 0x02 dlen 17
    L2CAP(d): cid 0x0040 len 13 [psm 1]
        SDP SS Req: tid 0x13 len 0x8
          pat uuid-16 0x111e (Handsfree)
          max 255
          cont 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:0E:ED:01:DA:66 name 'Nokia 6810'
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 1]
        SDP SS Rsp: tid 0x13 len 0x9
          count 1
          handle 0x10000
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 21
    L2CAP(d): cid 0x0040 len 17 [psm 1]
        SDP SA Req: tid 0x14 len 0xc
          handle 0x10000
          max 255
          aid(s) 0x0004 (ProtocolDescList)
          cont 00
< ACL data: handle 42 flags 0x02 dlen 31
    L2CAP(d): cid 0x0040 len 27 [psm 1]
        SDP SA Rsp: tid 0x14 len 0x16
          count 19
          aid 0x0004 (ProtocolDescList)
             < < uuid-16 0x0100 (L2CAP) > <
             uuid-16 0x0003 (RFCOMM) uint 0x6 > >
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 32772 
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 32772 
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1013 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:0E:ED:01:DA:66
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
    bdaddr 00:0E:ED:01:DA:66 len 4 pin '0000'
> HCI Event: Command Complete (0x0e) plen 10
    PIN Code Request Reply (0x01|0x000d) ncmd 1
    status 0x00 bdaddr 00:0E:ED:01:DA:66
> HCI Event: Link Key Notification (0x18) plen 23
    bdaddr 00:0E:ED:01:DA:66 key 50FF630C39143AD7458CEA86DEC825CB type 0
    Type: Combination Key
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 42 encrypt 0x01
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 12 frame_type 0 credit_flow 15 pri 0 ack_timer 0
      frame_size 329 max_retrans 0 credits 0
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0040 len 14 [psm 3]
      RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
      dlci 12 frame_type 0 credit_flow 14 pri 0 ack_timer 0
      frame_size 329 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 12 pf 1 ilen 0 fcs 0x43 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 12 pf 1 ilen 0 fcs 0x88 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 12 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 12 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
      dlci 12 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0040 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 12 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 12 pf 1 ilen 0 fcs 0x89 credits 33
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 0 dlci 12 pf 1 ilen 0 fcs 0xc3 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 9
    L2CAP(d): cid 0x0040 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 12 pf 1 ilen 0 fcs 0x53 credits 4
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 0 dlci 12 pf 1 ilen 0 fcs 0xe9 
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6 
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 672 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 42 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 1]
        SDP SSA Req: tid 0x0 len 0xf
          pat uuid-16 0x0100 (L2CAP)
          max 65535
          aid(s) 0x0000 - 0xffff
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 121
> ACL data: handle 42 flags 0x01 dlen 121
> ACL data: handle 42 flags 0x01 dlen 121
> ACL data: handle 42 flags 0x01 dlen 121
> ACL data: handle 42 flags 0x01 dlen 121
> ACL data: handle 42 flags 0x01 dlen 71
    L2CAP(d): cid 0x0040 len 672 [psm 1]
        SDP SSA Rsp: tid 0x0 len 0x29b
          count 660
          cont 04 08 00 00 06
< ACL data: handle 42 flags 0x02 dlen 28
    L2CAP(d): cid 0x0040 len 24 [psm 1]
        SDP SSA Req: tid 0x1 len 0x13
          pat uuid-16 0x0100 (L2CAP)
          max 65535
          aid(s) 0x0000 - 0xffff
          cont 04 08 00 00 06
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 121
> ACL data: handle 42 flags 0x01 dlen 121
> ACL data: handle 42 flags 0x01 dlen 71
    L2CAP(d): cid 0x0040 len 309 [psm 1]
        SDP SSA Rsp: tid 0x1 len 0x130
          count 301
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10000
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1105 (OBEXObjPush) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x9 > <
                 uuid-16 0x0008 (OBEX) > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > >
              aid 0x0100 (SrvName)
                 str "OBEX Object Push"
              aid 0x0303 (SuppFormatsList)
                 < uint 0xff >
          record #1
              aid 0x0000 (SrvRecHndl)
                 uint 0x10001
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1106 (OBEXObjTrnsf) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xa > <
                 uuid-16 0x0008 (OBEX) > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1106 (OBEXObjTrnsf) uint 0x100 > >
              aid 0x0100 (SrvName)
                 str "OBEX File Transfer"
          record #2
              aid 0x0000 (SrvRecHndl)
                 uint 0x10002
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1103 (DUN) uuid-16 0x1201 (Networking) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x1 > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1103 (DUN) uint 0x100 > >
              aid 0x0100 (SrvName)
                 str "Dial-up networking"
          record #3
              aid 0x0000 (SrvRecHndl)
                 uint 0x10003
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1101 (SP) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xf > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0100 (SrvName)
                 str "Nokia PC Suite"
          record #4
              aid 0x0000 (SrvRecHndl)
                 uint 0x10004
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1101 (SP) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x3 > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0100 (SrvName)
                 str "COM 1"
          record #5
              aid 0x0000 (SrvRecHndl)
                 uint 0x10005
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x111f (Handsfree AG) uuid-16 0x1203 (Audio) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xd > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x111e (Handsfree) uint 0x101 > >
              aid 0x0100 (SrvName)
                 str "Voice Gateway"
              aid 0x0301 (SuppDataStoresList)
                 uint 0x1
              aid 0x0311 (SuppFeatures)
                 uint 0xf
          record #6
              aid 0x0000 (SrvRecHndl)
                 uint 0x10006
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1112 (Headset AG) uuid-16 0x1203 (Audio) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xc > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x1108 (Headset) uint 0x100 > >
              aid 0x0100 (SrvName)
                 str "Audio Gateway"
          record #7
              aid 0x0000 (SrvRecHndl)
                 uint 0x10008
              aid 0x0001 (SrvClassIDList)
                 < uuid-128 00000002-0000-1000-8000-0002ee000002 >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xb > <
                 uuid-16 0x0008 (OBEX) > >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0100 (SrvName)
                 str "Client SYNCML"
          record #8
              aid 0x0000 (SrvRecHndl)
                 uint 0x10009
              aid 0x0001 (SrvClassIDList)
                 < uuid-128 00005001-0000-1000-8000-0002ee000001 >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x5401 > >
          record #9
              aid 0x0000 (SrvRecHndl)
                 uint 0x1000a
              aid 0x0001 (SrvClassIDList)
                 < uuid-128 00005002-0000-1000-8000-0002ee000001 >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0xe > >
          record #10
              aid 0x0000 (SrvRecHndl)
                 uint 0x1000b
              aid 0x0001 (SrvClassIDList)
                 < uuid-128 00005003-0000-1000-8000-0002ee000001 >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) uint 0x5801 > >
          record #11
              aid 0x0000 (SrvRecHndl)
                 uint 0x1000c
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x112d (SAP) uuid-16 0x1204 (Telephony) >
              aid 0x0004 (ProtocolDescList)
                 < < uuid-16 0x0100 (L2CAP) > <
                 uuid-16 0x0003 (RFCOMM) uint 0x4 > >
              aid 0x0005 (BrwGrpList)
                 < uuid-16 0x1002 (PubBrwsGrp) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0009 (BTProfileDescList)
                 < < uuid-16 0x112d (SAP) uint 0x100 > >
              aid 0x0100 (SrvName)
                 str "SIM ACCESS"
          cont 00
< ACL data: handle 42 flags 0x02 dlen 24
    L2CAP(d): cid 0x0040 len 20 [psm 1]
        SDP SSA Req: tid 0x2 len 0xf
          pat uuid-16 0x1200 (PNPInfo)
          max 65535
          aid(s) 0x0000 - 0xffff
          cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 103
    L2CAP(d): cid 0x0040 len 99 [psm 1]
        SDP SSA Rsp: tid 0x2 len 0x5e
          count 91
          record #0
              aid 0x0000 (SrvRecHndl)
                 uint 0x10007
              aid 0x0001 (SrvClassIDList)
                 < uuid-16 0x1200 (PNPInfo) >
              aid 0x0006 (LangBaseAttrIDList)
                 < uint 0x656e uint 0x6a uint 0x100 >
              aid 0x0101 (SrvDesc)
                 str "PnP Information"
              aid 0x0200 (VersionNumList)
                 uint 0x95
              aid 0x0201 (SrvDBState)
                 uint 0x1
              aid 0x0202 (unknown)
                 uint 0x1a9a
              aid 0x0203 (unknown)
                 uint 0x0
              aid 0x0204 (unknown)
                 bool 0x1
              aid 0x0205 (unknown)
                 uint 0x1
          cont 00
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
> ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 42 reason 0x13
    Reason: Remote User Terminated Connection

[-- Attachment #3: bt-hfp2.log --]
[-- Type: application/octet-stream, Size: 234 bytes --]

bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: link_key_request (sba=00:02:5B:00:A5:A5, dba=00:0E:ED:01:DA:66)
bluetoothd[1772]: kernel auth requirements = 0x00
bluetoothd[1772]: stored link key type = 0x00

[-- Attachment #4: bt-hfp.log --]
[-- Type: application/octet-stream, Size: 2764 bytes --]

 bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: adapter_create_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: Creating device /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66
bluetoothd[1772]: pin_code_request (sba=00:02:5B:00:A5:A5, dba=00:0E:ED:01:DA:66)
bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: requesting agent authentication
Agent_message was called!
Agent called: RequestPinCode
Device path = /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66
Agent has been released
bluetoothd[1772]: link_key_notify (sba=00:02:5B:00:A5:A5, dba=00:0E:ED:01:DA:66, type=0)
bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: HCIGETAUTHINFO failed: Invalid argument (22)
bluetoothd[1772]: hcid_dbus_bonding_process_complete: status=00
bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: setting timer for reverse service discovery
bluetoothd[1772]: adapter_get_device(00:0E:ED:01:DA:66)
bluetoothd[1772]: Probe drivers for /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66
bluetoothd[1772]: Found Handsfree AG record
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 0000111F-0000-1000-8000-00805F9B34FB
bluetoothd[1772]: Registered interface org.bluez.Serial on path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66
bluetoothd[1772]: Probe drivers for /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66
bluetoothd[1772]: audio handle_uuid: server not enabled for 00001112-0000-1000-8000-00805f9b34fb (0x1112)
bluetoothd[1772]: Found Handsfree AG record
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001105-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001106-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001103-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001101-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001101-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 0000111f-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00001112-0000-1000-8000-00805f9b34fb
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00000002-0000-1000-8000-0002ee000002
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 00005002-0000-1000-8000-0002ee000001
bluetoothd[1772]: serial_probe: path /org/bluez/1772/hci0/dev_00_0E_ED_01_DA_66: 0000112d-0000-1000-8000-00805f9b34fb

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

* Re: [PATCH 0/4] HFP Gateway profile
  2009-02-13  8:48 Thierry Pierret
@ 2009-02-13  9:00 ` Michele Noberasco
  2009-02-17  8:31 ` Zhao Forrest
  1 sibling, 0 replies; 6+ messages in thread
From: Michele Noberasco @ 2009-02-13  9:00 UTC (permalink / raw)
  To: BlueZ development; +Cc: Thierry Pierret

Il giorno 13/feb/09, alle ore 09:48, Thierry Pierret ha scritto:

> 2°/ As soon as the mobile is paired and the "Handsfree" service is
> connected, the mobiledirectly disconnects. I cannot see in the logs  
> what's
> wrong.

I experienced this issue myself when I tried to implement the same  
functionality. I didn't get so far as to address it, but in my case  
the issue could be work-arounded (only for tests of course, a proper  
fix would be needed before a release anyway) by having the device  
receive a phone call during (or immadiately after) connection. In this  
case, it will stay connected at least for the duration of the call.

Regards,
Michele Noberasco


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

* Re: [PATCH 0/4] HFP Gateway profile
  2009-02-13  8:48 Thierry Pierret
  2009-02-13  9:00 ` Michele Noberasco
@ 2009-02-17  8:31 ` Zhao Forrest
  2009-02-18 10:11   ` Thierry Pierret
  1 sibling, 1 reply; 6+ messages in thread
From: Zhao Forrest @ 2009-02-17  8:31 UTC (permalink / raw)
  To: Thierry Pierret; +Cc: linux-bluetooth, event

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

> 1°/ No "Headset" service is exported.
Yes, this patch only provides the support for "Handsfree", so no
"Headset" service is exported.

> 2°/ As soon as the mobile is paired and the "Handsfree" service is
> connected, the mobiledirectly disconnects. I cannot see in the logs what's
> wrong.
>
Please apply the attached patch against my posted patch set and try
again. It works for me
to connect with Nokia N95.

Thanks,
Forrest

[-- Attachment #2: 5.patch --]
[-- Type: application/octet-stream, Size: 1628 bytes --]

diff --git a/audio/gateway.c b/audio/gateway.c
index 4b86c4e..895c772 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -543,6 +543,11 @@ static void rfcomm_connect_cb(GIOChannel * chan, int err, const bdaddr_t * src,
 	gateway_close(gw);
 }
 
+void gateway_start_service(struct audio_device *device)
+{
+	rfcomm_connect_cb(device->gateway->rfcomm, 0, NULL, NULL, device);
+}
+
 static void get_record_cb(sdp_list_t * recs, int err, gpointer user_data)
 {
 	struct audio_device *dev = user_data;
diff --git a/audio/gateway.h b/audio/gateway.h
index f217544..3546cd4 100644
--- a/audio/gateway.h
+++ b/audio/gateway.h
@@ -38,4 +38,4 @@ int gateway_config_stream(struct audio_device *dev, gateway_stream_cb_t cb,
 gboolean gateway_cancel_stream(struct audio_device *dev, unsigned int id);
 int gateway_get_sco_fd(struct audio_device *dev);
 void gateway_suspend_stream(struct audio_device *dev);
-
+void gateway_start_service(struct audio_device *device);
diff --git a/audio/manager.c b/audio/manager.c
index 178de73..36d7f87 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -498,8 +498,20 @@ drop:
 
 static void gateway_auth_cb(DBusError *derr, void *user_data)
 {
+	struct audio_device *device = user_data;
+
 	if (derr && dbus_error_is_set(derr))
 		error("Access denied: %s", derr->message);
+	else {
+		char ag_address[18];
+
+		ba2str(&device->dst, ag_address);
+		debug("Accepted AG connection from %s for %s",
+			ag_address, device->path);
+		debug("in gateway_auth_cb, src is %d", device->src);
+
+		gateway_start_service(device);
+	}
 }
 
 static void hf_io_cb(GIOChannel *chan, int err, const bdaddr_t *src,

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

* Re: [PATCH 0/4] HFP Gateway profile
  2009-02-17  8:31 ` Zhao Forrest
@ 2009-02-18 10:11   ` Thierry Pierret
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Pierret @ 2009-02-18 10:11 UTC (permalink / raw)
  To: linux-bluetooth

Many thanks for this.

But it did not work either (same behaviour).
I only performed a quick test since currently I don't get the time to.
Here is what I noticed that I did not notice before :
New messages appear :

        bluetoothd[1815]: headset_probe: path 
/org/bluez/1815/hci0/dev_00_0E_ED_01_DA_55
        bluetoothd[1815]: probe failed with driver input-headset for 
device /org/bluez/1815/hci0/dev_00_0E_ED_01_DA_55

And after a while (a few seconds after the test ends), other messages 
appear :

        bluetoothd[1815]: Agent replied with an error: 
org.freedesktop.DBus.Error.NoReply, Did not receive a reply. Possible 
causes include: the remote application did not send a reply, the message 
bus security policy blocked the reply, the reply timeout expired, or the 
network connection was broken.
        bluetoothd[1815]: Access denied: Did not receive a reply. Possible 
causes include: the remote application did not send a reply, the message 
bus security policy blocked the reply, the reply timeout expired, or the 
network connection was broken.
And a "Cancel" message has been received by the Agent. I don't know if 
this has an impact or if it is a consequence of the disconnection.

I will dive into this issue in a few days.
As I do not catch all the points in the way the HFP profile works, I'm 
quite sure that I'm doing something wrong.
Will keep you informed.

Regards.
Thierry



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

end of thread, other threads:[~2009-02-18 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12  7:11 [PATCH 0/4] HFP Gateway profile Zhao Forrest
2009-02-12  7:31 ` event
  -- strict thread matches above, loose matches on Subject: below --
2009-02-13  8:48 Thierry Pierret
2009-02-13  9:00 ` Michele Noberasco
2009-02-17  8:31 ` Zhao Forrest
2009-02-18 10:11   ` Thierry Pierret

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