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 05:10
SMSTools3 Community » Help and support Bottom

[answered] Saldo

  This topic is locked

Page:  1

Author Post
Member
Registered:
Apr 2010
Location: Portugal
Hello.

Instead of sending a command to the modem in a specific time interval, allow commands (like AT+CUSD=1,"*102#") to be sent whenever necessary/intended (example via smsd).

Regards,
Carlos

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Carlos wrote
Instead of sending a command to the modem in a specific time interval, allow commands (like AT+CUSD=1,"*102#") to be sent whenever necessary/intended (example via smsd).

You could define and use regular_run_cmdfile for this kind of operation. When you know that details of saldo are required, just create this file with AT+CUSD command and after a while you have the saldo logged.

See also all regular_run* settings, they may be useful for you.

Member
Registered:
Apr 2010
Location: Portugal
Topic owner
Hello Keke.

Currently I'm using the regular_run* settings. However, I think it could be interesting to run not on a regular basis interval, but on demand.

Best regards,
Carlos

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Carlos wrote
However, I think it could be interesting to run not on a regular basis interval, but on demand.

That's just what regular_run_cmdfile does.

Interval must be used, because it defines how often regular_run_cmdfile is checked. This interval could be couple of seconds when commands are read from the regular_run_cmdfile.

So, when a regular_run_cmdfile does not exist, nothing is done. And when your front-end application decides that details of saldo are required, it can create the regular_run_cmdfile and after couple of seconds smsd will do the job. After the job is done, regular_run_cmdfile is removed. Therefore a job is not repeated, your application should create this file again when it's required.

Perhaps you have something that I have not understood? :(

What kind of regular_run* setup you have currently?

Member
Registered:
Apr 2010
Location: Portugal
Topic owner
Hello Keke.

I just configured regular_run* for "querying saldo. However, after the command is issue, both the result file as the command file are deleted (same problem has been reported on this forum but I have found the solution...)

Here goes my smsd.conf file:

...
[MODEM1]
...
regular_run_interval = 2
regular_run_cmdfile = /var/spool/sms/command/MODEM1c
regular_run_statfile = /var/spool/sms/MODEM1
...

On /var/log/smsd.log, I see the command being issued, and if I'm quick enough I see the file /var/spool/sms/MODEM1 being created, but then is deleted.

Best regards,
Carlos

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Carlos wrote
just configured regular_run* for "querying saldo. However, after the command is issue, both the result file as the command file are deleted (same problem has been reported on this forum but I have found the solution...)

Please read the manual :). Starting from this setting, there is Regular_run for a modem explained.

The regular_run_statfile is deleted, because it contains a result of last run. In your case (with interval 2) it does not exist very long time. You can use regular_run and regular_run_post_run scripts to handle regular_run_statfile, if necessary.

The regular_run_cmdfile is deleted, because otherwise it is processed again and again. It's designed to be processed only once, and that's what you wanted too ;).

You could try to define regular_run_logfile = /var/log/smsd_saldo.log. From this log you can always see what is the latest saldo and what is the history of it.

Member
Registered:
Apr 2010
Location: Portugal
Topic owner
Hum.. ok...

But what I was expecting has *only* the regular_run_cmdfile to be deleted... well.. I have to find "another" workaround :)

Carlos

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Carlos wrote
But what I was expecting has *only* the regular_run_cmdfile to be deleted...

The regular_run_statfile is deleted before each run, because the manual says so ;).

Carlos wrote
well.. I have to find "another" workaround :)

Ok, if you cannot use regular_run_post_run (because of the version of smsd), you probably have already tried the regular_run_logfile and it was not enough... In that case you really need to continue searching... :)

You still have unread answers and questions in a topic owned by you, here, is that outdated and can be closed?

  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.