/// получить RSSI, Quality, SSID private bool WiFiPars() { bool wifiOn = false; uint uQual = 0; if (!DLBarcodeScanner.bIsX4) { wifiOn = this.rsWF.IsAssociated(); base.SignalPercent = this.rsWF.GetSignalLevel(); ushort uLev = 0; this.rsWF.GetSignal(ref uLev); base.SignalQuality = uLev; base.SSID = xWiFiPars.GetSSID(); } else { wifiOn = Device.GetWiFiPowerStatus(); if (wifiOn) { WiFiStatus status = Datalogic.API.WiFi.GetCurrentStatus(); base.SignalPercent = base.RSS2Level(MINRSS, MAXRSS, status.Rssi); Datalogic.API.Device.WiFiGetSignalQuality(out uQual); base.SignalQuality = (int)uQual; //String active = Datalogic.API.WiFi.GetActiveConfig(); //if (active != "") //{ // StandardWiFiConfig cfg = Datalogic.API.WiFi.GetConfig(active); // base.SSID = cfg.Base.SSID; //} base.SSID = ""; } } return(wifiOn); }
public bool StartAp() { string setting = start; Cmds.Clear(); Cmds.Add(setting); try { Runcmd(); WiFiStatus = WiFiStatus.Running; return true; } catch (Exception) { return false; } }
public bool StopAp() { string setting = stop; Cmds.Clear(); Cmds.Add(setting); try { Runcmd(); WiFiStatus = WiFiStatus.Stop; return true; } catch { return false; } }
public void Dispose() { if (WiFiStatus==WiFiStatus.Running) { if(StopAp()) { WiFiStatus = WiFiStatus.Stop; Disallow(); } } else { Disallow(); } }