expect "ð\r" or "OK\r\n" timeout 2 | # Confirm successful command. |
send "ATVðXðSð=ð\r" | # Numeric response code |
| # AT compatible messages |
| # |
expect "ð\r" timeout 2 | # Confirm commands successful. |
done | # |
error: | # Handle unexpected modem |
| # responses. |
expect "8\r" or "7\r" or "4\r" or "3\r" delay 2
done