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

ReadLongCharacteristic() uses RxMtu() #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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