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

Format ESP.getChipId as an 8 character hex instead of 7 digit decimal #18

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sonoff/xdrv_wemohue.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ const char WEMO_MSEARCH[] PROGMEM =

String wemo_serial()
{
char serial[15];
snprintf_P(serial, sizeof(serial), PSTR("201612K%07d"), ESP.getChipId());
char serial[16];
snprintf_P(serial, sizeof(serial), PSTR("201612K%08X"), ESP.getChipId());
return String(serial);
}

String wemo_UUID()
{
char uuid[26];
char uuid[27];
snprintf_P(uuid, sizeof(uuid), PSTR("Socket-1_0-%s"), wemo_serial().c_str());
return String(uuid);
}
Expand Down