Firmware Modem 3g Huawei E173 Maroc Telecom Apr 2026

def disconnect_3g(): subprocess.run(["poff", "huawei-e173"]) Add a health check (ping or check interface status):

(example config):

ABORT "BUSY" ABORT "NO CARRIER" ABORT "ERROR" TIMEOUT 10 "" "ATZ" OK "ATE0" OK "AT+CGDCONT=1,\"IP\",\"mtnet\"" OK "ATD*99#" CONNECT "" You can implement a CLI/daemon with these functions: Python example using pyserial + pppd import serial import subprocess import time def switch_modem_mode(): # Run usb_modeswitch subprocess.run(["usb_modeswitch", "-v", "0x12d1", "-p", "0x1c0b", "-M", "55534243123456780000000000000011062000000100000000000000000000"]) firmware modem 3g huawei e173 maroc telecom

def connect_3g(): subprocess.run(["pon", "huawei-e173"]) def disconnect_3g(): subprocess

/dev/ttyUSB2 115200 connect '/usr/sbin/chat -v -f /etc/chatscripts/3g-chat' user "mtnet" password "mtnet" noauth defaultroute replacedefaultroute usepeerdns persist maxfail 0 ( /etc/chatscripts/3g-chat ): def disconnect_3g(): subprocess.run(["poff"

def get_signal_quality(port="/dev/ttyUSB0"): ser = serial.Serial(port, 115200, timeout=2) ser.write(b"AT+CSQ\r\n") resp = ser.read(100) ser.close() # Parse +CSQ: <rssi>,<ber> if "+CSQ:" in resp.decode(): parts = resp.decode().split("+CSQ:")[1].strip().split(",") rssi = int(parts[0]) # 0-31, 99=unknown return rssi * 2 - 113 # dBm approx return None

# /etc/usb_modeswitch.d/12d1:1c0b TargetVendor=0x12d1 TargetProduct=0x14fe MessageContent="55534243123456780000000000000011062000000100000000000000000000" Or programmatically with libusb :

Privacy Preference Center

firmware modem 3g huawei e173 maroc telecom
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.