GSM Modem How To Guide

From Swivel Knowledgebase
Jump to: navigation, search


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.

Overview

Swivel can send SMS messages in a variety of ways including;

  • SMS Gateway by HTTP/HTTPS, SMTP or SMPP communication
  • GSM Modem

The use of a SMS gateway such as AQL or Clickatell is the recommended method for delivery of SMS messages.

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

Advantages

Control over hardware

Free sms, contracts, subject to reasonable usage

100% Dual channel communications

Disadvantages

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


Requirements

Swivel server

GSM Modem.

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.

4G testing


Additional Considerations

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.


SMS Overwriting

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.


Supported Modems

Serial Modems

  • Multitech MTCBA-G-F4
  • Siemens TC35i
  • Sierra Link FXT009 (FX Series)

USB Modems

None currently supported


Supported Serial Modems that are now End of Life

This modem may require a baud speed of 115200.


Unsupported/Untested Modems

These may work

Nokia Mobile Phone connected by data cable


Testing

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>


Troubleshooting

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

Bits: 8

Parity: N

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’


Error Messages

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?

Restart Tomcat


'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

port available

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

(9600,8,n,1)


Turn off autobaud (our recommended command string)

a. AT (make sure you get OK back first)

b. AT&F

c. AT (make sure you get OK back first)

d. AT+IPR=9600

e. AT+ICF=3,4

f. AT+IFC=2,2

g. AT&W

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

Press Ctrl-A

Press Shift-x


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 symbolic links

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*

Results: /usr/java/jre1.5.0_06/lib/i386/librxtxSerial-2.0.7pre2.so

/usr/java/jre1.5.0_06/lib/i386/librxtxSerial.la

/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

cd /usr/java/jre1.5.0_06/lib/i386

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?

A). Yes