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

Chinese ESP8266 clone works as a unsecured hotspot unless you add a line of code into ws2812_controller_esp8266.ino #298

Closed
NotUnderi opened this issue Oct 8, 2020 · 1 comment · Fixed by #301

Comments

@NotUnderi
Copy link

I tried the provided arduino code with a "Makershop NodeMCU V3.4" that I received in the mail a few days ago and it seems that at least these chinese clones work as a hotspot unless you add a line of code in setup function. Fixed it by addingWiFi.mode(WIFI_STA);in setup function. Seems to be working fine like this.

void setup() {
Serial.begin(115200);
WiFi.config(ip, gateway, subnet);
WiFi.begin(ssid, password);
Serial.println("");
// Connect to wifi and print the IP address over serial
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
port.begin(localPort);
ledstrip.Begin();//Begin output
ledstrip.Show();//Clear the strip for use
}

@joeybab3
Copy link
Collaborator

Yeah, this will happen any time the previous sketch was running in AP or STA_AP mode, most sketches I've seen leave it up to the user to have the correct mode but adding that line doesn't add any complexity to the sketch so I will get to that rn.

joeybab3 added a commit that referenced this issue Nov 13, 2020
Fixes #298 for ESP32, thanks @NotUnderi
joeybab3 added a commit that referenced this issue Nov 13, 2020
@joeybab3 joeybab3 mentioned this issue Nov 13, 2020
joeybab3 added a commit that referenced this issue Feb 19, 2021
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 a pull request may close this issue.

2 participants