You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wifi.connect should always return a proper error message when the ssid is correct & password is incorrect but it returns the 'undefined'
Current Behavior
sometimes wifi.connect returns error: Error: Command failed: netsh wlan add profile filename="nodeWifiConnect.xml" when the ssid is correct & password is incorrect, but most of the time error is undefined when ssid is correct and password is incorrect.
Code
exports.conenect_to_wifi = function(req,res){
var ssid_para = req.params.Ssid;
var password_para = req.body.Password;
wifi.init({
iface: null
});
wifi.connect({ ssid: ssid_para, password: password_para }, error => {
console.log("error is ",error);
if (error) {
console.log("failed to connect with wifi");
console.log(error);
}
else {
console.log("Wifi connected");
console.log("Connected");
}
});
res.json({message: "password receive successfully"});
}
Your Environment
OS: Windows, Mac
The text was updated successfully, but these errors were encountered:
Same problem here. The connection would fail at first but without return error messages, and the connection will fallback to the original WiFi since it has the correct profile stored. (Mac)
Expected Behavior
wifi.connect should always return a proper error message when the ssid is correct & password is incorrect but it returns the 'undefined'
Current Behavior
sometimes wifi.connect returns error: Error: Command failed: netsh wlan add profile filename="nodeWifiConnect.xml" when the ssid is correct & password is incorrect, but most of the time error is undefined when ssid is correct and password is incorrect.
Code
Your Environment
The text was updated successfully, but these errors were encountered: