How to test SMS-Modem using minicom?
Question Copied
How do I test my SMS-Modem using a terminal emulator such as Minicom?
Answer Copied
Please Note ITRS does not directly support hardware or issues related to GSM/SMS modems, this FAQ is provided as a guidance only.
Jump to step 5 to skip Minicom configuration.
- Use the built in logs to identify the different serial ports on your system.
root@monitor:~# dmesg | grep ttyserial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
- Start Minicom
root@monitor:~# minicom
You should see “Initializing Modem” followed by “Welcome to Minicom”.
If you get something like:
minicom: WARNING: configuration file not found, using defaults Device /dev/modem access failed: No such file or directory.
Then run:
root@monitor:~# minicom -s
Select Serial port setup > A and set correct device, i.e. /dev/ttyS0
Baud rate should be 115200 in minicom.
Press Enter, then select Save setup asdfl. You should now see “Initializing Modem” or be able to run Minicom
- If necessary, Press CTRL-A then Z to enter menu.
Select port connected to modem:
Press O > Serial port setup, press A to G for device to use and settings. Press Enter to exit.
- You may want to turn local Echo on so that you can see your commands: From Menu (CTRL-A then Z), press E.
From Welcome screen “E1” and Enter
- Test modem:
From Welcome screen, type “ATI” to get status:
ATISIEMENS MC35i REVISION 01.03
Type: AT+CREG? to get network status:
AT+CREG?+CREG: 0,1
+CREG:
where
Type: AT+CPIN? to get SIM PIN status:
AT+CPIN?+CPIN: READY
+CPIN:
where:
- PIN/PUK/PUK2 request status code
READY - ME is not pending for any password
SIM PIN - ME is waiting SIM PIN to be given
SIM PUK - ME is waiting SIM PUK to be given
PH-SIM PIN - ME is waiting phone-to-SIM card password to be given
PH-FSIM PIN - ME is waiting phone-to-very first SIM card password to be given
PH-FSIM PUK - ME is waiting phone-to-very first SIM card unblocking password to be given
SIM PIN2 - ME iswaiting SIM PIN2 to be given; this is returned only when the last executed command resulted in PIN2 authentication failure (i.e. +CME ERROR: 17)
SIM PUK2 - ME is waitingSIM PUK2 to be given; this is returned only when the last executed command resulted in PUK2 authentication failure (i.e. +CME ERROR: 18)
PH-NET PIN - ME is waiting network personalization password to be given
PH-NET PUK - ME is waiting network personalization unblocking password to be given
PH-NETSUB PIN - ME is waiting network subset personalization password to be given
PH-NETSUB PUK - ME is waiting network subset personalization unblocking password to be given
PH-SP PIN - ME is waiting service provider personalization password to be given
PH-SP PUK - ME is waiting service provider personalization unblocking password to be given
PH-CORP PIN - ME is waiting corporate personalization password to be given
PH-CORP PUK -ME iswaiting corporate personalization unblocking password to be given
Type: AT+CSQ to get signal strength:
AT+CSQ+CSQ: 17,99
+CSQ:
- Exit Minicom:
CTRL-A then Z then X, you should see “Resetting modem”
For more help about minicom, either do: man minicom or minicom –help.
Other useful commands/information Copied
Sending SMS
AT+CMGF=1AT+CMGS="+4670xxxxxx"Write message here. <ctrl+z>
Human readable signal strength Copied
Signal strength will be reported insmsd.logif verbosity is increased to 7 in /etc/smsd.conf. If there’s alot of information in /var/log/smsd/smsd.log and you can’t find the right line, use grep and search for dBm.