| 
 
 
 |  | 
                
                | 
                
                  | 
                    
                      
                        | SMS Server Tools 3 Community |  
                        | 
	
	
	
		
			| Welcome, Guest. The forum is currently read-only, but will open soon. | Fri Oct 31, 2025 07:50 |  Page:  1 
		
			| Keywords: Mode: All keywords (AND) |  
			| Thu Aug 12, 2010 13:53 |  
			|  |  
			| Thu Aug 12, 2010 12:08 |  
			| agorin: Thanks Keke. I try to reinstall Cygwin.
I've found:
extras.c
int my_system(char *command, char *info)
{
  int pid;
  int status;
  time_t start_time;
  start_time = time(0);
#ifdef DEBUGMSG
  printf("!! my_system(%s, %s)\n", command, info);
#endif
  writelogfile0(LOG_DEBUG, 0, tb_sprintf("Running %s: %s", info, command));
  pid = fork();
  if (pid == -1)
  {
    writelogfile0(LOG_CRIT, 0, tb_sprintf("Fatal error: fork failed."));
    return -1;
  }
... |  
			| Thu Aug 12, 2010 09:15 |  
			| agorin: Operating system name and version: Windows 2003 Server with CYGWIN
Version of smsd: 3.1.5
Smsd installed from: sources
Name and model of a modem / phone: NOKIA telephone
Interface: serial
I have this error: "Fatal error: fork failed", any hint ? |  
			| Wed Aug 26, 2009 18:32 |  
			| agorin: Hi Keke,
Probably Windows has taken the port, are you sure that there are no any Windows processes existing which could do this?
No, there aren't other processes wich uses serial ports...
The first modem (Falcom Samba) work on com3 port (via USB), the Nokia uses com1... I can try also com2...
In the Cygwin's side, there are no any other programs which may use the modem port, right? For example /usr/local/bin/smsd_run has nothing to do with the serial port?
No, smsd_run and event work only with database.
When your modem was working ok for many hours, did it send any messages? Does this problem happen always after a PDU is sent to the modem?
Can I send to you the logs via e-mail ?
Thanks for your attention Keke!
 Andrea |  
			| Wed Aug 26, 2009 16:23 |  
			| agorin: on modeminit.c there is a new part in  3.1.5 version, might have to deal with the problem?
    // 3.1.5:
    if (DEVICE.send_delay < 1)
    {
      if (write(modem_handle, command, strlen(command)) != strlen(command))
      {
        writelogfile0(LOG_ERR, 1, tb_sprintf("Could not send string, cause: %s", strerror(errno)));
        alarm_handler0(LOG_ERR, tb);
        return 0;
      }
      if (DEVICE.send_delay < 0)
        tcdrain(modem_handle);
    }
    else
    {
      for(x=0;x<strlen(command);x++)
      {
        if (write(modem_handle, command +x, 1) < 1)
        {
          if (print_error)
            printf("\nCould not send character %c, cause: %s\n",command[x],strerror(errno));
          else
          {
            writelogfile0(LOG_ERR, 1, tb_sprintf("Could not send character %c, cause: %s", command[x], strerror(errno)));
            alarm_handler0(LOG_ERR, tb);
          }
          return 0;
        }
        usleep(DEVICE.send_delay *1000);
        tcdrain(modem_handle);
      }
    } |  
			| Wed Aug 26, 2009 16:12 |  
			| agorin: A precisation:
I use Cygwin running smsd 3.1.5 as a Windows service on a Windows Server 2003.
Andrea |  
			| Wed Aug 26, 2009 16:03 |  
			| agorin: I have changed the modem with a well tested Nokia 6210 that work ok (many months now) in another system. But the error should re-happens.
The modem work ok for many hour and then re-happens:
An sms.log estract, the program seems hang after a timeout:
2009-08-14 13:41:07,7, GSM1: -> AT+CREG?
2009-08-14 13:41:07,7, GSM1: Command is sent, waiting for the answer
2009-08-14 13:41:07,7, GSM1: <- +CREG: 0,1 OK
2009-08-14 13:41:07,6, GSM1: Modem is registered to the network
2009-08-14 13:41:08,7, GSM1: -> AT+CMGS=98
2009-08-14 13:41:08,7, GSM1: Command is sent, waiting for the answer
2009-08-14 13:41:08,7, GSM1: <- >
2009-08-14 13:41:08,7, GSM1: -> PDU moved to Private
( PRIVATE BLOCK )
.
2009-08-14 13:41:09,7, GSM1: Command is sent, waiting for the answer
2009-08-14 13:41:50,6, smsd: Running a regular_run.
2009-08-14 13:41:50,7, smsd: Running regular_run (mainprocess): /usr/local/bin/smsd_run
2009-08-14 13:41:50,7, smsd: Done: regular_run (mainprocess), execution time 0 sec., status: 0
2009-08-14 13:42:16,7, GSM1: put_command expected (OK)|(ERROR), timeout occurred. 1.
2009-08-14 13:42:16,7, GSM1: <- 
2009-08-14 13:42:16,3, GSM1: The modem did not answer (expected OK).
2009-08-14 13:42:16,5, GSM1: Waiting 10 sec. before retrying
2009-08-14 13:42:26,6, GSM1: Checking if modem is ready
2009-08-14 13:42:26,7, GSM1: -> AT
2009-08-14 13:42:26,3, GSM1: Could not send character A, cause: Permission denied
2009-08-14 13:42:36,7, GSM1: -> .
2009-08-14 13:42:50,6, smsd: Running a regular_run.
2009-08-14 13:42:50,7, smsd: Running regular_run (mainprocess): /usr/local/bin/smsd_run
The daemon stal and the log have indefinitely only these lines:
2009-08-25 04:28:01,6, smsd: Running a regular_run.
2009-08-25 04:28:01,7, smsd: Running regular_run (mainprocess): /usr/local/bin/smsd_run
2009-08-25 04:28:01,7, smsd: Done: regular_run (mainprocess), execution time 0 sec., status: 0
Andrea  :shock: |  
			| Thu Aug 13, 2009 13:11 |  
			| agorin: No, I don't have changed anything...
I begin to suspect that this is a fault in the usb modem.
My msd.conf:
# Falcom SAMBA 75
devices = GSM1
os_cygwin = yes
logfile = /var/log/smsd.log
loglevel = 7
autosplit = yes
receive_before_send = yes
outgoing = /var/spool/sms/outgoing 
checked = /var/spool/sms/checked 
failed = /var/spool/sms/failed 
incoming = /var/spool/sms/incoming 
sent = /var/spool/sms/sent
report = /var/spool/sms/report
mypath = /usr/local/bin
date_filename = 2
keep_filename = no
eventhandler = /usr/local/bin/smsd_event
regular_run = /usr/local/bin/smsd_run
regular_run_interval = 60 
[GSM1]
device = /dev/com3
#pin = xxxx
smsc = 393492000200
init = AT+CPMS="MT","MT","MT"
mode = new
incoming = high
cs_convert = yes
report = no
Andrea  :oops: |  
			| Thu Aug 13, 2009 06:04 |  
			| agorin: Hi,
I have a falcom Samba 75. Does not work very well recently, ceases to work and I do not understand the reason...
If I detach the modem (USB device) and restart smsd it work only for many minutes.
The LOG have some errors: 
2009-08-10 09:12:35,2, smsd: Smsd v3.1.5 started.
2009-08-10 09:12:35,2, smsd: Running as spc:Nessuno.
2009-08-10 09:12:37,4, smsd: File mode creation mask: 00 (0666, rw-rw-rw-).
2009-08-10 09:12:37,2, smsd: Running in terminal mode.
2009-08-10 09:13:59,3, GSM1: The modem did not answer (expected OK).
2009-08-10 09:14:09,3, GSM1: Could not send character A, cause: Permission denied
2009-08-10 09:18:36,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 2300.
2009-08-10 09:23:20,3, GSM1: Could not send character , cause: Permission denied
2009-08-10 09:23:20,4, GSM1: Sending SMS to 393402590154 failed
2009-08-10 09:23:21,2, GSM1: Modem handler 0 terminated. PID: 3432, was started 09-08-10 09:12:37.
2009-08-10 09:23:21,2, smsd: Smsd mainprocess terminated. PID 2300, was started 09-08-10 09:12:37.
2009-08-10 09:25:54,2, smsd: Smsd v3.1.5 started.
2009-08-10 09:25:54,2, smsd: Running as spc:Nessuno.
2009-08-10 09:25:55,4, smsd: File mode creation mask: 00 (0666, rw-rw-rw-).
2009-08-10 09:25:55,2, smsd: Running in terminal mode.
2009-08-10 09:25:56,3, GSM1: Unexpected input: ^SYSSTART
2009-08-10 13:42:53,3, GSM1: Could not send character A, cause: Permission denied
2009-08-11 16:32:57,3, smsd: Done: regular_run (mainprocess), execution time 2 sec., status: 15
2009-08-11 16:32:57,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 4052.
2009-08-11 16:36:20,3, GSM1: Could not send character A, cause: Permission denied
2009-08-11 16:36:20,3, GSM1: Could not send character A, cause: Permission denied
2009-08-11 16:36:20,3, GSM1: Could not send character A, cause: Permission denied
2009-08-11 16:36:21,3, GSM1: Could not send character A, cause: Permission denied
2009-08-11 16:36:21,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2009-08-11 16:36:21,2, GSM1: Modem handler 0 terminated. PID: 4536, was started 09-08-10 09:25:55.
2009-08-11 16:36:21,2, smsd: Smsd mainprocess terminated. PID 4052, was started 09-08-10 09:25:55.
2009-08-11 16:38:30,2, smsd: Smsd v3.1.5 started.
2009-08-11 16:38:30,2, smsd: Running as spc:Nessuno.
2009-08-11 16:38:31,4, smsd: File mode creation mask: 00 (0666, rw-rw-rw-).
2009-08-11 16:38:31,2, smsd: Running in terminal mode.
2009-08-11 16:38:33,3, GSM1: Unexpected input: ^SYSSTART
2009-08-11 16:46:58,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 5804.
2009-08-11 16:46:58,2, GSM1: Modem handler 0 terminated. PID: 5380, was started 09-08-11 16:38:32.
2009-08-11 16:46:58,2, smsd: Smsd mainprocess terminated. PID 5804, was started 09-08-11 16:38:31.
Thanks, Andrea |  
			| Wed May 27, 2009 09:35 |  
			| agorin: I am glad to be helpful...
SMSTools3 is a great software !
Andrea |  
			| Wed May 27, 2009 08:56 |  
			| agorin: I solved by setting the account of the Windows Service equal to the account with whom I logged in Windows Vista.
The default account: Local System causes these problems.
Andrea |  
			| Wed May 27, 2009 07:34 |  
			| agorin: My smsd.conf:
devices = GSM1
# 1 write all logging to the screen. You can also enter a filename.
# If you remove that line, then the system log daemon (event log) will be used.
logfile = /var/log/smsd.log
loglevel = 7
outgoing = /var/spool/sms/outgoing 
checked = /var/spool/sms/checked 
failed = /var/spool/sms/failed 
incoming = /var/spool/sms/incoming 
sent = /var/spool/sms/sent 
mypath = /usr/local/bin
os_cygwin = yes
keep_filename = no
eventhandler = /usr/local/bin/mysmsd 
autosplit = yes
receive_before_send = yes
[GSM1]
device = /dev/com13
smsc = 393492000200
#memory_start = 0
#check_memory_method = 3
mode = new
incoming = high
cs_convert = yes
report = no |  
			| Wed May 27, 2009 07:34 |  
			| agorin: the problem persists, smsd.log:
2009-05-27 09:31:04,7, GSM1: Command is sent, waiting for the answer
2009-05-27 09:31:04,2, smsd: Conflict with .LOCK file in the spooler: /var/spool/sms/outgoing/SMS_20090527_093053_14.txt /var/spool/sms/checked
2009-05-27 09:31:04,2, smsd: Fatal error: Cannot move /var/spool/sms/outgoing/SMS_20090527_093053_14.txt to /var/spool/sms/checked. Check file and dir permissions.
2009-05-27 09:31:04,2, smsd: Smsd main program terminated abnormally.
2009-05-27 09:31:04,7, GSM1: <- OK |  
			| Tue May 26, 2009 18:33 |  
			| agorin: With the first hit the service has started.
But the smsd.log now says:
2009-05-26 20:30:10,2, smsd: Conflict with .LOCK file in the spooler: /var/spool/sms/outgoing/SMS_20090526_203005_13.txt /var/spool/sms/checked
2009-05-26 20:30:10,2, smsd: Fatal error: Cannot move /var/spool/sms/outgoing/SMS_20090526_203005_13.txt to /var/spool/sms/checked. Check file and dir permissions.
2009-05-26 20:30:10,2, smsd: Smsd main program terminated abnormally.
2009-05-26 20:30:10,2, GSM1: Modem handler 0 terminated. |  
			| Tue May 26, 2009 14:59 |  
			|  |  
			| Tue May 26, 2009 14:48 |  
			| agorin: I'm buying a Falcom Tango75
Ciao, Andrea |  
			| Tue May 26, 2009 14:46 |  
			| agorin: I'm using SMSTools3 with Cygwin in service mode (cygwinsrv) on Windows Vista. This is the command:
$ cygrunsrv --install smsd --path /usr/local/bin/smsd.exe --type auto --shutdown --env "CYGWIN=server" --env "PATH=/usr/local/bin:/usr/bin:/bin" --desc "SMS Server Tools 3" --args "-t"
The service on Windows starts but hang up immediatly.
In the Services management console the service have the same behaviour. Starts and stop immediatly.
The event viewer says: smsd: PID 7936: service `smsd' failed: signal 11 raised.
Any idea ?
Thanks, Andrea |  
			| Mon May 18, 2009 16:28 |  
			| agorin: SMSTOOLS 3 with my phone, a Samsung SGH-ZV50, seems not to recover sms messages. Any suggestions?
Thanks !!!
Andrea |  
			| Mon May 18, 2009 16:20 |  
			| agorin: Any suggestion relatively to a SMS device that work corrctly with SMS Tools 3 ?
Thanks Andrea :) |  Page:  1 
	 
		   Time in this board is UTC.   
 |  |  |  |  
                |  |  |  |