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

[answered] Removable devices

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jun 2009
Location: France
Can you give me some ideas for dealing with removable USB devices? If I start smsd when a modem is unplugged the process for that modem is terminated. If I later plug in the modem, it is not recognised unless I restart smsd. Can you suggest how to automate the process, perhaps by restarting smsd every so often if a defined modem does not exist?

Thanks

Andrew

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Basically smsd is planned to work with fixed devices. However, some user had some idea or even code for plug-and-play support. It was with support for one device, if I remember correctly. If I find where this information was, I let you know and publish it here.

When smsd is started and modem does not exists, modem process will stop but smsd main process continues because there can be more modems to serve. From the log, of course, can be seen that modem process has stopped:
2009-06-26 19:54:06,5, GSM1: Modem handler 0 has started. /dev/ttyUSB2 PID: 17087.
2009-06-26 19:54:06,3, GSM1: Cannot open serial port /dev/ttyUSB2, error: No such device
2009-06-26 19:54:06,2, GSM1: Modem handler 0 terminated. PID: 17087, was started 09-06-26 19:54:06.

Also, after this a modem process is <defunct> which can be seen from the ps -ef list.

If you use the latest sms3 script to start smsd, you can see that there is *"smsd MAINPROCESS"* and for example *"smsd GSM1_______"* presented in the ps list. You could use crontab and script with detects that "smsd GSM1" is missing. In this case it's safe to run sms3 restart.

Another issue is the device name, which may change after a modem is disconnected and connected back again. One solution for this is using udev if it's available. I do not use udev by myself, but know smsd users who use it successfully. Changed device name can also be detected using a modified startup script, but my script is not complete enough to be published. My script is used to perform remote hard reset for a modem, which is little bit different thing.


« Last edit by keke on Sun Aug 16, 2009 12:54, 177 months ago. »

  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.