Skip to content

ReadLongCharacteristic() uses RxMtu()#111

Open
sschulz-t wants to merge 1 commit intogo-ble:masterfrom
sschulz-t:master
Open

ReadLongCharacteristic() uses RxMtu()#111
sschulz-t wants to merge 1 commit intogo-ble:masterfrom
sschulz-t:master

Conversation

@sschulz-t
Copy link

I think ReadLongCharacteristic() should use RxMTU() to decide if the read length hints to a follow up transfer:

ble/linux/gatt/client.go

Lines 234 to 239 in 8c5522f

for len(read) >= p.conn.TxMTU()-1 {
if read, err = p.ac.ReadBlob(c.ValueHandle, uint16(len(buffer))); err != nil {
return nil, err
}
buffer = append(buffer, read...)
}

Testcase:
Call client.ExchangeMTU(200) to limit the MTU on our side.
Then trigger a long read. You will notice that the date length returned matches this 200.

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.

1 participant