All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrizio Guglielmino <guglielmino@infitsrl.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] It's rfcomm connect problem
Date: Mon, 24 Jul 2006 15:33:43 +0200	[thread overview]
Message-ID: <44C4CC37.1060308@infitsrl.com> (raw)
In-Reply-To: <20060724103824.1ff98fa6@McGee-XPC>

Hi Andy,
I Andy the problem I have is described in following hcidump:

< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:09:2D:2A:68:20 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
 > HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:01:E3:25:53:44 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
 > HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x0c ncmd 1
    Error: Command Disallowed
 > HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:09:2D:2A:68:20 type ACL encrypt 0x00
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 3 scid 0x0040
 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 42 packets 1
 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 42 slots 5
 > ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0044 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0044 flags 0x00 clen 4
      MTU 1024
 > ACL data: handle 42 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1691
< ACL data: handle 42 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0044 flags 0x00 result 0 clen 0
      Success
 > 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 8
    L2CAP(d): cid 0x0044 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
 > 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 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 42 flags 0x02 dlen 18
    L2CAP(d): cid 0x0044 len 14 [psm 3]
      RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
      dlci 4 frame_type 0 credit_flow 15 pri 7 ack_timer 0
      frame_size 1019 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 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 4 frame_type 0 credit_flow 14 pri 0 ack_timer 0
      frame_size 1019 max_retrans 0 credits 7
< ACL data: handle 42 flags 0x02 dlen 8
    L2CAP(d): cid 0x0044 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 4 pf 1 ilen 0 fcs 0x96
 > 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 1 dlci 4 pf 1 ilen 0 fcs 0x5d
< ACL data: handle 42 flags 0x02 dlen 12
    L2CAP(d): cid 0x0044 len 8 [psm 3]
      RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 4 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
 > 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 4 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 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 4 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 12
    L2CAP(d): cid 0x0044 len 8 [psm 3]
      RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
      dlci 4 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 0x0044 len 5 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 4 pf 1 ilen 0 fcs 0x79 credits 33
< ACL data: handle 42 flags 0x02 dlen 25
    L2CAP(d): cid 0x0044 len 21 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 4 pf 0 ilen 17 fcs 0x65
      0000: 80 00 11 10 00 08 00 00  00 00 00 00 00 00 00 00  =

................
      0010: 00                                                .
 > 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
 > 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 0 dlci 4 pf 1 ilen 0 fcs 0xa3 credits 23

As You can see the second Create Connection fails with a Command =

disallowed.....
In my case I've no see any hci_reset.....

Hi
Fabrizio


Andreas Gaufer ha scritto:
> Hi Fabrizio,
>
> i'm working on a possibly related problem. Could you check the hcidump of
> your situation and look out for apparently unmotivated hci_reset
> commands sent to your device? =

>
> Greetings & TIA
>
> Andy
>
> On Sat, 22 Jul 2006 16:08:08 +0200
> Fabrizio Guglielmino <guglielmino@infitsrl.com> wrote:
>
>   =

>> Hi all,
>> I made some investigation about the BtOBEX_TransportConnect signaled  =

>> to the list and Marcel some days before.
>> Openobex isn't involved in the problem, in my try I've writed from  =

>> scatch a simple obex push client (not using openobex but only
>> socket).
>> In my test I found this : if there are two thread (also two process)  =

>> making something like
>>
>>   ...
>>   ret =3D connect(fd, (struct sockaddr *)dst, sizeof(struct sockaddr_rd)=
);
>>   ...
>>
>> in simultaneous way the second always fail (return -1). I've also  =

>> tryed to "protect" the connect using a mutex and all works
>> but (naturally) second connection result conditioned to the frist  =

>> (syncronous so thread it is not useful).
>>
>> I think there is some solution to this but I don't know if it's using  =

>> some ioctl on socket (nonbloking?) or some hci command to adapter.
>> Please can some one give me some hint?
>>
>> I'm looking at kernel source related to rfcomm (/usr/src/ =

>> linux-2.6.116/net/bluetooth/rfcomm/*.c) but I'm not sure the problem  =

>> reside here...
>>
>>
>> thanks, bye
>> Fabrizio =

>>
>> -------------------------------------------------------------------------
>> 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=3Djoin.php&p=3Dsourceforge&CID=
=3DDEVDEV
>> _______________________________________________
>> Bluez-devel mailing list
>> Bluez-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>>     =

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



-- =

______________________________
Fabrizio Guglielmino =

Infit Srl
Software Engineering
Tel. +39 11 7410915
Fax. +39 11 7410915
www.infitsrl.com
C.so Svizzera, 79/8 - Torino
______________________________

Il presente messaggio ed ogni eventuale allegato hanno natura
confidenziale e sono riservati ai destinatari indicati. La diffusione a
terzi e qualsiasi altro uso non autorizzato sono proibiti. I messaggi ed
i relativi allegati possono essere soggetti ad alterazioni. Il mittente
declina ogni responsabilit=E0 per le eventuali alterazioni, modificazioni
o falsificazioni.


-------------------------------------------------------------------------
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=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-07-24 13:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-19 16:28 [Bluez-devel] Error: sdptool browse --> Connection reset by peer JP Freeley
2006-07-20  0:48 ` Marcel Holtmann
2006-07-20 21:27   ` JP Freeley
2006-07-25  4:26     ` JP Freeley
2006-07-22 14:08   ` [Bluez-devel] It's rfcomm connect problem Fabrizio Guglielmino
2006-07-24  8:38     ` Andreas Gaufer
2006-07-24 13:33       ` Fabrizio Guglielmino [this message]
2006-07-24 13:56         ` Andreas Gaufer
2006-07-24 16:35           ` Marcel Holtmann
2006-07-24 18:34             ` Andreas Gaufer
2006-07-24 20:30               ` Fabrizio Guglielmino
2006-07-24 21:12                 ` Marcel Holtmann
2006-07-27  9:04                   ` Fabrizio Guglielmino
2006-07-27  9:25                     ` [Bluez-devel] It's rfcomm connect problem [ERRATA] Fabrizio Guglielmino
2006-07-28 11:14                     ` [Bluez-devel] It's rfcomm connect problem Marcel Holtmann
2006-07-31 10:02                       ` [Bluez-devel] About l2cap patch to handle multiple connections Fabrizio Guglielmino
2006-07-31 14:14                         ` Marcel Holtmann
2006-08-02 11:24                           ` Fabrizio Guglielmino
2006-08-02 13:43                             ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44C4CC37.1060308@infitsrl.com \
    --to=guglielmino@infitsrl.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.