Skip to content

Commit

Permalink
Showing 4 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
@@ -2125,6 +2125,7 @@ void printDeviceInfo() {
WS_DEBUG_PRINTLN(WS._username);
WS_DEBUG_PRINT("WiFi Network: ");
WS_DEBUG_PRINTLN(WS._network_ssid);

char sMAC[18] = {0};
sprintf(sMAC, "%02X:%02X:%02X:%02X:%02X:%02X", WS._macAddr[0], WS._macAddr[1],
WS._macAddr[2], WS._macAddr[3], WS._macAddr[4], WS._macAddr[5]);
3 changes: 1 addition & 2 deletions src/Wippersnapper.h
Original file line number Diff line number Diff line change
@@ -322,8 +322,7 @@ class Wippersnapper {

int32_t totalDigitalPins; /*!< Total number of digital-input capable pins */

char *_topic_description =
NULL; /*!< MQTT topic for the device description */
char *_topic_description = NULL; /*!< MQTT topic for the device description */
char *_topic_signal_device = NULL; /*!< Device->Wprsnpr messages */
char *_topic_signal_i2c_brkr = NULL; /*!< Topic carries messages from a device
to a broker. */
9 changes: 8 additions & 1 deletion src/network_interfaces/Wippersnapper_ESP32.h
Original file line number Diff line number Diff line change
@@ -66,7 +66,14 @@ class Wippersnapper_ESP32 : public Wippersnapper {
/********************************************************/
void set_ssid_pass(const char *ssid, const char *ssidPassword) {
_ssid = ssid;
_pass = ssidPassword;

// set the AP password
// check if ssidPassword was "" in secrets.json
if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
_pass = NULL; // Set as NULL for open networks
} else {
_pass = ssidPassword;
}
}

/**********************************************************/
9 changes: 8 additions & 1 deletion src/network_interfaces/Wippersnapper_ESP8266.h
Original file line number Diff line number Diff line change
@@ -91,7 +91,14 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
/**********************************************************/
void set_ssid_pass(const char *ssid, const char *ssidPassword) {
_ssid = ssid;
_pass = ssidPassword;

// set the AP password
// check if ssidPassword was "" in secrets.json
if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
_pass = NULL; // Set as NULL for open networks
} else {
_pass = ssidPassword;
}
}

/**********************************************************/

0 comments on commit e4a5bcf

Please sign in to comment.