SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Fri Nov 22, 2024 04:17
SMSTools3 Community » Help and support Bottom

[answered] some question about smstools3

  This topic is locked

Page:  1

Author Post
Member
Registered:
Sep 2009
Location: east java, Indonesia
Operating system name and version: ubuntu 8.04
Version of smsd: 3.1.5
Smsd installed from: sources
Name and model of a modem / phone:usb modem sierra 815u
Interface: USB

Hi expert,
I have succesfully made user interface of sms3 with cakePHP, with this application I can receive message and send message on multi contact and multigroup. smstools3 is a great SMS gateway. thanks. but I have a few questions that I have an application can create protected from piracy.
1) how do we know the IMEI number of the modem from smstools3 ? what files should be read?
2) I want the web applications that have been made to recognize only one type of smstools version only. so that my application can not be hijacked. have you any idea ?
3. How do I view the running status of sms3 from web application ? what files should be read?

thanks

regard

farid

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
mfaridmailbox wrote
1) how do we know the IMEI number of the modem from smstools3 ? what files should be read?

When smsd is starting, it tries to read IMSI from the modem using a command AT+CIMI. This response is reported on the log using IMSI: title. If this command is not supported, smsd tries to read IMEI using AT+CGSN command. In this case IMEI is reported using the same title, IMSI:. Usually, when AT+CIMI is supported, IMSI is reported as it is and IMEI is reported using a title CGSN:. There is no file where those codes are easily readable, you can extract the data from the log file.

mfaridmailbox wrote
2) I want the web applications that have been made to recognize only one type of smstools version only. so that my application can not be hijacked. have you any idea ?

Please explain "one type of smstools", I did not understand what you meant with it :(.

You can of course protect you application using .htaccess, or something else, like a key in the URL.

If you want that only your application can create valid outgoing files for smstools, you could modify the name of To: header:
- Define a checkhandler in the smsd.conf.
- In the checkhandler, remove all To: headers which are existing, as they are invalid, and
- rename all ProtectedTo: headers to To: headers. This can be done using formail.
- Continue as usual.

With this kind of change, your application will write destination numbers using ProtectedTo: header which is secret and hijackers do not know it. Checkhandler will modify the header and files created by hijackers are going to failed because there is no destination defined.

mfaridmailbox wrote
3. How do I view the running status of sms3 from web application ? what files should be read?

You must compile smsd with statistics enabled and stats directory defined. You can then read status with:
$result = file_get_contents("/var/log/smstools/smsd_stats/status");

The result is, for example:
Status:     09-11-27 11:59:45, irii--------
SONERA: 09-11-27 11:59:36, Idle, 1234, 1, 123, ssi: -63 dBm, ber: < 0.2 %
ELISA: 09-11-27 11:59:44, Receiving, 2345, 0, 234, ssi: -77 dBm, ber: < 0.2 %
DNA: 09-11-27 11:59:35, Idle, 3456, 0, 345, ssi: -73 dBm, ber: < 0.2 %
SAUNALAHTI: 09-11-27 11:59:35, Idle, 4567, 0, 456, ssi: -77 dBm, ber: < 0.2 %
Member
Registered:
Sep 2009
Location: east java, Indonesia
Topic owner
thanks for the answer. you are so kind. I apologize for the delay in my response, when you've answered my questions quickly. I plan to sell a encrypted web application that has a modem in a package. I entered IMEI number into web application source, so the customers can only use the modem that I give. I also think how I can make customers could only use the smstools I include in the package. the customer can not compile it himself. This idea may look stupid, but I think this is one way in order the application can not be cracked by other people. This is the purpose of my second question.
About your answer to my first question, I was not able to read files from a web application, because mode of the file is 0640. I have an idea to enter the command AT+CGSN into reguler_run_cmd. But the problem is that I have placed orders regular_run_cmd = AT+CUSD = 1, "*555*1#", 15 to the smsd.conf file. my question is how to run the command AT+CGSN along with the command AT+CUSD = 1, "* 555*1#", 15 together ?
the porpose of the third question I really just wanted to see if smsd is running or not. I can see by looking at the file /var/run/sms/smsd.pid. but when smsd not run normally, I can not tell by simply checking the existence of the pid file. What the function of smsd.working file? why I do not find it in the directory /var/run/sms? I've put the line:
infofile = /var/run/sms/smsd.working
pidfile = /var/run/sms/smsd.pid
on smsd.conf file and I have already changed the file /etc/init.d/sms3
there is one more question, sometimes I want to send messages to many number. Some invalid destination number so that takes about 3 minutes to go to the directory /var/spool/sms/failed. how to speed up the pending time?
sorry for my bad english.. :)

regard

farid


« Last edit by mfaridmailbox on Sun Nov 29, 2009 03:59, 182 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
mfaridmailbox wrote
I plan to sell a encrypted web application that has a modem in a package. I entered IMEI number into web application source, so the customers can only use the modem that I give. I also think how I can make customers could only use the smstools I include in the package. the customer can not compile it himself. This idea may look stupid, but I think this is one way in order the application can not be cracked by other people. This is the purpose of my second question.

You are trying to "close" an application which is open-source? ;) I think that I'm unable to help you with this.

mfaridmailbox wrote
About your answer to my first question, I was not able to read files from a web application, because mode of the file is 0640.

Check the smsd.log file when smsd has started. There is "file mode creation mask" reported. Usually it's 022 (0644). It's inherited from the process which started smsd. You can use umask to change the mask.

mfaridmailbox wrote
I have an idea to enter the command AT+CGSN into reguler_run_cmd. But the problem is that I have placed orders regular_run_cmd = AT+CUSD = 1, "*555*1#", 15 to the smsd.conf file. my question is how to run the command AT+CGSN along with the command AT+CUSD = 1, "* 555*1#", 15 together ?

You can define more than one regular_run_cmd for multiple commands.

mfaridmailbox wrote
the porpose of the third question I really just wanted to see if smsd is running or not. I can see by looking at the file /var/run/sms/smsd.pid. but when smsd not run normally, I can not tell by simply checking the existence of the pid file.

Check the process list: ps -efj | grep smsd | grep -v grep. From the result check if there is MAINPROCESS and GSM1 existing. In this case smsd is running normally.

mfaridmailbox wrote
What the function of smsd.working file? why I do not find it in the directory /var/run/sms? I've put the line:
infofile = /var/run/sms/smsd.working
pidfile = /var/run/sms/smsd.pid
on smsd.conf file and I have already changed the file /etc/init.d/sms3

When smsd has received termination signal, and is still sending SMS (for example multipart), this file contains an explanation. The script sms3 will tell what smsd is doing. Usually this file does not exist.

mfaridmailbox wrote
there is one more question, sometimes I want to send messages to many number. Some invalid destination number so that takes about 3 minutes to go to the directory /var/spool/sms/failed. how to speed up the pending time?

You can decrease errorsleeptime setting which defaults to 10 seconds. However, this does not help you much. There is a fixed count for retries, failed message is retried twice. This cannot be changed without modifying the source code.

Member
Registered:
Sep 2009
Location: east java, Indonesia
Topic owner
thanks keke, its clear now.. :)

regard

farid

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.