RE: LMP transaction collision at Set encryption

Started by Mohanan, Rajmohan on Feb 13, 2012 · 4 messages from 2 authors · Last reply Feb 13, 2012

open the first message on its own page

Message details and related content
Hi,
             I got an interesting issue in bluez stack .

1.       I started pairing from my device(DUT) to a remote device (Lenovo T500). After successful bonding bluez send device discovery in    the same ACL connection created prior to BONDING
2.       I'm changed to my role as slave.
3.       From my LMP ,sending Set Connection Encryption, I'm getting LMP Error Transaction Collision as status of my encryption command
           (Remote guy who is a master has also initiated Set encryption).
4.       In between bluez has initiated SDP search after bonding process complete(device_bonding_complete()) so l2cap connect req has initiated and the BT state is BT_CONFIG
5.       From the encryption change event (event status is )x23(LMP transaction collision),l2cap_connect_cfm will call and in that we are disconnecting l2cap and then acl link.

 If we are getting Lmp transaction collision and we are slave . do we need to Disconnect ACL link ? .

We are not able Find the services of remote device because application written in spite of service discovery has initiated after bonding process.


I'm attaching  Hci dump and Air trace
From  hci dump You can find that Slave(DUT) is sending Set encryption command and From Air trace you can see Encryption mod request from Master.
 
I took air trace with Link key which is generated previously. So initial LMP transaction I got in air trace. 
I could not able to put new link key which is generated in current transaction, so after encryption the air trace has some missing packets You can see after  frame 3288 in air trace.


/*code changes*/
                      I have  made changes in hci_event.c  for solving LMP Transaction collision.
When we gets Encrypt change event with error code as LMP  transaction collision , I'm ignoring the change event because From Master Encrypt change event will process and will get encrypt change event with success second time. If we are not getting Encrypt change event from master we are sending again Set encryption from slave( because we already sent a set encryption which result in to a collision) after 1 second delay. If we getting a encrypt change event from master after collision event then we delete timer and process it normally.

I got another issue also  with Lenovo T500laptop where , when ever after bonding Lenovo T500 is initiating a SDP search Request which collides our SDP request(from Bluez we are initiator we are starting SDP query immediately and if we are responder we are delaying for 2 seconds for starting SDP query).

 
For solving this IOP issue I have made a change that if we are initiator also we will delay for 1 second and starting SDP query after bonding.


I'm attaching patch for above two issues.

Please review it and  let me know the feedback.

Regards
Rajmohan


Message details and related content
Hi Rajmohan,

<snip>
I'm attaching patch for above two issues.

Please review it and  let me know the feedback.
please send one patch per email. That is what git format-patch and git
send-email are for.

The commit message needs to have a clear explanation of the issue and
how you are fixing it. Including hcidump log is a good idea as well in
these cases where you have some protocol issues.

Patches need to be signed-off-by and should not contain change-id (that
is Android Gerrit stuff).

Also patches need to be against the latest bluetooth-next tree.

Userspace patches should not contain signed-off-by and also no change-id
here as well.

The need to be against latest upstream and #if hacking is not allowed of
course.

Regards

Marcel

Message details and related content
Hi Marcel,
                      I'm attaching Patch for LMP transaction collision.
I could not Create patch according to Latest Bluez Tree because due to Project Constraints. Please review the patch . I have added Hcidump  aslo.

Regards
Rajmohan


-----Original Message-----
From: <redacted> [mailto:<redacted>] On Behalf Of Marcel Holtmann
Sent: Monday, February 13, 2012 12:58 PM
To: Mohanan, Rajmohan
Cc: <redacted>; <redacted>
Subject: RE: LMP transaction collision at Set encryption

Hi Rajmohan,

<snip>
I'm attaching patch for above two issues.

Please review it and  let me know the feedback.
please send one patch per email. That is what git format-patch and git send-email are for.

The commit message needs to have a clear explanation of the issue and how you are fixing it. Including hcidump log is a good idea as well in these cases where you have some protocol issues.

Patches need to be signed-off-by and should not contain change-id (that is Android Gerrit stuff).

Also patches need to be against the latest bluetooth-next tree.

Userspace patches should not contain signed-off-by and also no change-id here as well.

The need to be against latest upstream and #if hacking is not allowed of course.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html
Message details and related content
Hi Rajmohan,
                      I'm attaching Patch for LMP transaction collision.
I could not Create patch according to Latest Bluez Tree because due to Project Constraints. Please review the patch . I have added Hcidump  aslo.
please use git format-patch and then git send-email. If you have
problems with Exchange, then just point it to linux.intel.com and it
will work smoothly.

Reviewing attached patches is not something we do here. All patches need
to be inline.

Regards

Marcel

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help