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

ESP32-S2: get_security_info returns more bytes than expected (ESPTOOL-898) #65

Closed
radimkarnis opened this issue Jul 29, 2024 · 0 comments · Fixed by #73
Closed

ESP32-S2: get_security_info returns more bytes than expected (ESPTOOL-898) #65

radimkarnis opened this issue Jul 29, 2024 · 0 comments · Fixed by #73
Assignees

Comments

@radimkarnis
Copy link
Collaborator

The ESP32-S2 supports the get_security_info cmd, but returns a struct without the chip_id and api_version fields (returns 12 instead of 20 bytes).

The legacy stub accounts for this with a variable SECURITY_INFO_BYTES size, but the rust flasher stub doesn't - returning 20 bytes with zeros instead of 12. This results in a wrong chip_id being detected (0).

If the flasher stub is left running (--after no_reset_stub) and you try to connect again, you get this:
Detecting chip type.../dev/cu.usbserial-150 failed to connect: Unexpected chip ID value 0. Failed to autodetect chip type.

The security information report also shows this, which is wrong:
Chip ID: 0
API Version: 0
(Chip ID should be 2)

@radimkarnis radimkarnis self-assigned this Jul 29, 2024
@dobairoland dobairoland changed the title ESP32-S2: get_security_info returns more bytes than expected ESP32-S2: get_security_info returns more bytes than expected (ESPTOOL-898) Jul 29, 2024
@DNedic DNedic assigned DNedic and unassigned radimkarnis Sep 5, 2024
DNedic added a commit to DNedic/esp-flasher-stub that referenced this issue Oct 15, 2024
The ESP32-S2 ROM GET_SECURITY_INFO
response does not contain chip_id and api_version fields.
Currently, the flasher stub just returns 0 and 0 for these, however
chip_id 0 is reserved for the ESP32.
This makes the stub behavior in line with the ROM.

Closes esp-rs#65
MabezDev pushed a commit that referenced this issue Oct 15, 2024
The ESP32-S2 ROM GET_SECURITY_INFO
response does not contain chip_id and api_version fields.
Currently, the flasher stub just returns 0 and 0 for these, however
chip_id 0 is reserved for the ESP32.
This makes the stub behavior in line with the ROM.

Closes #65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants