|7th||5th of September,2016||Version 6 released|
|6th||21th of January, 2016||“HOW TO USE” and “LONG MESSAGE ON CLISMS VERSION 5.4.2” added by Iqa|
|5th||4th of August, 2014||“HOW TO TRIGGER SMS ALERT WHEN SERVER IS REBOOTED” added by Faez|
|4th||15th of September, 2010||Version 5.2 released; New section added – “CONFIGURING UPSMAN”|
|3rd||23rd of September, 2009||Updated the section “CONFIGURING PRTG Traffic Grapher TO CALL CLISMS.EXE” with new version of PRTG|
|2nd||28th of November, 2008||Added new section “SMS ALERT WHEN UPS RUNNING ON BATTERY|
|1st||13th of August, 2007||Initial release|
Copyright © 2007 – 2016 MOBITEK System Sdn. Bhd. All rights reserved.
No part of this document may be reproduced, distributed, stored in a retrieval system or translated into any language, in any form or by any means, electronic, mechanical, magnetic, optical, photocopying, manual or otherwise, without the prior written permission of MOBITEK System Sdn. Bhd.
MOBITEKTM is a trademark that belongs to MOBITEK System Sdn. Bhd.
MOBITEK makes no representations or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, MOBITEK reserves the right to revise this publication and to make changes from time to time in the contents hereof without obligation to notify any person of such revision or changes. Trademarks and Registered Trademarks Products and product names mentioned in this document may be trademarks or registered trademarks of their respective owners.
We like to extend our appreciation to the following person for their contribution in revising this manual:-
Mr. Muhamad Faezudin bin Hairuddin, UNIVERSITY SAINS MALAYSIA
- Ms. Nur Shafiqah binti Muhamad Baharum, UNIVERSITI PERTAHANAN NASIONAL MALAYSIA
Programme: Command Line Interface SMS (“CLISMS”)
API TYPE: COMMAND LINE INTERFACE (“CLI”) for Windows only
File Name: CLISMS.exe
System integrator, and software developer (“SI/SD”) must posses knowledge in using command line interface, or shell command in Windows command prompt environment.
Any software applications that can call external programme, or shell out to CLISMS.exe such as:
2.1 Network monitoring programme – OpManager, IPServerCheck, PRTG, etc.
2.2 Anti-virus programme
2.3 Firewall programme
2.4 Windows Services
The operating system must be Windows OS (XP and above)
Command Line Interface SMS (“CLISMS”) is part of the SMS Gateway Development Kit (“SMS GDK”). System integrator, and software developer can choose any development kit in the SMS GDK to build their own SMS Gateway.
|6.0||2016-09-05||ported from VB6 to VB .Net|
|5.4||2016-01-12||add support for concatenate SMS (long SMS)|
|5.2||2010-09-15||allow to send 1 message to a maximum of 3 mobile numbers|
|5.1||will re-initialize modem if it fails to do so|
|5.0||supports USSD where SI/SD can check credit balance, and reload credit|
Run the “setup.exe”.
By default, the “CLISMS.exe” will be installed in “C:\” or to the designated path as specified in the installation process.
- If necessary (e.g. in Windows Vista and above), configure “CLISMS.exe” to run in administrator mode.
HOW TO USE CLISMS
- Open the Device Manager and look into the Ports. Then you will find your modem is connected in which port on “Prolific USB-to-Serial Comm Port”.
- Open Right click on sms.bat. Then choose Edit
- Then the notepad will display like this. Change the port, phone number and message with necessary. Save it.
- Go back to your path file C:\Program Files (x86)\MOBITEK\CLISMS. Double click at sms.bat
- Then it will apear on command line form. This will automatically closed once the transaction of sending SMS is done.
- You can see the log file is generated on your path C:\Program Files (x86)\MOBITEK\CLISMS
- You may click on the log to see the transaction.
- Now you can see the record is there.
- The sending of SMS using the CLISMS is done.
LONG MESSAGE ON CLISMS VERSION 5.4.2
Long message text is supported on CLISMS version 5.4.2 which is can send more than 160 characters
- Right click on the sms.bat. The notepad will appear like this.
- Change the port number, phone number and message. This message I used for 165 character to be send out as LMS. Save it and close.
If you send out the SMS/LMS to 1 number, the command should be like this:
clisms /port=3 /to=01127171635 /msg=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA165 echo “sent”
If you send out the SMS/LMS to 3 numbers, the command should be like this:
clisms /port=3 /to=01127171635,0176096718,0125605167 /msg=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA165 echo “sent”
Commands can be executed through:
Windows command prompt
a software application that allows you to call CLISMS.EXE, and passing the parameters.
1. To send out SMS
clisms.exe /port=2 /to=0162211600 /msg=Alert
“port” is the COM port where the GSM modem is connected
“to” is the mobile number of the recipient (one number only)
2. To send 1 SMS to 3 numbers (maximum)
clisms.exe /port=2 /to=0162211600,0128877111,0197878101 /msg=Alert
“port” is the COM port where the GSM modem is connected
“to” is the mobile number of the recipient, maximum 3 numbers only, number is separated by comma
“msg” is the SMS to be sent out (160 character limit, and in text format only)
3. To check credit balance of HOTLINK
clisms.exe /port=2 /ussd=*122#
4. To check credit balance of DIGI
clisms.exe /port=2 /ussd=*126#
5. To check credit balance of XPAX
clisms.exe /port=2 /ussd=*124#
6. To top-up credit of HOTLINK
clisms.exe /port=2 /ussd=*111*14 digit PIN code#
7. To top-up credit of DIGI
clisms.exe /port=2 /ussd=*123*reload coupon serial number#
8. To top-up credit of XPAX
clisms.exe /port=2 /ussd=*122*16 digit reload code#
Responses for all the above commands will be logged in a text file called “Log.txt”. It is located at the same directory of “CLISMS.exe”.
CLISMS is suitable for use in the following situations:-
when SI/SD wants to quickly enable their own software applications, or system to send out SMS alerts;
to send SMS alert to administrator when server is down, virus is detected, or network intrusion (the network monitoring programme detects the server is down, and call CLISMS.exe);
to send SMS alert when Windows service fails to run;
to send SMS alert when UPS is running on battery, that is no power supply.
The benefits to system integrator, and software developer in using CLISMS are:
rapid development of a SMS Alert programme;
can decide who should receive outgoing message, when to send, what to send;
integrate SMS Alert function with existing software applications that support calling external programme;
open source (VB6), SI/SD can modified CLISMS to incorporate business rules, and process flow.
CONFIGURING NETWORK MONITORING TOOL
This section will explain how to use CLISMS with a network monitoring tool such as PRTG Traffic Grapher (https://www.paessler.com/prtg). When PRTG detects an event, it will send out SMS via CLISMS.
- Click on the Notifications.
- Click on the Mail to admin.
- Check the “Execute Program”. (DO NOT select the Send SMS/Pager Message check box)
- In “Program file:”, enter “CLISMS”, or the location of the CLISMS.exe
- In “Parameters:”, enter “/port=3 /to=0162211600 /msg=Alert”
Result: After configuration is done, when the sensor is triggered, a notification will be sent through SMS.
CONFIGURING WINDOWS SERVICE
At “First failure:”, select “Run a Program”.
At “Program:”, enter “C:\CLISMS.exe”
At “Command line parameters”, enter
“/port=1 /to=0122883030 /msg=Alert”
When MySQL service fails, a SMS alert will be send out to 0122883030 with message “Alert”.
CONFIGURING UPS MONITORING TOOL
This section will guide you how to configure the UPS to send SMS alert when there is no power supply and UPS is running on battery.
Each UPS manufacturer provides their own UPS software. In this example, the UPS manufacturer is Power Kinetics , and the UPS model is BlackoutBusterTX (https://www.powerkinetics.com.my/blackoutseries.htm), refer to illustration 1.
The UPS software is “Powersoft TX version 1.12”, refer to illustration 2. The UPS software can be downloaded from http://jst.cc/download.html
The end result is like this – when there is no power supply, the UPS will run on battery and will shut down the PC in 5 minutes time. Then 4 minutes before shutting down PC, UPS will call CLISMS to send SMS alert to the hand phone number 0163311600 with message “UPS running on battery”.
First, configure Powersoft TX to shut down PC when running on battery:-
1. To configure Powersoft TX with CLISMS, click on “Settings > Configuration”.
2. At “Battery Low Shutdown”, select “Shutdown in (s)”, enter “180”. This means when there is no power and UPS running on battery until low lever battery, the UPS will shut down the PC in 3 minutes.
3. At “Battery Shutdown”, check “Enable System Shutdown”, and enter “5”. This means 5 minutes before battery runs dry, UPS will shut down the PC.
4. Click “OK” to save setting.
Next, configure the Powersoft TX to call CLISMS:-
1. Then click on “Tools > Special”.
2. Check “Enable Job #1”, enter “4”, then at “Path” select the file “sms.bat”.
3. Use text editor (notepad), copy the following and save as “sms.bat”:-
clisms /port=2 /to=0163311600 /msg=UPS running on battery!
4. Click “OK” button to save setting.
The end result is like this: when there is no power supply, the UPS will run on battery and will shut down the PC in 5 minutes time. Then 4 minutes before shutting down PC, UPS will call CLISMS to send SMS alert to the hand phone number 0163311600 with message “UPS running on battery”.
llustration 5: Calling sms.bat
UPSMAN is a software written by GENEREX (www.generex.de). UPSMAN is a UPS management software. UPSMAN communicates with Unterinteruptible Power Supplies (UPS) and other devices via serial, USB or network interfaces in order to receive status information and measurement data.
Here is an illustration of configuring CLISMS with UPSMAN
clisms /port=2 /to=0162211600 /msg=Alert! Power failure!
HOW TO TRIGGER SMS ALERT WHEN SERVER IS REBOOTED
SMS Alert can be triggered after the server is booted with the help of script. Script contain a list of instruction for a computer. By taking advantages of this we create a script which will send SMS to designed number. This Script contain a command on sending specific message to receiver via CLISMS application and it is set to run right after the server is successfully booted.
1. Install “CLISMS.exe” located inside SMS Gateway Development Kit CD, manual for installing can be read inside the CD
2. Create a new notepad files copy and paste these code inside the notepad.
clisms.exe /port=1 /to=0123456789 /msg=server is booted.
* rename port number to the port number used by the GSM Modem
* rename the number to your own number
3. Save it inside the same folder of CLISMS ( default is C:\Program Files\MOBITEK\CLISMS )
*make sure the file name has “.bat” at the end ( exp: “SMS_Alert.bat” )
* make sure the file is save as type “All Files”
* Leave the encoding to ANSI
4. Copy the files and paste it as shortcut to startup folder.
* Window XP: “C:\Documents and Settings\%username%\Start Menu\Programs\Startup”
5. You’re done! Now every times the computer booted it will run the SMSAlert.bat which will send SMS Alert to your number.
TERMS AND CONDITIONS
CLISMS must be used together with MOBITEK SMS Modem.
MOBITEK System Sdn. Bhd. shall not be held liable for any loss or damaged as a result of using CLI SMS.
TERMS AND CONDITIONS OF SOURCE CODE
You are allowed to use, modify, distribute, this VB.net code for free.
This source code is provided on “as-is” basis. No warranty nor support is provided on the use of the code.
BY USING THIS CODE, YOU ASSUME ALL THE RISK AND RESPONSIBILITY
MOBITEK System Sdn. Bhd. EXPRESSLY DISCLAIMS ANY WARRANTIES
MOBITEK System Sdn. Bhd. SHALL NOT BE LIABLE TO YOU OR ANYONE ELSE FOR ANY LOSS OR DAMAGES WHATSOEVER