Closed atkulp closed 9 years ago
Thanks for pointing this out. I have yet to run into this error. Are you passing the formatted config as an argument in addNetwork? Ex,
var device_wifi = WifiWizard.formatWifiConfig('ssid', 'password', 'WPA');
// pass in formatted config to addNework
WifiWizard.addNetwork(device_wifi, function (win) {
// add network succeeded.
}, function (fail) {
// add network failed
});
I figured it out. I was passing the JSON config object to the connectNetwork() call instead of just the ssid. All good now!
On Mon, Aug 31, 2015 at 11:19 AM, hoerresb notifications@github.com wrote:
Thanks for pointing this out. I have yet to run into this error. Are you passing the formatted config as an argument in addNetwork? Ex,
var device_wifi = WifiWizard.formatWifiConfig('ssid', 'password', 'WPA'); // pass in formatted config to addNework WifiWizard.addNetwork(device_wifi, function (win) { // add network succeeded. }, function (fail) { // add network failed });
— Reply to this email directly or view it on GitHub https://github.com/parsonsmatt/WifiWizard/issues/40#issuecomment-136451663 .
Glad you figured it out. I'm going to make a note of this as we should probably check to make sure the argument being passed in is a string.
I call formatWifiConfig to create the configuration, then addNetwork. I get:
Uncaught TypeError: Object #
Is this a known problem?