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

Throw exception if write is performed with data size exceeding MTU #298

Open
twyatt opened this issue Apr 4, 2022 · 2 comments
Open

Throw exception if write is performed with data size exceeding MTU #298

twyatt opened this issue Apr 4, 2022 · 2 comments

Comments

@twyatt
Copy link
Member

twyatt commented Apr 4, 2022

Assuming that MTU can be reliably checked on all platforms, Kable should throw an exception if a write is performed with a payload that exceeds the current MTU.

Currently (at least on Android and Core Bluetooth) it appears that the data is silently not sent, which can result in difficult to debug bugs (see #297).

@ivanalek
Copy link

How can we query the MTU for iOS so we don't even perform write with a payload that exceeds the current MTU. I can see that this method returns the currently negotiated MTU for iOS, but currently it is not exposed throughout the kotlin code. Is there a plan to improve this in the future or maybe there is another recommended way to do this already?

@twyatt
Copy link
Member Author

twyatt commented Oct 13, 2023

Thanks for the link, I hadn't discovered that method. That'll be helpful when we try to tackle this.
It might be a while before we can prioritize this effort though.
PRs or discussions (to go over possible solutions/API designs) are welcome in the mean time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants