Closed hms-11 closed 7 months ago
Send $Wifi/ListAPS
to show all access points and signal strengths
Send $STA/SSID
to show the STA SSID you are requesting.
Paste the responses here, so we can compare them.
Thanks for the quick reply. Here is $Wifi/ListAPS :
Grbl 3.7 [FluidNC v3.7.16 (wifi) '$' for help] $Wifi/ListAPS {"AP_LIST":[ "AP_LIST":[ {"SSID":"HotchsIndoorWifi", "SIGNAL":"100", "IS_PROTECTED":"1" }, {"SSID":"hotchs", "SIGNAL":"72", "IS_PROTECTED":"1" }, {"SSID":"HotchsYardWifi", "SIGNAL":"52", "IS_PROTECTED":"1" }, {"SSID":"HotchsIndoorWifi", "SIGNAL":"24", "IS_PROTECTED":"1" } ] }
ok
Here is $STA/SSID :
$STA/SSID $Sta/SSID= HotchsIndoorWifi ok
You appear to have everything correct.
Have you tried the other APs with higher strength as a test?
It could be the controller is adding a little noise that makes it hard to connect.
I've tried multiple AP's with strengths from ~80 - 100 with no change. This same controller will connect to the same AP if using the following simple Arduino sketch:
#include<WiFi.h>
const char *ssid = "YourSSID";
const char *password = "YourPassword";
void initWiFi() {
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED) {
Serial.print('.');
delay(1000);
}
Serial.println(WiFi.localIP());
}
void setup() {
Serial.begin(115200);
initWiFi();
Serial.print("RRSI: ");
Serial.println(WiFi.RSSI());
}
void loop() {
// put your main code here, to run repeatedly:
}
You appear to have everything correct.
Have you tried the other APs with higher strength as a test?
It could be the controller is adding a little noise that makes it hard to connect.
I just noticed it listed the same access point twice, it's a mesh network. I've also tried the 'hotchs' AP to make sure it wasn't grabbing the low strength 'HotchsIndoorWifi' AP with the same result. I've also tried it on another network with only a single AP with the same result.
Maybe the security settings are incompatible. There is a configuration variable $Sta/MinSecurity with the following values
"OPEN"
"WEP"
"WPA-PSK"
"WPA2-PSK" (default)
"WPA-WPA2-PSK"
"WPA2-ENTERPRISE"
Good thinking but unfortunately no cigar. I just checked and the AP is WPA/WPA2 - Personal so I switched MinSecurity to WPA-WPA2-PSK and no change.
Since it works with the Arduino sketch, what I would do is to look at WebUI/WifiConfig.cpp specifically the routine WiFiConfig::StartSTA() . Compare it to the Arduino sketch and successively remove any lines that seem to be doing something different or extra. Recompile and test after each change.
I'll give that a shot. Might be a couple days before I get a chance to mess around with it and recompile but I'll update the issue with what I find. Thanks for the suggestion!
One more detail I forgot to add to the initial issue, I'll try the suggestion mentioned by @MitchBradley but I wanted to include this. If I try and use the FluidNC AP and go through the setup procedure, when I try and search for Wifi Access Points to connect to I get "Failed: 406 Wrong data" I've attached a screen shot. I've got a couple more of these boards, I'll try and upload to another one just to ensure this particular board doesn't have some sort of weird hardware issues and I will also try a generic ESP32 dev board as well to isolate the issue to my custom board.
Quick update. I haven't had a chance to go through WiFiConfig::StartSTA() in detail to attempt to fix there but I had a couple minutes last night to play around with a couple other boards to test. I tested another of my custom boards, same issue. I also tested just a plain ESP32 DevKit and it also has the same issue, so whatever the problem is, it does not appear to be related to the face that I have a custom board in use.
Ok this is embarrassing, but I've solved the issue and the issue is actually that I'm a dummy. I was inputting my wifi credentials like this $Sta/SSID = HotchsIndoorWifi or $Sta/SSID= HotchsIndoorWifi Same with the password. I was adding spaces from the command to the inputting of data. I just entered it through FluidTerm as $Sta/SSID=HotchsIndoorWifi I did the same with the password, no spaces. Connected successfully. So no actual issue, just a user inputting data incorrectly.
Wiki Search Terms
Wifi Problem
Controller Board
ESP32 Custom Board Custom Board based on the 6 pack controller with I2S outputs and octocoupler inputs. 6 Axis plus other features. Full schematics can be found here: https://oshwlab.com/coreyearl1985/esp32-external-cnc-driver-4-axis
Machine Description
No machine yet, issue on initial setup
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
WebUI as well as FluidNC Web Installer
What happened?
After successful initial successful install through FluidNC Web Installer wifi setup fails. I can successfully enter the SSID and Password through the terminal interface however the as can be seen in the startup message posted the controller fails to connect to the SSID. The password does not contain any special characters, just upper and lower case letters and numbers. I have successfully connected to the same network using a simple Arduino sketch for connecting to Wifi and the controller connects and gets an IP address. I have attempted to connect to multiple wifi networks with the same error. When using the web installer terminal, I the controller can see the available networks and shows high signal strength when using the $Wifi/ListAPs command.
GCode File
No response
Other Information
No response