-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix missing footer space during WiFi provisioning #4868
Fix missing footer space during WiFi provisioning #4868
Conversation
As of a868187 ("Reduce use of maximum-sized packet buffers (project-chip#4434)"), network provisioning does not allocate enough space to encrypt the WiFi credentials payload, resulting in the following error: CHIP:NP: Failed in sending Network Creds. error Error 4047 (0x00000FCF) Pending API improvements to make these errors less likely, manually add the needed extra space at allocation time. Fixes project-chip#4823
Size increase report for "nrfconnect-example-build" from cb845e1
Full report output
|
Size increase report for "esp32-example-build" from cb845e1
Full report output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK as far as it goes, but:
NetworkProvisioning::SendThreadCredentials
has the same issue.- The uses in BdxTransferSession would have the same issue, if we ever sent that data anywhere.
- The use in
src/app/encoder.cpp
would have this issue if it did not ridiculously over-allocate.
Maybe just like we have MessagePacketBuffer
we should have MessagePacketBufferWriter
, which is automatically little-endian and allocates the footer space?
Thread provisioning message construction needs fixing in the same way as Wi-Fi provisioning in project-chip#4868. By the way, fix rendezvous clean up to make sure that the app doesn't crash when trying to commision a device for the second time.
On seeing this case, I think |
@kpschoedel That seems fine to me. Want to switch it around, or should I? |
Thread provisioning message construction needs fixing in the same way as Wi-Fi provisioning in #4868. By the way, fix rendezvous clean up to make sure that the app doesn't crash when trying to commision a device for the second time.
PR #4874 |
As of a868187 ("Reduce use of maximum-sized packet buffers (#4434)"),
network provisioning does not allocate enough space to encrypt the WiFi
credentials payload, resulting in the following error:
CHIP:NP: Failed in sending Network Creds. error Error 4047 (0x00000FCF)
Pending API improvements to make these errors less likely, manually add
the needed extra space at allocation time.
Fixes #4823