示例#1
0
 internal AccessPoint(Ecn ecn, string ssid, int rssi, string macAddress, bool automaticMode)
 {
     this.Ecn = ecn;
     this.Ssid = ssid;
     this.Rssi = rssi;
     this.MacAddress = macAddress;
     this.AutomaticConnectionMode = automaticMode;
 }
示例#2
0
 internal AccessPoint(Ecn ecn, string ssid, int rssi, string macAddress, bool automaticMode)
 {
     this.Ecn        = ecn;
     this.Ssid       = ssid;
     this.Rssi       = rssi;
     this.MacAddress = macAddress;
     this.AutomaticConnectionMode = automaticMode;
 }
 /// <summary>
 /// When you want to use your ESP8266 as an access point (softAP mode) then use
 /// this method to set the ssid and password that your access point will use
 /// when authenticating new clients.
 /// </summary>
 /// <param name="ssid">The ssid that will be advertised to potential clients</param>
 /// <param name="password">The password that a new client must provide. NOTE: MUST BE NUMERIC</param>
 /// <param name="channel">The radio channel that your access point will use. Avoid conflicts with other nearby access points</param>
 /// <param name="ecn">The security mode(s) supported by your access point.  If you use Open, then no password will be required for new clients.</param>
 public void ConfigureAccessPoint(string ssid, string password, int channel, Ecn ecn, bool persist = false)
 {
     if (ecn == Ecn.Unknown || ecn == Ecn.WEP)
     {
         throw new ArgumentException("Invalid value", "ecn");
     }
     EnsureInitialized();
     lock (_oplock)
     {
         _esp.SendAndExpect(Command(Commands.SetAccessPointModeCommand, persist) +
                            '"' + ssid + "\"," +
                            '"' + password + "\"," +
                            channel + "," +
                            (int)ecn, OK);
     }
 }
示例#4
0
 /// <summary>
 /// When you want to use your ESP8266 as an access point (softAP mode) then use
 /// this method to set the ssid and password that your access point will use
 /// when authenticating new clients.
 /// </summary>
 /// <param name="ssid">The ssid that will be advertised to potential clients</param>
 /// <param name="password">The password that a new client must provide. NOTE: MUST BE NUMERIC</param>
 /// <param name="channel">The radio channel that your access point will use. Avoid conflicts with other nearby access points</param>
 /// <param name="ecn">The security mode(s) supported by your access point.  If you use Open, then no password will be required for new clients.</param>
 public void ConfigureAccessPoint(string ssid, string password, int channel, Ecn ecn)
 {
     if (ecn == Ecn.Unknown || ecn == Ecn.WEP)
         throw new ArgumentException("Invalid value", "ecn");
     EnsureInitialized();
     lock (_oplock)
     {
         _esp.SendAndExpect(SetAccessPointModeCommand +
             '"' + ssid + "\"," +
             '"' + password + "\"," +
             channel + "," +
             (int)ecn, OK);
     }
 }