Hello,
I need some help. I try to develop an app which is setting up the wifi connection on an android device.
I try to use WifiWizard2 with this.wifiWizard2.connect(ssid, bindAll, password, algorithm, isHiddenSSID)
but when i try the app on an Device (Android 12) i only get the Error: ERROR_ADDING_NETWORK
.
Here is the code I use, i hope you can help me:
import { Component } from '@angular/core';
declare var WifiWizard2: any;
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
ssid = "ubntPOS";
password = "6545A-UAPACL";
info_txt = "";
async getNetworks() {
this.info_txt = "loading...";
try {
await WifiWizard2.timeout(4000);
await WifiWizard2.connect(this.ssid,true,this.password,'WEP',false);
this.info_txt = "";
} catch (error) {
this.info_txt = error;
}
}
}
For example:
WifiWizard2.scan();
does work properly and list all networks nearby.
Thank you!
1 post - 1 participant