Most modems support AT commands which control the modem and query for information. On a Chromium OS device with the developer mode enabled, you can use the socat command to communicate with the modem. You need a Chromium OS device with a test image installed (or you can use gmerge socat
if you are familiar with the dev server) . For example:
CTRL+ALT+T
to enter the crosh shell.shell
to enter the bash shell.ls /dev/ttyACM* /dev/ttyUSB*
sudo stop modemmanager
sudo socat - /dev/ttyACM1,crnl
or sudo socat - /dev/ttyUSB0
to communicate with the modem.AT+CFUN=1
”For example:
crosh> shell chronos@localhost ~ $ sudo stop modemmanager chronos@localhost ~ $ ls /dev/ttyACM* /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 chronos@localhost ~ $ socat - /dev/ttyUSB1 ATZ OK AT+CFUN=1 OK ATI Manufacturer: Qualcomm Incorporated Model: ...... Revision:.... ESN: 0x80d... +GCAP: +CIS707A, .... chronos@localhost ~ $
Depending on the modem, you can try different AT commands, e.g. “AT+CGMI”, “AT+CGSN”, etc.
While modems based on the Qualcomm Gobi chipset support AT commands, Chromium OS uses the Qualcomm connection management API to control these modems.
One can also use minicom to communicate with the modem. This program is available in test images (or you can use gmerge socat
if you are familiar with the dev server) .
CTRL-ALT-T
to enter the crosh shell.shell
to enter the bash shellls /dev/ttyACM* /dev/ttyUSB*
sudo stop modem-manager
sudo minicom -s
A
to edit the Serial Device, changing it to /dev/ttyACM1
or /dev/ttyUSB1
CTRL-A x
to exit and CTRL-A z
for helpRun the following crosh command to enable debug logging in modem manager at runtime (without restarting modem manager).
crosh> modem set-logging debug
On a Chromium OS device with the developer modem enabled, you can restart modem manager with debug logging enabled.
crosh> shell chronos@localhost ~ $ sudo restart modemmanager MM_LOGLEVEL=DEBUG
Chromium images include the sftp client, and also wget and curl for downloading. If you have a test build, it contains iperf too. You will need to enable developer mode on the platform before you are able to access the shell.