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. Thu Nov 21, 2024 20:16
SMSTools3 Community » Help and support Bottom

send at commands concurrently

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Jan 2013
Location: Bolzano, Italy
Hello,
I need to send AT commands (from an external tool) to the modem while smstools is working.
There is a lock mechanism on serial device for avoid conflicts reading/writing?

thanks,

Luca

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
In Unix there is no generic lock mechamism, and because of this smstools3 has some regular_run_* settings.

See the setting regular_run_cmdfile and other related settings too. With those features you can send your external commands and get the results.

For example, if saldo of prepaid SIM is needed, this sample can do it: Sample config and script for regular_run and balance of prepaid SIM using USSD.

Member
Registered:
Jan 2013
Location: Bolzano, Italy
Topic owner
no there is no generic mechanism but some applications like minicom creates a lock file in /var/lock for avoid concurrent access.
Yes I already use regular_run_cmdfile but for my purpose is not usable: the command I need to send are 'custom' at command that haves different parameters at each call and the client needs to make this calls synchronous.

A simple idea could be:
1) at each access to serial device, a lock file is created. when the access is terminated the lock will be removed;
2) if a lock file is present, the client (see point 3) or smsd should wait (with an optional timeout) until the lock is removed;
3) in the smstools package an small client will be provided for to make access to the serial device with the lock mechanism;

an more elegant alternative would be create an additional serial device that process the IO with the locking support but I don't now how to do this :-)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think I will not implement any lock files. The idea is simple, but: no.

If you have a code which can communicate with a modem, you could check if regular_run with regular_run_interval can be used. Regular_run defines an external program which is executed periodically. While executing, a modem is closed and can be used.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.