Ejemplo n.º 1
0
 public WifiInfo(string ssid, WifiMode mode, bool encode, int quality)
 {
     this.ESSID = ssid;
     this.Mode = mode;
     this.Encode = encode;
     this.Quality = quality;
 }
Ejemplo n.º 2
0
 public WifiInfo(string ssid, WifiMode mode, bool encode, int quality)
 {
     this.ESSID   = ssid;
     this.Mode    = mode;
     this.Encode  = encode;
     this.Quality = quality;
 }
Ejemplo n.º 3
0
        public Domain()
        {
            Position = new Point();
            Nodes    = new List <Node>();

            Type        = DomainType.CSMA;
            BaseAddress = "10.0.0.0";
            Model       = MobilityModel.RandomWalk;
            XMin        = -50;
            XMax        = 50;
            YMin        = -50;
            YMax        = 50;

            DataRate = "10Mbps";
            Delay    = "40ms";

            Standard = WifiStandard.IEEE80211a;
            Mode     = WifiMode.Infrastructure;

            Scheduler = SchedulerType.Simple;

            if (CSMABackgroundBrush == null)
            {
                CSMABackgroundBrush = new SolidBrush(Color.FromArgb(064, 048, 128, 048));
            }
            if (IEEE81211BackgroundBrush == null)
            {
                IEEE81211BackgroundBrush = new SolidBrush(Color.FromArgb(064, 064, 000, 128));
            }
            if (LTEBackgroundBrush == null)
            {
                LTEBackgroundBrush = new SolidBrush(Color.FromArgb(064, 048, 048, 128));
            }
            if (WimaxBackgroundBrush == null)
            {
                WimaxBackgroundBrush = new SolidBrush(Color.FromArgb(064, 128, 048, 048));
            }

            if (TextBrush == null)
            {
                TextBrush = Brushes.Black;
            }
        }
Ejemplo n.º 4
0
        public void SetupWifiConnection(string ssid, string password, WifiMode wifiMode = WifiMode.Server)
        {
            _wifiMode = wifiMode;
            //if (_connectionWorker.IsAlive)
            //    _connectionWorker.Suspend();
            switch (wifiMode)
            {
            case WifiMode.Client:
                WriteCommand("AT+CIPMUX=0");
                WriteCommand("AT+CWMODE_DEF=1");
                WriteCommand($"AT+CWJAP_DEF=\"{ssid}\",\"{password}\"");
                break;

            case WifiMode.Server:
                WriteCommand("AT+CIPMUX=1");
                WriteCommand("AT+CWMODE_DEF=2");
                WriteCommand($"AT+CWSAP_DEF=\"{ssid}\",\"{password}\",11,3");
                break;
            }
        }