-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix and minor changes regarding MTU in network.bluetoothLE
#136
base: develop
Are you sure you want to change the base?
Conversation
…ctDevice is not used - network.bluetoothLE: changed to trigger event new device status on disconnect - network.bluetoothLE: added method onMtuChanged
network.bluetoothLE
Thanks! Just out of curiosity, what type of problem did you have? |
I connect to Bangle.js which has a max MTU of 53, and for now I require this message size (custom protocol). So the issue was that I called |
Unrelated to this PR: Fyi, I released the first version of my project at https://gitlab.com/notEvil/cyclometer :) |
Wow, such a cool project! Also the Discord has low / near-non traffic but it would be perfect to share it there. |
Thanks! You can link/mention it when/wherever you want. A section about projects using PHONK would be really nice! |
…as argument value
I've added another commit because |
…is called for every known satellite
And another which fixes the calling behavior of |
It perfect here! Thanks so much for the fixes. The bluetooth one totally makes sense. IIRC when that was implemented I made it for a specific use case I had where I was just using strings so I took that shortcut 😅 |
Sorry is taking a bit longer than expected to review this. |
Hi,
peripheral.requestMtu
doesn't do anything if not connected, see https://github.com/weliem/blessed-android/blob/ee8d966692a233457ed8ac967ba37a5ef9d69630/blessed/src/main/java/com/welie/blessed/BluetoothPeripheral.java#L1541Therefore,
mtuSize
ofconnectDevice
is essentially ignored.This PR fixes this issue and additionally exposes two events: disconnect and MTU changed
Feel free to adjust code style if not appropriate