|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Sat Mar 15, 2025 00:10 |
Page: 1
Keywords: Mode: All keywords (AND) |
Mon Aug 21, 2017 04:40
|
Cuz_Man: Is there an easy way to determine the SMS server status i.e. no errors, processing files as normal?
I am trying to determine the server status from a c++ application to detect if the modem has stopped responding (a hangover from an earlier post "Modem Registration Delay Parameter").
Cheers,
Paul.
|
Thu Aug 03, 2017 23:04
|
Cuz_Man: Hi Keke,
I made the modifications (using 10 seconds) to the config file and when the system is started using the "sms3 start", the process pauses for 10 seconds and continues as expected.
When I unplug and then re-plug the modem, the udev rule issues the "sms3 restart" command and the system seems to hang at the pause phase:
2017-08-04 08:44:44,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 4690.
2017-08-04 08:44:44,2, GSM1: Modem handler 0 terminated. PID: 4691, was started 17-08-04 08:44:04, up 0 min.
2017-08-04 08:44:44,2, smsd: Smsd mainprocess terminated. PID: 4690, was started 17-08-04 08:44:04, up 0 min.
2017-08-04 08:44:45,2, smsd: Smsd v3.1.21 started.
2017-08-04 08:44:45,2, smsd: Running as root:root (0:0).
2017-08-04 08:44:46,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.4FZNzp /tmp/smsd_data.D2VbUn
2017-08-04 08:44:46,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0)
2017-08-04 08:44:46,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2017-08-04 08:44:46,5, smsd: Outgoing file checker has started. PID: 4746.
2017-08-04 08:44:46,7, smsd: All PID's: 4746,4747
2017-08-04 08:44:46,5, GSM1: Modem handler 0 has started. PID: 4747.
2017-08-04 08:44:46,5, GSM1: Using check_memory_method 1: CPMS is used.
2017-08-04 08:44:46,6, GSM1: Sending start string to the modem
2017-08-04 08:44:46,7, GSM1: -> AT
2017-08-04 08:44:46,7, GSM1: Command is sent, waiting for the answer. (10)
2017-08-04 08:44:46,7, GSM1: <- AT OK
2017-08-04 08:44:46,6, GSM1: Spending sleep time after starting (10 sec)
It never continues after the last entry.
If I then issue another "sms3 restart" command from a terminal session, the system will restart and work normally i.e. will continue after the 10 second pause.
I did also try at 30 seconds with the same result.
I tried changing the rules file to start and stop the service based on adding and removing the modem as per the below
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="Telit Wireless Module Modem", ENV{ID_VENDOR}=="Telit_wireless_solutions", SYMLINK+="ttySMSUSB0"
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="Telit Wireless Module Modem", ENV{ID_VENDOR}=="Telit_wireless_solutions", ACTION=="add", RUN+="/etc/init.d/sms3 start"
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="Telit Wireless Module Modem", ENV{ID_VENDOR}=="Telit_wireless_solutions", ACTION=="remove", RUN+="/etc/init.d/sms3 stop"
This had no effect.
As a side note, if you unplug and then re-plug in the modem while it is stalled at the waiting stage, the service will restart and this time it will not progress past the start string phase.
2017-08-04 08:53:31,6, GSM1: Sending start string to the modem
2017-08-04 08:53:31,7, GSM1: -> AT
2017-08-04 08:53:31,7, GSM1: Command is sent, waiting for the answer. (10)
2017-08-04 08:53:31,7, GSM1: <- AT OK
2017-08-04 08:53:31,6, GSM1: Spending sleep time after starting (10 sec)
2017-08-04 08:54:45,2, smsd: Smsd v3.1.21 started.
2017-08-04 08:54:45,2, smsd: Running as root:root (0:0).
2017-08-04 08:54:45,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.QDOSiQ /tmp/smsd_data.emthUH
2017-08-04 08:54:45,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0)
2017-08-04 08:54:45,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2017-08-04 08:54:45,5, smsd: Outgoing file checker has started. PID: 1096.
2017-08-04 08:54:45,7, smsd: All PID's: 1096,1097
2017-08-04 08:54:45,5, GSM1: Modem handler 0 has started. PID: 1097.
2017-08-04 08:54:45,5, GSM1: Using check_memory_method 1: CPMS is used.
2017-08-04 08:54:45,6, GSM1: Sending start string to the modem
2017-08-04 08:54:45,7, GSM1: -> AT
2017-08-04 08:54:45,7, GSM1: Command is sent, waiting for the answer. (10)
As mentioned before, if I issue a restart command from a terminal session, it will work correctly. Just seems that the udev rule doesn't work correctly.
Any ideas??
|
Wed Aug 02, 2017 03:52
|
Cuz_Man: Operating system name and version: Raspian/Linux 8.0
Version of smsd: 3.1.15-1.1+deb8u1
Smsd installed from: archive.raspberrypi.org/debian/ jessie release
Name and model of a modem / phone: Telit HE910
Interface: USB
Hello,
I am trying to setup Linux to automatically restart the SMS server when a USB modem is plugged in.
I have set this up using udev rules and it seems to work fine:
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="Telit Wireless Module Modem", ENV{ID_VENDOR}=="Telit_wireless_solutions", SYMLINK+="ttySMSUSB0"
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="Telit Wireless Module Modem", ENV{ID_VENDOR}=="Telit_wireless_solutions", ACTION=="add", RUN+="/etc/init.d/sms3 restart"
My issue is that when the reset is performed, the SMS server reports that the modem is not registered and attempts to then register the modem. This is performed 3 time with a second delay between each attempt. After the 3rd failure, the system essentially seems to stop (excerpt of the log below).
2017-08-02 12:40:00,7, GSM1: <- +CREG: 2,2 OK
2017-08-02 12:40:00,5, GSM1: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 2. TIME
2017-08-02 12:40:02,7, GSM1: -> AT+CSQ
2017-08-02 12:40:02,7, GSM1: Command is sent, waiting for the answer. (10)
2017-08-02 12:40:02,7, GSM1: <- +CSQ: 99,99 OK
2017-08-02 12:40:02,5, GSM1: Signal Strength Indicator: not present of not measurable, Bit Error Rate: not known or not detectable
2017-08-02 12:40:02,7, GSM1: -> AT+CREG?
2017-08-02 12:40:02,7, GSM1: Command is sent, waiting for the answer. (10)
2017-08-02 12:40:02,7, GSM1: <- +CREG: 2,2 OK
2017-08-02 12:40:02,5, GSM1: MODEM IS NOT REGISTERED, WAITING 1 SEC. BEFORE RETRYING 3. TIME
If I then issue a sms3 restart it kicks off again and starts working.
It would seem as though the modem is taking a finite amount of time to register on the network once it is plugged in. Is there a configurable parameter that will force the system to wait for X seconds when it starts up before looking for the modem i.e. start delay?
I have gone through the parameters and haven't found a parameter that would seem to accomplish this.
|
Page: 1
Time in this board is UTC.
|
|
|
 |
|
 |
|