Skip to content

MTU negotiation not effective? #14

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

Closed
evovolker opened this issue Aug 28, 2019 · 1 comment
Closed

MTU negotiation not effective? #14

evovolker opened this issue Aug 28, 2019 · 1 comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@evovolker
Copy link

evovolker commented Aug 28, 2019

Hi
I am using v1.1.0 of the library with a Nano 33 Iot (NINA w10) and Android API 26. When I request a larger MTU on central:

bleQueue.requestMtu(256);

I get an apparent success:

D/BluetoothGatt: onConfigureMTU() - Device=... mtu=242 status=0

I then write this MTU to the peripheral and use the nearest lower power of 2 (I tried various values, all the same):

newMTUsize = 128;
dataCharacteristic.setValue(mVals, newMTUsize);

However, the byte[] data received on central via:

final byte[] data = characteristic.getValue();

has data.length: 34

I found a variable _maxMtu in utility/ATT.cpp set to the conventional 23:

_maxMtu(23),

but changing this has no observable effect.

Is this a user, device or code issue?


EDITED TO UPDATE:

It was a user issue:

BLECharacteristic dataCharacteristic(DATA_CHARACTERISTIC_UUID, BLERead | BLEIndicate, origMTUsize);
cparata added a commit to cparata/ArduinoBLE that referenced this issue Sep 30, 2020
@rishita-asl
Copy link

Hii,

I am facing the same issue here. Did anyone find a solution?

@per1234 per1234 added type: imperfection Perceived defect in any part of project conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself labels Nov 28, 2024
@arduino-libraries arduino-libraries locked as resolved and limited conversation to collaborators Nov 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants