-
Notifications
You must be signed in to change notification settings - Fork 46
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
Crashes when using Bluetooth #14
Comments
Hi, thanks for your feedback Both BLE and USB Host uses group timers so it'll always crash. It'll probably crash with WiFi too, best test case scenario was using SPI for SD and TFT in separate tasks with a semaphore. This library is just a wrapper over a proof of concept anyway, for real USB project I use an ESP32-S2 instead, it doesn't have the dual core but tinyusb support is getting better every day. |
I knew that ESP32 has USB support, but without BLE is not what I want. I do have an ESP32-S3 on the way, but before that (but also third parties ESP32-S3 hit the market ) I would like to see if we could avoid the group timer crash. As you can guess, I want to make a BT keyboard using normal wired USB keyboard. I assume if I use software group timer should be fine? But not sure what's the draw back for it since I don't have any experience with esp 32. Or maybe use macros to hook into the BLE keyboard library if it is just software compatibility issue. |
have you tried to play with |
I am a complete noob here but can't we switch to the other Timer Group since there are two? If BLE uses timer_group_0, USH can use the timer_group_1, can't it? |
I'm noob too and can't understand much of the code in this library, especially group timers :-) My assumptions were that Arduino comes with some config settings that can't be changed and now I'm in doubt. timer group init and timer group isr both have the hardcoded Another important detail is the version of arduino-core (2.0.0 recommended), if for some reason you're with an older version, this library may produce a different (sluggish) behaviour. #if defined ESP_IDF_VERSION_MAJOR && ESP_IDF_VERSION_MAJOR >= 4
#define USE_NATIVE_GROUP_TIMERS
#else
#warning "Using software group timers"
#endif |
I have made it worked in a hacky way. I tried changing to TIMER_GROUP_1 but it was still crashing. I have finally made it working by just replacing USH should be initialized before BleKeyboard and I only tested with Sad part was it worked with a cheap logitech office keyboard but not with my mechanical one. Probably because it's fullspeed for some reason. Same with my Logitech mouse, it doesn't work. |
bump I found @martibn's annotated commit while browsing forks I've added The compiler complains when I use @ugurbor can you confirm setting |
Base on the example here, I added ESP32 BLE Keyboard library to it.
I found that it crashes at whatever execute later,
bleKeyboard.begin()
orUSH.init()
.The ESP32 I am using is ESP32-DevkitC (ESP32WROOM32D).
ble.begin() before USH.init()
ble.begin() after USH.init()
The text was updated successfully, but these errors were encountered: