Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have separate writeQueue for each serviceUUID or characteristicUUID ? #1211

Open
jeffnian88 opened this issue Apr 28, 2024 · 1 comment

Comments

@jeffnian88
Copy link

jeffnian88 commented Apr 28, 2024

Describe the bug
In my application, we could connect to Two ble devices.

To Reproduce
Steps to reproduce the behavior:

  1. Connect to two ble devices(device A and devices B)
  2. Write different message to different Device , message A to device A, message B to device B
  3. Error: we will see the message A from device B

Expected behavior
see message A from device A
see message B from device B

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: iOS device
  • OS: N/A
  • react-native-ble-manager version: 11.5.2
  • react-native version: 0.74.0

Additional context
Add any other context about the problem here.
And, after tracing the code in ios/swift,
we found the following code could be the root cause
https://github.com/innoveit/react-native-ble-manager/blob/master/ios/BleManager.swift#L549
https://github.com/innoveit/react-native-ble-manager/blob/master/ios/BleManager.swift#L576
it seems like that we use the same writeQueue here for two devices.
so, is it possible that we can rewrite the writeQueue here?

@jeffnian88 jeffnian88 changed the title Can we have separate writeQueue for each serviceUUID and characteristicUUID ? Can we have separate writeQueue for each serviceUUID or characteristicUUID ? Apr 28, 2024
@marcosinigaglia
Copy link
Member

Hi @jeffnian88 , you can simply avoid the bug slitting you message in the react native side.

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

No branches or pull requests

2 participants