Skip to content

MTU negotiation not effective? #14

@evovolker

Description

@evovolker

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    conclusion: invalidIssue/PR not validtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions