From 9c25cb47cd9f82d37331af37e0bff7dba9023f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomislav=20Kopi=C4=87?= Date: Tue, 5 Nov 2024 18:26:24 +0100 Subject: [PATCH] Fix MAC address formating --- src/netman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/netman.h b/src/netman.h index a859671..7fa01fb 100644 --- a/src/netman.h +++ b/src/netman.h @@ -55,7 +55,8 @@ void netman::init(String ssid, String pass, bool hidden) { // Get the last 4 characters of the MAC address String macAddress = WiFi.macAddress(); - String macSuffix = macAddress.substring(macAddress.length() - 5).replace(":", ""); + String macSuffix = macAddress.substring(macAddress.length() - 5); + macSuffix.replace(":", ""); // Set default SSID if none provided _ssid = ssid.isEmpty() ? "SmartCube_" + macSuffix : ssid;