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
1 changed files with 16 additions and 0 deletions

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 {
Command {
text: "AT+CIPSEND".to_string(),