-
Notifications
You must be signed in to change notification settings - Fork 1
Serial Modem Communication
miopa edited this page Apr 7, 2017
·
14 revisions
Full reference: http://download-c.huawei.com/download/downloadCenter?downloadId=14254
To interact with the modem from terminal, you can use sudo socat - /dev/ttyUSB0,crnl
where /dev/ttyUSB0
is the serial port of the modem.
AT+GSN - read IMEI
AT+CIMI - read IMSI
AT^CVOICE=0 - Enable Voice
AT^CVOICE=1 - Disable Voice
AT^CVOICE=? - Check status
On a 3G modem used for data, it may be usefull to disable the voice.
http://www.3g-modem-wiki.com/page/Huawei+AT-commands
AT^U2DIAG=0 – switch the device in modem mode only
AT^U2DIAG=1 – device in modem mode + CD-ROM
AT^U2DIAG=255 – modem mode + CD-ROM + Card Reader
AT^U2DIAG=256 – modem mode + Card Reader
http://www.deepthought.ws/mobile/huawei-mobile/huawei-set-modem-mode-3ggprs/
AT^SYSCFG=13,1,3FFFFFFF,2,4 – connect only to 2G
AT^SYSCFG=14,2,3FFFFFFF,2,4 – 3G only
AT^SYSCFG=2,1,3FFFFFFF,2,4 – 2G preferred
AT^SYSCFG=2,2,3FFFFFFF,2,4 – 3G preferred
AT^SYSCFG=2,0,3FFFFFFF,2,4 – connect to any
AT+CPIN? - check PIN settings
AT+CPIN=<PIN-CODE> - enter PIN-code
AT+CLCK="SC",0,"<PIN-CODE>" - disable PIN verification
AT+CLCK="SC",1,"<PIN-CODE>" - add PIN verification
AT+CLCK="SC",2 - check PIN status (return value "1" if PIN is required by the SIM, "0" if it's not)
AT+CPWD="SC","<OLD-PIN>","<NEW_PIN>" - change PIN
AT+CGDCONT=1,”IP”,”<APN-name>”
AT+GMI - get manufacturer
AT+GMM - get model
AT+GMR - get revision
AT+CSQ - get signal quality (AT+CSQ=?)
AT+COPS? - get operator info
AT+CFUN=1,1 - reboot modem
AT^SYSINFO - Returns: status, domain, roaming status, mode, SIM state
- Status
0 - No service.
1 - Restricted service
2 - Valid service
3 - Restricted regional service.
4 - Power-saving and deep sleep state
- Domain
0 - No service.
1 - Only CS service
2 - Only PS service
3 - PS+CS service
4 - CS and PS not registered, searching
- Roaming
0 - Non roaming state
1 - Roaming state
- Mode
0 - No service.
1 - AMPS mode
2 - CDMA mode
3 - GSM/GPRS mode
4 - HDR mode
5 - WCDMA mode
6 - GPS mode
- SIM state
0 - Invalid USIM card state or pin code locked
1 - Valid USIM card state
2 - USIM is invalid in case of CS
3 - USIM is invalid in case of PS
4 - USIM is invalid in case of either CS or PS
255 - USIM card is not existent