Skip to content

after bonding, then call writeCharacteristic, it fail#479

Closed
eaglewangy wants to merge 0 commit intonordicsemi:mainfrom
eaglewangy:bugfix/write_fail_after_bonded
Closed

after bonding, then call writeCharacteristic, it fail#479
eaglewangy wants to merge 0 commit intonordicsemi:mainfrom
eaglewangy:bugfix/write_fail_after_bonded

Conversation

@eaglewangy
Copy link
Copy Markdown

@eaglewangy eaglewangy commented Mar 14, 2023

After bonding, the variable operationInProgress in file BleManagerHandler.java remains true. So calling api writeCharacteristic will fail. It need to reset this variable after bonding.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 14, 2023

CLA assistant check
All committers have signed the CLA.

@philips77
Copy link
Copy Markdown
Contributor

What phone and OS version are you getting this issue?

@philips77
Copy link
Copy Markdown
Contributor

Does your device bond after connection or as a result of Insufficient Auth error on GATT operation (read / write)?

@eaglewangy
Copy link
Copy Markdown
Author

What phone and OS version are you getting this issue?

We tested on Galaxy S9(SM-G9600/DS), XiaoMi Mi11 Ultra.
It should be a general issue

@eaglewangy
Copy link
Copy Markdown
Author

Does your device bond after connection or as a result of Insufficient Auth error on GATT operation (read / write)?

It bonded successfully. No error reported

@philips77
Copy link
Copy Markdown
Contributor

Does your device bond after connection or as a result of Insufficient Auth error on GATT operation (read / write)?

It bonded successfully. No error reported

I was asking when during the connection do you bond to the device. Is the bonding requested from the device side just after connection, or when the central tries to access an attribute, or by a request from the phone?

@philips77 philips77 closed this Mar 15, 2023
@philips77 philips77 reopened this Mar 15, 2023
@eaglewangy
Copy link
Copy Markdown
Author

Does your device bond after connection or as a result of Insufficient Auth error on GATT operation (read / write)?

It bonded successfully. No error reported

I was asking when during the connection do you bond to the device. Is the bonding requested from the device side just after connection, or when the central tries to access an attribute, or by a request from the phone?

The process is:

  1. connect to a bluetooth device.
  2. call writeCharacteristic to send some data.
  3. call ensureBond
  4. call writeCharacteristic, then failed. cause the operationInProgress is true

@philips77
Copy link
Copy Markdown
Contributor

Thanks, that should be enough for me to replicate.

@eaglewangy
Copy link
Copy Markdown
Author

Thanks, that should be enough for me to replicate.

Hi Philips, Any progress?

@philips77
Copy link
Copy Markdown
Contributor

No, sorry, I still didn't have time to look into it. I hope your fix works for you for now.

@eaglewangy
Copy link
Copy Markdown
Author

No, sorry, I still didn't have time to look into it. I hope your fix works for you for now.

It works for me now. But I want to use the official release including this fix. Is there an ETA

@eaglewangy
Copy link
Copy Markdown
Author

Contributor

No, sorry, I still didn't have time to look into it. I hope your fix works for you for now.

@philips77 Have any progress?

@philips77
Copy link
Copy Markdown
Contributor

I still haven't had time to work on this library, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants