Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:wan:wwan:at_commands [2020/06/20 12:59] – Rework article, add section on how to send AT commands from OpenWrt axx | docs:guide-user:network:wan:wwan:at_commands [2024/03/22 01:05] – [echo] andrewz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== How To send AT commands to device ====== | + | ====== How to send AT commands to device ====== |
| + | AT commands (" | ||
| ===== From OpenWrt ===== | ===== From OpenWrt ===== | ||
| - | To send AT commands directly from OpenWrt, you can use '' | + | To send AT commands directly from OpenWrt, you can simply |
| - | This will open a prompt where you can enter AT commands | + | A better solution is using a proper terminal application like '' |
| - | To test things are working, you can issue '' | + | Once the appropriate //serial// driver is loaded (typically - '' |
| - | For instance, to access a Quectel EP06 LTE modem, which creates | + | As an example, popular |
| + | |||
| + | To find the serial devices added to the system, try looking through '' | ||
| < | < | ||
| - | socat - / | + | dmesg | grep -A 1 -B 12 ttyUSB |
| </ | </ | ||
| - | (Here, socat sends a carriage return (cr) and a new line (nl) after each command, which seems to be needed for this modem.) | + | For some modems '' |
| - | To find the device on which to run '' | + | ==== picocom ==== |
| + | |||
| + | '' | ||
| + | |||
| + | Sample command line: | ||
| < | < | ||
| - | dmesg | grep -A 1 -B 12 ttyUSB | + | picocom / |
| </ | </ | ||
| + | Adding '' | ||
| - | Some modems also show up as a '' | + | |
| + | ==== socat ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | Here is a command line example: | ||
| + | < | ||
| + | socat - / | ||
| + | </ | ||
| + | |||
| + | In this example | ||
| To quit '' | To quit '' | ||
| + | |||
| + | ==== echo ==== | ||
| + | |||
| + | See examples below. '' | ||
| + | |||
| + | Alternative solution - use '' | ||
| ===== From a computer ===== | ===== From a computer ===== | ||
| Line 39: | Line 63: | ||
| ===== Examples of AT commands ===== | ===== Examples of AT commands ===== | ||
| - | Here is example for the Huawei E392 LTE/3G dongle: | + | To test things are working, you can issue a standard '' |
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Huawei E392 ===== | ||
| < | < | ||
| Line 86: | Line 115: | ||
| If the drivers are installed, they will see the modem and issue a special command to switch to a " | If the drivers are installed, they will see the modem and issue a special command to switch to a " | ||
| - | :!: **Warning: Never turn Off PC interface! (2:PCUI in this example)** You will lose the ability to access modem with terminal and change the configuration. | + | :!: **Warning: Never turn Off the AT Command |
| You can add more interfaces to be active i.e. SD card: | You can add more interfaces to be active i.e. SD card: | ||
| Line 93: | Line 122: | ||
| If you get an **ERROR**, maybe the numerical mode is not sorted (16, | If you get an **ERROR**, maybe the numerical mode is not sorted (16, | ||
| < | < | ||
| - | AT^SETPORT=" | + | AT^SETPORT=" |
| </ | </ | ||
| Or with multiple modes: | Or with multiple modes: | ||
| < | < | ||
| - | AT^SETPORT=" | + | AT^SETPORT=" |
| </ | </ | ||
| - | ===== How to force LTE connection | + | ===== Quectel modems |
| - | Using telnet / SSH command line. | + | ==== How to force LTE connection ==== |
| **Format:** | **Format:** | ||
| < | < | ||
| - | AT+QCFG=“nwscanmode”[,< | + | AT+QCFG="nwscanmode"[,< |
| </ | </ | ||
| Line 137: | Line 166: | ||
| ===== Further references ===== | ===== Further references ===== | ||
| - | - https:// | + | * [[https:// |
| + | * [[https:// | ||