I have a zte 3g modem. I use carrier provided dialer for connection establishment. Once the ppp connection is active, i would like to send some AT commands(for ex. Query signal strength, AT+CSQ). But the dialer i use locks the /dev/ttyUSB0 port, which is the command port to send AT commands for my modem. So is there any way, to send the commands, once the connection is active?

Edit: I also tried the additional port /dev/ttyUSB1. But the port is flowing with random data from the modem. A sample is given below.



+CSQ:19, 99                                                                     



I tried adding my commands, i even got output. But the response is very poor. Most of the times, my AT commands went unnoticed.

  • AFAIK there is also a /dev/ttyUSB1 device that you can use to query such things while the connection is established.
    – wurtel
    May 13, 2015 at 12:43
  • @wurtel I tried accessing, but the port is flowing with some default data. See my edit.
    – Kumar
    May 14, 2015 at 9:52

2 Answers 2


As long as the device is used for ppp traffic, it is not possible to run AT commands at the same time1. For this reason all modern modems will provide more than one serial interfaces, e.g. /dev/ttyUSB0 and /dev/ttyUSB1 (or /dev/ttyACM0 and /dev/ttyACM1 for USB CDC modems on linux).

Back in the days when phones had RS-232 compatible connectors (perhaps with additional IrDA), 3GPP standardized a multiplexing protocol as 07.10 to overcome the physical limitation, although that required special drivers on the PC so it never took off. Today with USB's inherent multiplexing capabilities, there are no excuses for not providing multiple serial interfaces (usually there are only two though).

So as already mentioned in a comment, you should use the other serial device, e.g. /dev/ttyUSB1.

1 In theory it might be possible for the modem to support +++ escaping which would then allow you to run AT commands while the connection was ongoing, although then you would have to in some way modify the dialer program to inject those and extract the response...

  • I tried /dev/ttyUSB1 as you said. But the port is busy with random data from the modem. I couldn't able to provide AT commands properly. see my edit.
    – Kumar
    May 14, 2015 at 3:58
  • I changed my dialer to wvdial. Somehow it worked fine. Still i am getting random data, but the response to typed command was 100%. Thank you.
    – Kumar
    May 14, 2015 at 11:24

Many modems also support a mux layer to implement multiple virtual uarts over a single physical uart.

Typically it requires some at commands (AT+CMUX) to setup the mux in the modem and then you can start using one virtual port for pppos, and the other virtual port for at commands concurrently.

Here is a linux driver that implements the host side of the mux layer: https://www.kernel.org/doc/html/latest/driver-api/serial/n_gsm.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .