SMS-Alerting with MultiModem
Model: GPRS MTCBA-G-EN-F4-ED-EU
Requirement
You need the follwoing programs and tools:
- Building programs (e.q make, gcc, ...)
- smstools3 Homepage
- Interceptty Homepage
- last released Firmware for the MultiModem FTP Folder
- SIM-Card and the PIN-Code
- Static IP-Address in your Network
Installing
MultiModem
Attention! The MultiModem have in the default settings running a DHCP-Server.
- Connect the MultiModen to your PC/Notebook with a networkcabel (Crossover)
- Open a Webbrowser and type the URL:
http://192.168.2.1
- Login the Webpage with User: admin and Password admin
- Check the newest Firmware for the MultiModem and installed it
ftp://ftp.multitech.com/wireless/mtcba-x-en/
- Under Tools => Firmware upgrade
- Change the IP-Address IP-Setup => General Settings
- Disabel PPP PPP => PPP Configuration
- Save the changes with Save & Restart
- Integrate the MultiModem in your Network
SMSTools3
- Download the latest released smstools3.x.x.tar.gz file form the Homepage and save it on your nagios-server.
- unzip the smstools3.tar.gz file and change into the source-folder.
- make && make install
- chown -R nagios:nagios /var/spool/sms/
- editing the init.d script
- change user and groups to nagios
- change the directory tree to your installation
Interceptty
- Download the latest released interceptty.x.x.tar.gz file from the Hompage and save it on your naigos-server.
- ./configure
- make && make install
- configure the interceptty in the /etc/inittab to supply of the virtual serial interface
smsg:<default runlevel>:respawn:/usr/local/bin/interceptty -m nagios,nagios,0666 '@<IPAddress-MultiModem>:5000' /dev/serial-server
- create symbolic link from /etc/smsd.conf to NAGIOS-PREFIX/etc
Configuration
Multimodem
- Insert SIM-Card in the Modem
- Connect with telnet to the ModemIP (with Portnumber 5000)
telnet IP-ADDRESS 5000
Login: admin
Password: admin
- Check the correct Multiband settings
ATI0
WAVECOM MODEM
MULTIBAND 900E 1800
For germany is this the right settings, if you have a returncode
WAVECOM MODEM
MULTIBAND G850 1900
You may use this setting for a german vodafone link:
WAVECOM MODEM
MULTIBAND G900 1800
You can set the MULTIBAND with command
at+WMBS=5,0
Using the AT Command "at+wmbs=<Band>[,<param>]"
For example, if you want to change to 900/1800 MHz, and would like the setting to take effect immediately, type:
at+wmbs=5,1
The first integer sets the <Band> (5 in the above example):
- 0: mono-band mode 850 MHz
- 1: mono-band mode 900 extended MHz (900E)
- 2: mono-band mode 1800 MH
- 3: mono- z band mode 1900 MH
- 4: dual-band mode 850/1900 MHz
- 5: dual-band mode 900E (extended) / 1800 MHz
- 6: dual-band mode 900E (extended) / 1900 MHz
The second integer sets the <Param> (1 in the above example):
- 0: The wireless CPU will need to be reset to start on the specified band.
- 1: The change is effective immediately: the GSM stack is restarted with the specified band.
SMSTools3
- Open the /etc/smsd.conf with your favorite editor
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7
blocktime = 60
alarmlevel = 5
alarmhandler = /usr/local/bin/alarm.sh
user = nagios
group = nagios
infofile = /var/run/sms/smsd.working
pidfile = /var/run/sms/smsd.pid
[GSM1]
device = /dev/serial-server
# pre_init = no
keep_open = no
incoming = no
baudrate = 2400
send_delay = 10
pin = 1234
rtscts = no
cs_convert = yes
report = no
regular_run_interval = 60
regular_run_cmd = AT+CREG?;+CSQ;+COPS?
regular_run_statfile = /dev/shm/sms_stat
- Create symbolic link at /etc/smsd.conf to /usr/local/nagios/etc
ln -s /etc/smsd.conf /usr/local/nagios/etc
Testing