From aa7bf76cecf99973d588ab3b995a966bf170bb30 Mon Sep 17 00:00:00 2001 From: Abhishek <50703483+Abhishek-1804@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:05:40 +0530 Subject: [PATCH] chat: add page (#13713) Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec --- pages/linux/chat.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/linux/chat.md diff --git a/pages/linux/chat.md b/pages/linux/chat.md new file mode 100644 index 000000000..1a495f16f --- /dev/null +++ b/pages/linux/chat.md @@ -0,0 +1,33 @@ +# chat + +> Automate conversations with a modem or serial device. +> Commonly used to establish PPP (Point-to-Point Protocol) connections. +> More information: . + +- Execute a chat script directly from the command line: + +`chat '{{expect_send_pairs}}'` + +- Execute a chat script from a file: + +`chat -f '{{path/to/chat_script}}'` + +- Set a custom timeout (in seconds) for expecting a response: + +`chat -t {{timeout_in_seconds}} '{{expect_send_pairs}}'` + +- Enable verbose output to log the conversation to `syslog`: + +`chat -v '{{expect_send_pairs}}'` + +- Use a report file to log specific strings received during the conversation: + +`chat -r {{path/to/report_file}} '{{expect_send_pairs}}'` + +- Dial a phone number using a variable, substituting `\T` in the script: + +`chat -T '{{phone_number}}' '{{"ATDT\\T CONNECT"}}'` + +- Include an abort condition if a specific string is received: + +`chat 'ABORT "{{error_string}}" {{expect_send_pairs}}'`