Skip to content

Fix format specifier for SSID debug log in WifiConnector::connect - #385

Open
qwerty1979bg wants to merge 1 commit into
Open-Air-Foundation:masterfrom
qwerty1979bg:patch-1
Open

Fix format specifier for SSID debug log in WifiConnector::connect#385
qwerty1979bg wants to merge 1 commit into
Open-Air-Foundation:masterfrom
qwerty1979bg:patch-1

Conversation

@qwerty1979bg

Copy link
Copy Markdown

What

One-character fix: %d%s in the Serial.printf call that logs the
configured SSID before attempting to connect to it.

Why

wifiSSID.c_str() is a const char*; %d expects an int. The mismatch
meant the log never showed the actual SSID — just the pointer value
interpreted as a decimal integer. Doesn't crash on this target (pointer and
int are both 4 bytes on ESP32), but the diagnostic was silently useless.

This is how it looked in the logs:
Attempt connect to configured ssid: 1070229276
(While the SSID is something else and not a literal 1070229276)

Fixes #384

Test plan

  • Flash to a device with a saved SSID, confirm serial log now prints
    the real SSID instead of a numeric value

Note: drafted with AI assistance, verified manually

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong format specifier in WiFi SSID debug log (%d instead of %s)

1 participant