I am trying to write the code for WPS pin and push method for Android Lollipop. The code compiles correctly but the configuration is not initiated by the station when invoked. Not sure what i am doing wrong. My piece of code snippet is as below:
WpsInfo getWpsConfig(){
WpsInfo config=new WpsInfo();
config.setup=WpsInfo.PBC;
config.setup=WpsInfo.DISPLAY;
config.setup=WpsInfo.INVALID;
return config;
}
I even tried this:
WpsInfo wpsManager = new WpsInfo();
if(cmdParams[0].equalsIgnoreCase("pbc")){
wpsManager.setup=wpsInfo.PBC;
int wpsStatus = wpsManager.describeContents();
Log.i(TAG,"Status of the device is:"+wpsStatus);
System.out.println("Status of the device is:\"+wpsStatus");
return cmdExecStatus.SUCCESS;
}
else if (cmdParams[0].equalsIgnoreCase("pin")){
wpsManager.setup= WpsInfo.DISPLAY;
String wpsPin = wpsManager.pin;
Log.i(TAG,"Pin on the device is:"+wpsPin);
System.out.println("Pin on the device is:"+wpsPin);
int wpsStatus = wpsManager.describeContents();
Log.i(TAG,"Status of the device is:"+wpsStatus);
System.out.println("Status of the device is:\"+wpsStatus");
return cmdExecStatus.SUCCESS;
}