GSM Modem How To Guide
- 1 GSM Modem How To Guide
- 2 Overview
- 3 Advantages/Disadvantages of GSM Modems
- 4 Requirements
- 5 Additional Considerations
- 6 SMS Overwriting
- 7 Supported Modems
- 8 Unsupported/Untested Modems
- 9 Testing
- 10 Troubleshooting
- 10.1 Troubleshooting using terminal software
- 10.2 Error Messages
- 10.3 Swivel Appliance GSM Troubleshooting
- 10.3.1 Check to see if the operating system has recognized the hardware
- 10.3.2 Use minicom –s
- 10.3.3 Config correct port parameters
- 10.3.4 Turn off autobaud (our recommended command string)
- 10.3.5 Send a Test Message
- 10.3.6 Save settings and exit
- 10.3.7 Modem Status Lights
- 10.3.8 Check symbolic links
- 10.4 GSM Modem FAQ
GSM Modem How To Guide
On Version 3 and later Appliances, we do NOT support GSM modems unless there is a MOXA NPort ethernet to serial converter. With the MOXA converter, both physical and virtual V3 Appliances are supported.
Swivel can send SMS messages in a variety of ways including;
- SMS Gateway by HTTP/HTTPS, SMTP or SMPP communication
- GSM Modem
This document covers the use of the GSM modem. Also see MOXA NPort Ethernet to Serial to provide ethernet to serial port access.
Currently only Serial port modems are supported and not USB modems. USB support is under development and beta testing is taking place.
Advantages/Disadvantages of GSM Modems
Control over hardware
Free sms, contracts, subject to reasonable usage
100% Dual channel communications
Only ONE GSM modem can be used per appliance (although multiple SMS gateways and possibly Ethernet based modems could be used)
Needs a signal, ensure install location has a carrier signal
Additional hardware device often with own power
Often no rack mount available
Can be a point of failure
SIM card needs to have contract
One Time Code sent by SMS should have additional protection (such as Swivel PIN protected security string)
Company policy may prohibit or need to be modified to allow a GSM device
Virtual Appliances such as VMware ESXi do not support serial ports
For a software install of Swivel the Java Comm API is required to communicate with the GSM Modem, this is pre-installed on the Swivel virtual or hardware appliances. Note: The JavaComm API is only available in 32 bit and requires the use of 32 bit java.
The number used for the GSM modem may need to be redirected to a help desk in case anyone tries to contact the source phone number for support.
The GSM modem should be configured to only send messages and thus will not be able to receive incoming calls or messages.
What is SMS Message Replacement?
This is where a new text message overwrites, replacing an older text message. This is supported by GSM modems but not by all SMS service providers. Only the security strings can be overwritten. Alerts that are sent out are not overwritten.
When this is set 0x41 is set for the protocol id (PID) for the message.
- Multitech MTCBA-G-F4
- Siemens TC35i
- Sierra Link FXT009 (FX Series)
None currently supported
Supported Serial Modems that are now End of Life
- FASTRACK XTEND FXT003 EDGE W-CDMA HSxPA MODEM R7.4aEx 3G http://www.sierrawireless.com Note: Ensure a power supply is ordered if required. For the User Guide see 
- Multitech MTCBA-G-F1 http://www.multitech.com
- Wavecom Fastrack
This modem may require a baud speed of 115200.
These may work
Nokia Mobile Phone connected by data cable
Firstly the message should be added to the message queue:
Message added to message queue for user: <username>, destination <Mobile number>
The message is then sent:
Security String message sent to user: <username>, destination <Mobile number>
A monitoring tool such as wireshark may be used to look at the data which is sent to the GSM modem
What do the lights on the modem indicate?
A solid TR light would indicate that the modem is locked by a process that has not disconnected. Other solid status lights could also indicate that the modem is not registered on the cellular network.
SMS not being sent from GSM modem?
Check the logs as they will contain message transport information. If an error message is reported check to see if the SMS message is still sent
restart the modem by powering off and then on
Check the flow control, hardware or software.
If a virtual machine is being used, verify the Virtual BIOS has detected a serial port. Also note that some VM's such as VMware ESXi may not support serial ports.
Check that the SIM is installed.
Check that you have paid the phone bill/SMS providers bill.
Is the ‘On Demand Delivery:’ Set to Yes under Dual Channel, if so an SMS will only be sent when requested.
Are more than 11 numbers being used or spaces or special characters in the number, if so try removing them.
Try turning off SMS message Replacement.
If the Transport Queue becomes locked, Tomcat may have to be restarted.
Is there a GSM signal to send an SMS message.
Has the Java Comm API been installed.
Try different number formats, remove the + or use 00 instead
If the SMS provider has changed a new Service Center number may need to be entered on the device, usually by connecting a serial cable and using HyperTerminal
GSM settings not being saved?
Check that the GSM settings are correct after Tomcat is restarted. Verify that the GSM settings in the config.xml file reflect those in the Swivel Administration console.
Intermittent Problems with GSM Modem
Ensure that the baud rate is set correctly, usually this will be 9600.
Ensure only one GSM modem is connected.
Troubleshooting using terminal software
Also see Swivel Appliance GSM Troubleshooting below
Use Hyperterminal and Blackbox software, Note: that this program cannot use Ctrl-Z and therefore cannot be used to send messages. Blackbox will check the Java Comm installation.
Start hyperterminal and connect to the GSM modem, the connection settings are normally as below, but may vary:
Serial Port: Com1
Bit Rate: 9600
Stop Bits: 1
Flow Control: Software (XON/OFF settings)
Connection to the GSM modem can be tested by using atz and at+csms=1 commands as below
atz expected response ‘Ok’
atz+csms=1 expected response ‘+csms: 1,1,1 Ok’
Exception occurred: org.marre.sms.SmsException: javax.comm.PortInUseException: Port currently owned by SMSJ
SMSJ is the library used by Swivel and may indicate that a Swivel process is still using the modem.
GSM transport is locked?
'admin:Loading transport class "com.swiveltechnologies.Swivel.server.transport.GsmTransport" failed, error: java.lang.reflect.InvocationTargetException
Install the Java Comm class
LOG_HTTP_TRANSPORT_ERROR, 503 Service Unavailable, Message added to message queue for user: xxxxxx, destination nnnnnnnnnn, Message send failed for user xxxx, destination nnnnnnnnnn message will be retried later, VODAFONE ERROR: 13 An internal error occurred.
GSM using Vodafone, error due to mobile network issue
LOG_GSM_FAIL, org.marre.sms.SmsException: Send failed: Unexpected response Last Response:
Message send failed for user: XYZ123, destination: <<MOBILENUMBER>>. Message will be retried later.
Message has been retried too many times, being removed from message queue, user: XYZ123, destination: <<MOBILENUMBER>>.
This is the sequence of events associated with a failure to send a SMS message. The Unexpected response message indicates a failure to communicate with the GSM modem. A common cause of this is incorrect Flow Control settings, try software Flow Control.
MODEM_EXCEPTION Port name - NONE; Method name - openPort(); Exception type - Port not found.
This is seen when a Serial Port is set to NONE under the GSM Modem Transport. It is known, if the ModemTransport.class is being used, then you may need to restart Tomcat after changing the Serial Port from NONE.
Swivel Appliance GSM Troubleshooting
Check to see if the operating system has recognized the hardware
dmesg | grep tty (display hardware info)
E.G ttyS0 at 0x03f8 (irq = 4) is a 16550A
or setserial –g /dev/ttyS0
list of active connections to serial processes and waiting connections.
ps -ef | grep tty
compare output before and after the power cycle of the modem.
Use minicom –s
running the minicom -s command from the command line
Config correct port parameters
Turn off autobaud (our recommended command string)
a. AT (make sure you get OK back first)
c. AT (make sure you get OK back first)
Send a Test Message
a. AT+CMGF=1 (make sure you get OK back first)
b. AT+CMGS="phone_number" (this must begin with the Country Code, e.g. 447796201505)
c. Enter your message, e.g. Test Message.
d. After you have composed your message, click CTRL Z to Send.
e. Save settings and Exit.
f. Send String from the Admin Console.
Save settings and exit
Press Enter to leave the Serial Port screen Select - Save setup as dfl - should say "Configuration Saved"
Select - Exit
Modem Status Lights
a. LED ON Permanent = Modem is switched on but not registered on the network.
b. LED Flashing slowly = Modem is switched on and registered to the network, and it’s activity status is idle.
c. LED Flashing rapidly = Modem is switched on and registered on the network and a communication is in progress.
Check too see if the symbolic link files are correct using this command line
(Note symbolic link versions may vary according to build version)
ls -l /usr/java/jre1.5.0_06/lib/i386/librxtxS*
/usr/java/jre1.5.0_06/lib/i386/librxtxSerial.so -> librxtxSerial-2.0.7pre2.so If the symbolic link files are missing use this command to re-create
ln -sf librxtxSerial-2.0.7pre2.so librxtxSerial.so
• Check to see if a port exists use: “setserial -g /dev/ttyS0”
• List open ports: “lsof /dev/ttyS*”
GSM Modem FAQ
Q). Where are the XON/OFF settings
A). This is the Software flow control
Q). How many GSM Modems can be used
A). One per appliance, although the nport ethernet port may allow more than one, or multiple SMS gateways can be used.
Q). Is the Java Comms API installed on the appliance?