Skip to content

emoncse/Quectel_Module_AT_Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Quectel Modem Diagnostic Tool

Overview

quectel.py is a lightweight command‑line tool to run quick health checks on a Quectel EC25/EG25‑G (and similar) modem over a serial interface. It logs key AT command outputs and performs basic network diagnostics (e.g., checking the usb0 interface and running a ping through it). Logs can be written to the console and optionally to a file.

Introduction

This script opens a serial connection to your Quectel modem, sends a sequence of AT commands, and runs a few host‑level checks. It is helpful for bring‑up, field tests, and quick triage when a modem seems unresponsive or the data link is unstable.

What it does at a glance:

  • Opens /dev/ttyUSB* (defaults to /dev/ttyUSB2) at a configurable baudrate.
  • Sends a series of AT commands (e.g., basic identification and signal/registration checks).
  • Checks Linux networking for the cellular data interface (e.g., usb0).
  • Attempts a connectivity test (e.g., ping to a known host using usb0).

Prerequisite

  • Python: 3.8+
  • Python package: pyserial (pip install pyserial) (Usually, pyserial comes with python)
  • OS tools (Linux): ip, ping
  • Module Plug-in: Need to plugin the module first.

Usages

Run with defaults (prints to console only):

python quectel.py

Specify a log file (writes everything to the console and to the file):

python quectel.py -w modem_diagnostics.log

Use a custom serial port and baudrate:

python quectel.py -p /dev/ttyUSB3 -b 115200 -w out.log

Arguments

Flag Name Type Default Description
-w, --write log_file str None Write logs to the specified file in addition to the console.
-p, --port port str /dev/ttyUSB2 Serial port device for the modem.
-b, --baudrate baudrate int 115200 Serial baudrate used to talk to the modem.

Tip: If you’re not sure which port to use, check with dmesg | grep -i ttyUSB or ls -l /dev/ttyUSB* after plugging in the modem.

Conculation

This tool provides a fast, repeatable way to validate modem responsiveness and basic connectivity. Start with the defaults, then customize the serial port, baudrate, and log file as needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages