Closed mehmetalianil closed 1 year ago
Thanks for the comprehensive tests. My portal rewrite probably threw a wrench in there somewhere. I'll take a look later
(bcd957e was a complete rewrite and restructure of the portal, so there's some deadlock or something happening there that shouldn't exist. The reintroduction of DropBombs causing it to panic gives me a hint as to what it could be)
Yes, this fix resolved my issue. Thank you so much! I am not sure how you actually caught the bug without making me reproduce again on my machine. (Sorry, I was away.) Will check the chat logs now.
Summary
Some change on bcd957ee81b31f70cc402fbab438d5d2ff526c45 results in a panic when advertisement starts. After some change on 2a086aa3a87de27297b6de8bd07f7412697e057c this was eliminated, only to panic only when an advertisement is connected to. After a RawError(InvalidState) This results in an advertisement timeout. We froze our nrf-softdevice requirement at 36acd5002b4fd41adb5e3c413019b3c8c7cf4bb2, which is the latest commit that does not panic.
Code
What we do differently is that we dynamically change the advertisement timeout and advertisement interval. Therefore advertisement drops periodically and bluetooth task loop initiates it again periodically. Other than that we have too many characteristics (50 and counting)
RawError(InvalidState) logs
Log panic without RawError
Other data
Tested every commit.
7e13a0dcb6ba2ee0ebecb55a9cbfc87016ec4761->works 0b1cafe91900fb004758d27f29cd0091db36069b -> works 7989ce36bc30e2b8fa2ab0ed95d0774bb69d9e07-> works 36acd5002b4fd41adb5e3c413019b3c8c7cf4bb2 -> works bcd957ee81b31f70cc402fbab438d5d2ff526c45 -> panics before connection b6514913d9cd44e518b4310f2b8140e0e132b0f5 -> panics before connection 2a086aa3a87de27297b6de8bd07f7412697e057c -> panics with InvalidState 7b4d9d02b81b7261c1758719b9cf0a7f4b986ddb -> panics with InvalidState 5e00dbc77747cf53a54c3ea1f5b95d61a8bc086f -> panics with InvalidState