add tcp send/receive command modes
This commit is contained in:
parent
08c5cabe6d
commit
fac3115a93
1 changed files with 16 additions and 0 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue