| Keywords: Mode: All keywords (AND) |
|
Thu Jan 17, 2013 20:45
|
lucadistefano: 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 :-)
|
|
Wed Jan 16, 2013 13:43
|
lucadistefano: 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
|