React-native-ble-plx: [Android] Negotiate highest possible MTU by default

Created on 8 Apr 2019  路  5Comments  路  Source: Polidea/react-native-ble-plx

Current Behavior

iOS negotiates MTU by default to the highest value. Android does not unless explicitly instructed,

New behavior

Both systems negotiate MTU to the highest value by default.

Acceptance criteria

Please provide detailed steps to accomplish proposed feature.

  1. Connect to a peripheral that supports MTU > 23
  2. Write to this peripheral's characteristic data that is longer than 20 bytes
  3. Verify if the whole data was transmitted

Breaking changes

None. Only behaviour changes. Old connection options / MTU negotiation API may be deprecated.

This could fix confusion and mitigate issues like #446

enhancement pending

Most helpful comment

Not stale

All 5 comments

@dariuszseweryn I guess that you wrote steps to verify implementation (they are not needed to accomplish proposed feature)?

I guess that you wrote steps to verify implementation

Correct

they are not needed to accomplish proposed feature

Correct

I have run some tests on devices with Android 5 and on some (e.g. Micromax Canvas) the MTU seems to timeout or return a GATT_ERROR if called against a peripheral that supports max MTU=23 (SensorTag)

For this case:

  • it should be possible to turn automatic MTU negotiation off (default on)
  • have a good error description/logging/user feedback
  • carry on with the connection if MTU negotiation would return an error

I am currently brainstorming. I can work on this feature once settled

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Not stale

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haohcraft picture haohcraft  路  5Comments

biks152207 picture biks152207  路  3Comments

samthui picture samthui  路  4Comments

BlackCod3 picture BlackCod3  路  3Comments

nriccar picture nriccar  路  3Comments