-
Notifications
You must be signed in to change notification settings - Fork 804
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
Discovery with theengs decoder #1106
Conversation
@NorthernMan54 would it be possible to check if this PR enables still to retrieve DT24 data please ? |
@1technophile Yes, I can do a regression test. Just need approx 72 hours ( currently not close to my DT24 device ) |
@1technophile - Status Update - Loaded this version up last night onto one of my test devices last night, and ran into this exception being triggered just after boot up. So now double clicking into the issue, and will update. My first check will be to see if this was trigger by pull request or something prior to it. I had not updated to a newer code base in a few moths, so wanted to check that first.
|
The canary exception, I had it once, would it be possible to activate the trace log level to have more information please? @NorthernMan54 |
Might need to increase the NimBLE host task stack size a bit. NimBLE-Arduino Master branch might also resolve this and also has added calls to check the stack use. |
@h2zero That was it, I upped the stack size from the default 4096 to 8096 and things stabilized. Now for some regression testing. I had added this to my env '-DCONFIG_BT_NIMBLE_TASK_STACK_SIZE=8096' |
Thought so, in order to narrow down the stack appropriately we should check the task stack high water mark. This can be done by calling |
In regards to the DT24, I'm not seeing it connect and retrieve the data I'm seeing this in the long when it scan's for BT devices
But no connection and data parsing, more digging in the AM |
I think I see that issue, looks like on line 858 we are using the name "DT24-BLE" and on line 793 we check for a name of just "DT24". I'm not sure which one is correct but it would explain the lack of detection. |
Thanks for pointing this, corrected |
And now it is working again, tks
@h2zero Was looking into the stack issue a little bit, and attempted to add this as a new BT element in SYStoMQTT
But got stuck as xTaskGetHandle was 'not declared in this scope', but then I noticed we are already sharing the free stack size as part of the SYStoMQTT message, so am going to let it run for a in graph mode aka freestack After 370 seconds of uptime, I'm sitting at a free stack of 2004 That is with the stack set to '-DCONFIG_BT_NIMBLE_TASK_STACK_SIZE=8096' |
This function might be disabled in Arduino core 👎 The free stack reported in SYStoMQTT is a different stack from the NimBLE host task stack. Doesn't really matter though as we would need a way to increase the stack in arduino as well, which would require users to set the value in the nimconfig file of the library. Might be a better solution to create a new task to handle the device detection from the callback. |
Thanks for the feedback |
I will add this in a separate PR |
Should close #1105 also |
Description:
Recover the auto discovery function for BLE device through the use of Theengs Decoder
Use
std::string
for efficiency on checking devicesClose #1102
Checklist: