Example #1
0
 public async Task ConfigDevice()
 {
     smartconfig.SetSmartConfigTask(Ssid, Ssid, Passphrase);
     Message = "running configuration";
     await Task.Run(() =>
     {
         var result = smartconfig.executeForResult();
         Message    = Message + "Device address set up: " + result.getInetAddress() + "\r\n";
     });
 }
Example #2
0
        public async Task <bool> ConfigDevice(String Ssid, String bssid, String Passphrase)
        {
            //  var Ssid = $"\"{_Ssid}\"";
            //  var Passphrase = $"\"{_Passphrase}\"";
            //   string bssid = wifiAdapter.GetBssid();
            smartconfig = DependencyService.Get <ISmartConfigHelper>().CreatePlatformTask();
            //  return true;
            smartconfig.SetSmartConfigTask(Ssid, bssid, Passphrase, false, 60);
            NetworkServiceUtil.Log("DeviceDetailsViewModel ConfigDevice : " + Ssid + "    " + Passphrase);
            string Message = "running configuration";
            await Task.Run(() =>
            {
                var result = smartconfig.executeForResult();
                Message    = Message + "Device address set up: " + result.getInetAddress() + "\r\n";
                NetworkServiceUtil.Log("DeviceDetailsViewModel ConfigDevice : " + Message);
                return(true);
            });

            return(false);
        }