Skip to content
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

AT+SYSMFG: Improve with error code and HASH #790

Open
MaJerle opened this issue Dec 5, 2023 · 1 comment
Open

AT+SYSMFG: Improve with error code and HASH #790

MaJerle opened this issue Dec 5, 2023 · 1 comment
Assignees

Comments

@MaJerle
Copy link

MaJerle commented Dec 5, 2023

Is your feature request related to a problem?

When using AT+SYSMFG, you get an error if you ask for more data to read than available, or if offset is larger than length of data. The same error is also if you simply put wrong parameters.

Describe the solution you'd like.

It would be good to add 2 things in this command (and potentially AT+SYSFLASH, too):

  • Add error codes that are returned based on the SYSMSG command. For example, length is too long, offset is too large, or something else.
  • Add option to get HASH/CRC32/... of the MSG/FLASH content. In this case, we can check if flash content is the one we want, before we load new one. With this, we save the flash durability. A CRC32 is fast to compute on an MCU (even this HASH would be better tho, from security perspective) and easier to handle than to read full data back to MCU and compare if values are identiacal.

Describe alternatives you've considered.

There are no other alternatives, unfortunately. If command returns ERROR, you have to think what the problem is, usually end us w/o solution.

Additional context.

No response

@ustccw ustccw self-assigned this Dec 6, 2023
@ustccw
Copy link
Collaborator

ustccw commented Dec 6, 2023

@MaJerle Thanks for the feedback.

  1. About adding error codes to AT+SYSMFG, early on, we were planning to add different error codes for each command. However, with the increase in firmware size (due to the addition of new AT features and the ESP-IDF upgrade), the firmware size for the ESP32 platform is nearly reaching its maximum user partition size, so we've become more cautious gradually.
    Nevertheless, we have another significant plan to separate the logic of each AT command, deconstructing the code to reduce the bin size. Once this is accomplished, we will reconsider adding different error codes for each command.

  2. Regarding the second feature, we already have a plan for it, and it might be completed by 2024.Q1.

~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants