+ else
+ {
+ cout <<"\n Entered details are : \n";
+ cout<<"\n IP address : "<<ipaddress;
+ cout<<"\n Target Network SSID : "<<ssid;
+ cout<<"\n Target Network Password : "<<pwd;
+
+ if (security == 'Y' || security == 'y' )
+ {
+ onboardingConn.isSecured = true;
+ cout<<"\n Security is Enabled\n\n\n";
+ }
+ else
+ {
+ onboardingConn.isSecured = false;
+ cout<<"\n Security is not Enabled\n\n\n";
+ }
+
+ netInfo.connType = CT_ADAPTER_IP;
+
+ OICStrcpy(netInfo.provData.WIFI.ssid, NET_WIFI_SSID_SIZE - 1, ssid.c_str());
+ OICStrcpy(netInfo.provData.WIFI.pwd, NET_WIFI_PWD_SIZE - 1, pwd.c_str());
+
+ OICStrcpy(onboardingConn.ipAddress, IPV4_ADDR_SIZE - 1, ipaddress.c_str());
+
+ try
+ {
+ remoteEnrollee = easySetupIntance->createEnrolleeDevice(netInfo,onboardingConn);
+ }
+ catch (OCException &e)
+ {
+ std::cout << "Exception during createEnrolleeDevice call" << e.reason();
+ return;
+ }
+
+ remoteEnrollee->registerEasySetupStatusHandler(&easySetupStatusCallback);