-
Notifications
You must be signed in to change notification settings - Fork 117
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
Provision fails when Dynamic ThingsBoard usage #201
Comments
Can you add logs to this section of the code https://github.com/thingsboard/thingsboard-client-sdk/blob/master/src/ThingsBoard.h#L1979. Simply add Serial.println(reinterpret_cast<char*>(payload));
Serial.printf("Allocated memory: %d should be enought to hold payload of size: %d", dataStructureMemoryUsage, length); |
Here is raw data: |
Weird 48 should be exactly enough to hold the received payload in the allocated JsonDocument. I even verified it with the Arduino JSON Assistant. For now can you simply change this line https://github.com/thingsboard/thingsboard-client-sdk/blob/master/src/ThingsBoard.h#L1971. To use the received Because the other error could really be that you do not have enough memory on the heap, which is rather unrealistic. But to test that as well you can call this method. |
Hello,
Let me know if I can help me something. |
If it is possible can you add this log call as well after the JsonDocument has been initatied call If this is 0 then the error is probably that it attempts to use PSRAM to save the document but it cannot allocate that specifc type of memory. If that is the case please add this on top of your main file before including anything. |
Hello, Anyway I tried with Thank you very much for your tips. I leave it to you if you want to close this issue. Have a nice day. |
When setting Dynamic ThingsBoard usage:
#define THINGSBOARD_ENABLE_DYNAMIC 1
provision fails with the following message:
[TB] Unable to de-serialize received json data with error (DeserializationError::NoMemory)
Tested with [email protected] and [email protected],
thingsboard version 12.2
Thank you in advance, have a nice day.
The text was updated successfully, but these errors were encountered: