add tcp send/receive command modes

This commit is contained in:
Vladan Popovic 2022-06-20 00:03:44 +02:00
parent 08c5cabe6d
commit fac3115a93

View file

@ -279,6 +279,22 @@ impl Command {
} }
} }
pub fn tcp_transparent_mode() -> Command {
Command {
text: "AT+CIPMODE=1".to_string(),
timeout: Duration::from_millis(3000),
contains: Some("OK".to_string()),
}
}
pub fn tcp_exit_data_mode() -> Command {
Command {
text: "ATO".to_string(),
timeout: Duration::from_millis(3000),
contains: Some("CLOSED".to_string()),
}
}
pub fn tcp_send() -> Command { pub fn tcp_send() -> Command {
Command { Command {
text: "AT+CIPSEND".to_string(), text: "AT+CIPSEND".to_string(),