SMS Server Tools 3
This site is hosted by Kekekasvi.com
 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. Please login or register. Fri Mar 29, 2024 00:59
SMSTools3 Community » Help and support Bottom

[answered] how to run AT command from ext application program

  This topic is locked

Page:  1

Author Post
Member
Registered:
Mar 2010
Location: depok, Indonesia
Operating system name and version: WinXP SP2
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: SE M600i
Interface: USB

how to run some ATcmd like AT+CUSD=1,"*111*1#",0; not in config file or cmdLine?
but in external application program (with java, php, or others).
Is there an API ?

thanks,
-alfin-


« Last edit by alfinsi on Mon Mar 08, 2010 05:09, 171 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
There is a setting regular_run = filename. This external script or program can use the modem as it's closed by smsd when the script is called. Use the setting regular_run_interval to define number of seconds between each run. By default the interval is 300 seconds.

If you need that the smsd will send your commands to the modem, you can use the following settings for a modem:

regular_run_interval = 60
regular_run_cmdfile = /var/spool/sms/regular_run_cmdfile
regular_run_statfile = /var/spool/sms/regular_run_statfile
regular_run_logfile = /var/log/smsd_GSM1_regular_run.log


Once per minute smsd will check if the regular_run_cmdfile exists. When it exists, all lines from it are sent to the modem, one line at a time. Empty lines and lines starting with # are ignored. Output of each command is stored to the regular_run_statfile and to the smsd_GSM1_regular_run.log. Statfile stays available until next run, in this case one minute.

Member
Registered:
Mar 2010
Location: depok, Indonesia
Topic owner
thanks, very quick reply :)

I want to run my script of ATcmd not in periodic with some interval, but when needed. For example when even button click.
what i have to do ?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Use that second choice:

regular_run_interval = 60
regular_run_cmdfile = /var/spool/sms/regular_run_cmdfile
regular_run_statfile = /var/spool/sms/regular_run_statfile
regular_run_logfile = /var/log/smsd_GSM1_regular_run.log


To get a faster response in the UI, the setting regular_run_interval might be much lower, for example 5 seconds or even one second. This also causes that regular_run_statfile does exists only a few seconds, because it's removed when a new run is started (even with no more AT commands to send).

Your "event button" might do the following:
- Check if regular_run_cmdfile exists. If it does, wait until it's gone away.
- Read the last line from the smsd_GSM1_regular_run.log file.
- Create a regular_run_cmdfile with your AT commands.
- Periodically check the last line from the log. When it's changed, it contains the answer to your AT command.

Could this work with your application?

Member
Registered:
Mar 2010
Location: depok, Indonesia
Topic owner
yesss... thanks a lot keke, u r brilliant :)

  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.