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 [2018/03/04 16:32] – ↷ Page moved from docs:guide-user:network:wan:at_commands to docs:guide-user:network:wan:wwan:at_commands bobafetthotmail | 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 (" | ||
| - | You need to connect device/ | ||
| - | If you are not familiar with using COM terminal, download some graphical tool like: **CuteCom** | + | ===== From OpenWrt ===== |
| + | To send AT commands directly from OpenWrt, you can simply use '' | ||
| - | Usually these settings work fine: | + | A better solution is using a proper terminal application like '' |
| + | |||
| + | Once the appropriate //serial// driver is loaded (typically - '' | ||
| + | |||
| + | As an example, popular Quectel EP06 LTE modem will create 4 serial devices, ''/ | ||
| + | |||
| + | To find the serial devices added to the system, try looking through '' | ||
| + | < | ||
| + | dmesg | grep -A 1 -B 12 ttyUSB | ||
| + | </ | ||
| + | |||
| + | For some modems '' | ||
| + | |||
| + | ==== picocom ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | Sample command line: | ||
| + | < | ||
| + | picocom / | ||
| + | </ | ||
| + | Adding '' | ||
| + | |||
| + | |||
| + | ==== socat ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | Here is a command line example: | ||
| + | < | ||
| + | socat - / | ||
| + | </ | ||
| + | |||
| + | In this example '' | ||
| + | |||
| + | To quit '' | ||
| + | |||
| + | ==== echo ==== | ||
| + | |||
| + | See examples below. '' | ||
| + | |||
| + | Alternative solution - use '' | ||
| + | |||
| + | ===== From a computer ===== | ||
| + | To send AT commands to a LTE modem, you need to first connect the device/ | ||
| + | |||
| + | If you are not familiar with using COM terminals, you might want to use a graphical tool like: '' | ||
| + | |||
| + | These settings | ||
| < | < | ||
| Device: / | Device: / | ||
| Line 12: | Line 61: | ||
| </ | </ | ||
| - | Here is Example for Huawei E392 LTE/3G dongle. | + | ===== Examples of AT commands ===== |
| + | |||
| + | To test things are working, you can issue a standard '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Huawei E392 ===== | ||
| < | < | ||
| Line 46: | Line 102: | ||
| </ | </ | ||
| - | AT^SETPORT=? | + | Explanations: |
| - | AT^SETPORT? | + | < |
| - | + | AT^SETPORT=? - Lists the Available interfaces and their numbers | |
| - | AT^SETPORT=" | + | AT^SETPORT? |
| + | AT^SETPORT=" | ||
| + | </ | ||
| - | Modem configuration is splitted | + | Modem configuration is split into 2 parts: before |
| - | Once modem is plugged-In - it declares | + | Once a modem is plugged-in, it should declare |
| - | If the drivers are installed | + | If the drivers are installed, they will see the modem and issue a special command to switch to a " |
| - | :!: **Never turn Off PC interface (2:PCUI in this example)!!!** Otherwise you'd not have ability to access modem with terminal and change the config. | + | :!: **Warning: |
| You can add more interfaces to be active i.e. SD card: | You can add more interfaces to be active i.e. SD card: | ||
| < | < | ||
| - | If you get **ERROR**, maybe the numerical mode is not sorted (16, | + | If you get an **ERROR**, maybe the numerical mode is not sorted (16, |
| + | < | ||
| + | AT^SETPORT=" | ||
| + | </ | ||
| + | Or with multiple modes: | ||
| < | < | ||
| - | AT^SETPORT=" | + | AT^SETPORT=" |
| - | or with multiple modes: | + | |
| - | AT^SETPORT=" | + | |
| </ | </ | ||
| + | |||
| + | ===== Quectel modems ===== | ||
| + | |||
| + | ==== How to force LTE connection ==== | ||
| + | |||
| + | **Format:** | ||
| + | < | ||
| + | AT+QCFG=" | ||
| + | </ | ||
| + | |||
| + | **Parameters**: | ||
| + | < | ||
| + | < | ||
| + | 0 AUTO | ||
| + | 1 GSM only | ||
| + | 2 UMTS only | ||
| + | 3 LTE only | ||
| + | |||
| + | < | ||
| + | 0 Take effect after UE reboots | ||
| + | 1 Take effect immediately | ||
| + | </ | ||
| + | |||
| + | **Examples: | ||
| + | |||
| + | Set modem to LTE only: | ||
| + | < | ||
| + | echo -e " | ||
| + | </ | ||
| + | |||
| + | Set it back to " | ||
| + | < | ||
| + | echo -e " | ||
| + | </ | ||
| + | |||
| + | ===== Further references ===== | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||