private void rbAP_CheckedChanged(object sender, EventArgs e) { DHCPMode m = DHCPMode.AP_STA; if (rbAPDHCP.Checked) { m = DHCPMode.AP; } else if (rbSTA.Checked) { m = DHCPMode.STA; } _growbe.SetDHCPMode(m); }
public bool SetDHCPMode(DHCPMode mode) { var str = ""; if (mode == DHCPMode.AP_STA) { str = "2,1"; } else { str = ((int)mode).ToString(); } var r = SendCommand($"AT+CWDHCP_{ConfigMode}={str}"); if (r.Result == "OK") { DHCPMode = mode; return(true); } return(false); }
public DHCPConfig SetDHCPMode(DHCPMode mode) { this.mode = mode; return(this); }
public DHCPConfig(WIFIInterface wifiInterface, DHCPMode mode) { this.SetDHCPMode(mode).SetInterface(wifiInterface); }