Huawei E173s-1 USB 3G Modem

Linux Support

  • Linux kernel modules usbserial, usb_wwan
  • GSM modem (1-port) converters attached to
    • /dev/ttyUSB0 (AT commands),
    • /dev/ttyUSB1 (data),
    • /dev/USB2 (status & AT commands)
  • for AT commands use microcom (exit by ~x):
    • busybox microcom /dev/ttyUSB{0,2}
    • microcom -D/dev/ttyUSB{0,2}

AT Commands

sudo su -c "chmod -v 666 /dev/ttyUSB2"
nix-shell -p minicom --run "minicom -D /dev/ttyUSB2"
# (press Ctrl+ae to enable echo; press Ctrl+aq to exit)

Sending SMS

## ping
AT
# < OK
## enable error reporting (CMEE) and registration and location/network cell information (CREG); disable BOOT reporting
ATE0+CMEE=1;+CREG=2;^BOOT=0,0
# < OK
## pin
AT+CPIN?
# < +CPIN: READY
# < OK
## perform network scan (MNC+MCC is the 4th value in the resulting quintuples)
AT+COPS=?
# < +COPS: (2,"EUROTEL - CZ","ET - CZ","23002",0),(3,"Vodafone CZ","Vodafone","23003",0),(3,"T-Mobile CZ","TMO CZ","23001",0),,(0,1,2,3,4),(0,1,2)
# < OK
## signal strength indicator (RSSI dB = -113 + 2 * 1st_value; -109 to -95 is Marginal, -93 to -85 is OK, -83 to -75 is Good, -73 to -53 is Excellent)
AT+CSQ
# < +CSQ: 27,99
# < OK
## is registered to the network (the 1st value is the registration status; the 2nd is access technology; the 3rd value is Location area code; the 4th value is Cell ID)
## registration status: 0 not registered, 1 registered in home, 2 not registered and searching, 3 registration denied, 4 unknown, 5 registered and roaming
## access technology: 0 GSM; 1 GSM Compact; 2 UTRAN; 3 GSM w/EGPRS; 4 UTRAN w/HSDPA; 5 UTRAN w/HSUPA; 6 UTRAN w/HSDPA and HSUPA; 7 E-UTRAN
AT+CREG?
# < +CREG: 2,1,71F,6DF9
# < OK
## check the service center address
AT+CSCA?
# < +CSCA: "+420602909909",145
# < OK
## set SMS for Text format (not PDU)
AT+CMGF=1
# < OK
## send a SMS message directly/without storing, to the number (resulting value is the message reference number allocated by the modem)
AT+CMGS="420608123456"
# > (type the message; when finished, press Ctrl+z of the keyboard)
# < +CMGS: 179
# < OK
## store a SMS message for sending to the number (resulting the CMGW value specifies the location where the text message is stored in the message storage area)
AT+CMGW="420608123456"
# > (type the message; when finished, press Ctrl+z of the keyboard)
# < +CMGW: 2
# < OK
## send the stored SMS message to its number (the parameter value specifies the location where the text message is stored in the message storage area; resulting value is the message reference number allocated by the modem)
AT+CMSS=2
# < +CMSS: 0
# < OK
## send the stored SMS message to another number (the parameter value specifies the location where the text message is stored in the message storage area; resulting value is the message reference number allocated by the modem)
AT+CMSS=2,"420608123456"
# < +CMSS: 180
# < OK

General

  • AT – ping/pong

  • ATE0 – echo off

  • ATE1 – echo on

  • AT+CMEE=? – provide an error message (0) with the mistake number codes (1) and indications for detail (2)

  • ATI – get GSM module information (Manufacturer, Model, Revision, IMEI, capabilities)

Manufacturer: huawei Model: E173 Revision: 21.015.03.04.55 IMEI: 8605280023***** +GCAP: +CGSM,+DS,+ES ~~~

  • AT+COPS? – get active network Name and ID
  • AT+COPS=? – perform network scan, wait for and display results
  • AT+COPS=1,2,“numeric network code” – the network operator is selected manually in the numeric format by its code
  • AT+CSQ – get signal strength as +CSQ rssi (higher is better) and ber (lower is better; 99 = unknown)
  • AT+CREG=1 – registration information with no location information (1), otherwise (2) smstools unable to detect successful registration
  • AT+CREG? – get registration information
  • AT^CURC=0 – turn off periodic status messages (RSSI status, etc.)
  • AT+CGATT=0 – detach from GPRS/Packet Domain network/service
  • AT+CNMI=1,1,0,2,1 – disable message routing mode, specifically the following: (1) the received text messages will be sent directly to the TE, (1) = SMSs stored in the ME wil be returned, (0) Cell Broadcast will not be noticed, (2) new status reports stored in ME will be returned, (1) fixed value
  • AT +CSCA? – get SMSC address, through which mobile originated SMs are transmitted as +CSCA sca number, sca type
  • AT +CGEQREQ? – get 3G quality of service profile as a list of +CGEQREQ cid, trafficClass, max_br_ul, max_br_dl, guar_br_ul, guar_br_dl, dlv_order, maxSduSize, sduErrRatio, resBERatio, delErrSdus, trfrDelay, trafHdlPrio
  • AT +CSCB? – get mode (0 = is in the set, 1 = is not in the set) and a set of types of CBMs are to be received by the ME including their data coding schemes as +CSCB mode, mids, dcss

Huawei

(see Huawei AT-commands and Tutorial for Huawei Modules)

  • AT^GETPORTMODE to display a list of devices present in a USB-stick

^GETPORTMODE: TYPE: WCDMA: huawei,NDIS:0,DIAG:1,PCUI:2,GPS:3 ~~~

  • AT^SYSCFG? to display network-mode preferences

^SYSCFG:2,0,3FFFFFFF,1,2 ~~~

  • AT^U2DIAG? for reading/controlling default mode (an alternative to sys-apps/usb_modeswitch)

    • AT^U2DIAG=0 – model only (no CD and SD-card; sys-apps/usb_modeswitch not necessary)
    • AT^U2DIAG=1 – model and CD (no SD-card)
    • AT^U2DIAG=255 – modem, CD, and SD-card (default)
    • AT^U2DIAG=256 – modem and SD-card (no CD)

^U2DIAG: 256 ~~~

Switching Modes

  • sys-apps/usb_modeswitch config file /usr/share/usb_modeswitch/12d1:1c0b

Huawei E173s

TargetVendor=0x12d1 TargetProductList=“1c05,1c07,1c08,1c10” MessageContent=“55534243123456780000000000000011062000000100000000000000000000” ~~~

  • OpenWRT’s usb-modeswitch config file /etc/usb-mode.json

{ “messages” : [ “55534243123456780000000000000011062000000100000000000000000000” ], “devices” : { “12d1:1c0b”: { “*": { “t_vendor”: 4817, “t_product”: [ 7173, 7175, 7176, 7184 ], “msg”: [ 0 ] } } } } ~~~

Firmware Upgrade

 Share!

 
comments powered by Disqus