public bool SetApNetworkAdresse(APNetworkAdresse adr) { var ret = SendCommand($"AT+CIPAP_{ConfigMode}=" + adr.ToString()); if (ret.Result == "OK") { ApNetwork.Network = adr; return(true); } return(false); }
public APNetworkAdresse GetApNetworkAdresse() { var r = SendCommand("AT+CIPAP_CUR?"); APNetworkAdresse ret = null; if (r.Result == "OK") { var splitstr = r.Values.SelectMany(x => x.Split(':')).Select(x => x.Trim('"', '"')).ToArray(); ret = new APNetworkAdresse { IPAdresse = splitstr[2], Gateway = splitstr[5], Mask = splitstr[8] }; ApNetwork.Network = ret; } return(ret); }