FW: LMP transaction collision at Set encryption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



Attachment: 0001-Service-discovery-collision-after-bonding-handling.patch
Description: 0001-Service-discovery-collision-after-bonding-handling.patch

Attachment: 0001-LMP-Transaction-Collision-handling-set-encryption.patch
Description: 0001-LMP-Transaction-Collision-handling-set-encryption.patch


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux