finally fix wifi name to be unique
This commit is contained in:
parent
1d47154445
commit
d212640f74
@ -4,4 +4,4 @@
|
|||||||
#include <ESP8266mDNS.h>
|
#include <ESP8266mDNS.h>
|
||||||
#include <ArduinoOTA.h>
|
#include <ArduinoOTA.h>
|
||||||
|
|
||||||
void ota_setup(const char* name);
|
void ota_setup();
|
@ -6,11 +6,10 @@
|
|||||||
#include "serial.hpp"
|
#include "serial.hpp"
|
||||||
|
|
||||||
|
|
||||||
const char* ssid = "fan_XXX";
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
ota_setup(ssid);
|
ota_setup();
|
||||||
server_setup();
|
server_setup();
|
||||||
collector_setup();
|
collector_setup();
|
||||||
DEBUG_OUT.println(F("Setup done"));
|
DEBUG_OUT.println(F("Setup done"));
|
||||||
|
@ -2,8 +2,12 @@
|
|||||||
#include "serial.hpp"
|
#include "serial.hpp"
|
||||||
#include <LittleFS.h>
|
#include <LittleFS.h>
|
||||||
|
|
||||||
void ota_setup(const char* ssid) {
|
static String ssid;
|
||||||
|
|
||||||
|
void ota_setup() {
|
||||||
|
String mac = WiFi.macAddress();
|
||||||
|
mac.replace(":","_");
|
||||||
|
ssid = String("fan_") + mac;
|
||||||
DEBUG_OUT.println("Booting");
|
DEBUG_OUT.println("Booting");
|
||||||
boolean result = WiFi.softAP(ssid);
|
boolean result = WiFi.softAP(ssid);
|
||||||
while (result == false) {
|
while (result == false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user