-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Help wanted] l2cap not working together with android #126
Comments
Thanks for the report. Trouble only supports connection oriented l2cap channels, are you sue it's trying to create those? You can try to enable these log lines, and maybe also some in host.rs handle_acl() to see if it tries to establish the l2cap channel. |
Thanks, thats a good direction, i tried that immediately. And i also researched twice that android supports that, see https://developer.android.com/about/versions/10/features#bluetooth-le-coc also i found a hidden api that might be exactly what i need, there is also a feature request demanding access to this part https://issuetracker.google.com/issues/36976247 which was still not accepted. so i have two options now, going native on the android side and try to get as deep as i can, or build the channel stuff on the rust side. things gotten a bit more wierd than i would like the to be, but i cannot enable trace log level as this breaks somehow the programm? on debug level it works, so i think the logging while running ble is just too much at some point. so, i decided to add an example of whats happening. i need to fill in the rust side but android looks somehow okay to me, at least representable and testable. Everything is build to be manually to avoid timings or multiple builds for different scenatios. ill play around a bit more and try to build a testable setup. after that ill hit here again, maybe the problem can be narrowed down more easily. |
I think that's probably the esp-hal logging a lot on the trace level. I've not tried it, but you should be able to finetune the logging targets to make it less spammy: https://crates.io/crates/esp-println/0.6.0
Add that to this section |
Were you able to get it working and/or get more debug output? |
Sadly not, and sadly no additional informations. |
i tried to run the code from the example on a esp32-wroom-32.
i adapted the code to let it build and run.
the GATT communication is working fine, but as soon as i try to swap to a l2cap communication an communication cannot be established
on the android side this error appears, the stacktrace indicates that android tries to read from the channel
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
on the esp32 side nothing happens except when i connect the gatt first, but there is no reaction that the channel got a package
i tried different settings:
im really curios whats the problem beneath it. (still i suspect myself for being the problem)
The text was updated successfully, but these errors were encountered: