-
Notifications
You must be signed in to change notification settings - Fork 715
BLE arduino example Crash #125
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
Comments
Howdy, A circumvention for problem #121 was to enable logging/debugging. That seems to alleviate the puzzle though we don't know why. Another test just discovered/requested is to change the compilation style of the generated code from CONFIG_OPTIMIZATION_LEVEL_DEBUG to CONFIG_OPTIMIZATION_LEVEL_RELEASE. While we don't know if that will make a difference in this puzzle, it did make a difference in another. We are struggling with this puzzle, #121 and #109 which feel related in that things don't work, they do when we switch on debugging and digging deeper seems to show that memory layout and memory references are making a different which is a much lower level puzzle than we are used to dealing with. There doesn't appear to be anything obvious in the BLE C++ classes code ... but rather the issues seem/feel to be related to the code that is generated by the compilers (guesses so far). If you could studt #121 and try the couple of tests recorded there and report back, it would really help us all. |
Ok, so i got some results tha might help: 1-) I got the problem on windows 10 and ubuntu 16.04 (did a fresh virtualbox install just to test it) and got same problems on both of them. Tomorrow I'll get a mac from a friend to test. 2-) I tested on a chinese board that is a knock off the esp32 devkit from sparkfun(*). I have 3 off these boards and they all gave the same error. I have another one from china that presented the same problem (**)
3-) The part tha breaks the code is in BLEServer *pServer = BLEDevice::createServer(); 4-) I did the make erase_flash using the esp-idf but nothing changed. 5-) Not shure if it is relevant, but I have a working BLE code on arduino using just the stardard esp bluedroid stuff but your library is much cleanner that I would very much like to swich over. I'm going to try the EspExceptionDecoder and set the CONFIG_LOG_DEFAULT_LEVEL to 5 now ... |
Thank you for doing the tests. There was thought in #109 that it might have been constrained to just the Sparkfun boards but that's not what you are running so that is indeed a new data point. I'm hunting down #109 because that is something I am able to recreate and I found that either:
In #109 we thought it was going to be a race condition but no ... it turns out to be a mystery memory access. I'm thinking that these two problems may not be so related after all. The unfortunate thing with your puzzle is that when we switch debugging on, the problem stops and the way to find a failure is by switching on trace/debugging to see where we are. My ideal would be to be able to recreate here. |
I changed the CONFIG_LOG_DEFAULT_LEVEL to 5 and now the example code from the library (BLE_write) works ! I see alot of debug in the terminal but no reboot. Tested on windows 10, soon will try on linux and mac os to see the results. |
We made a big break through. Please read #121 which is the primary of this puzzle (it was first, other puzzles that are the same I consider duplicates). |
Great ! I'm closing this one to folow along on #121 |
Using the arduino BLE_write.ino example from the library, the program chashes
log error on the terminal:
I'm getting the same problem on other BLE examples as well
The text was updated successfully, but these errors were encountered: