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

wifi.radio.enabled=False causes error with debug mode on #9406

Closed
tyeth opened this issue Jul 6, 2024 · 5 comments · Fixed by #9572
Closed

wifi.radio.enabled=False causes error with debug mode on #9406

tyeth opened this issue Jul 6, 2024 · 5 comments · Fixed by #9572
Labels
bug espressif applies to multiple Espressif chips network testing
Milestone

Comments

@tyeth
Copy link

tyeth commented Jul 6, 2024

CircuitPython version

latest (main) ~9.1beta5  DEBUG BUILD

Code/REPL

calling `wifi.radio.enabled = False` (before deep sleeping)

Behavior

wifi:pm stop, total sleep time: Assertion '*fmt == '%' || !"unsupported fmt char"' failed, at file mpprint.c:586

Description

Appears the debug message contains "%" which is not supported, or at least that was my impression after visiting micropython#3004

Additional information

No response

@tyeth tyeth added the bug label Jul 6, 2024
@dhalbert
Copy link
Collaborator

dhalbert commented Jul 6, 2024

I think it may contain ... %<something>, where the <something> is not supported.

@jepler
Copy link
Member

jepler commented Jul 6, 2024

There's a hack somewhere that tries to print espidf messages via mp_printf so they are visible on the repl, not requiring a separate debug uart. I guess this isn't compatible with all formats used in espidf

@tyeth
Copy link
Author

tyeth commented Jul 6, 2024 via email

@tyeth tyeth changed the title wifi.radio.enabled causes error with debug mode on wifi.radio.enabled=False causes error with debug mode on Jul 6, 2024
@dhalbert dhalbert added this to the 9.x.x milestone Jul 6, 2024
@dhalbert dhalbert added network espressif applies to multiple Espressif chips testing labels Jul 6, 2024
@tannewt
Copy link
Member

tannewt commented Jul 8, 2024

This is the printf connector:

#if CIRCUITPY_CONSOLE_UART
static int vprintf_adapter(const char *fmt, va_list ap) {
return mp_vprintf(&mp_plat_print, fmt, ap);
}
void port_serial_early_init(void) {
esp_log_set_vprintf(vprintf_adapter);
}
#endif

I do need to comment it out from time to time when debugging too.

@jepler
Copy link
Member

jepler commented Jul 8, 2024

let's just back it out if it causes crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips network testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants