NowSMS failed to receive/send 2-way SMS messages

NowSMS failed to receive/send 2-way SMS messages SearchSearch
Author Message
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 3
Registered: 08-2014
Posted on Monday, August 18, 2014 - 02:54 pm:   

Hello,

NowSMS failed to receive/send 2-way SMS messages with the following errors in the Debug log (SMSDEBUG.LOG) file. All incoming messages are queued up and they are processed once I stopped and restarted NowSMS service. Modem is fine. How can we avoid these issues? Is there a way to recycle the service automatically in NowSMS when it detects these issues?

Thanks
Vijay

=====================================================
06:13:11:021 [17] ModemReceiveMessages:
ERROR

06:13:11:021 [17] ModemReceiveMessages: AT+CPMS=?
06:13:11:037 [17] ModemReceiveMessages:
+CPMS: (("SM","ME","BM","SR"),("SM","ME"),("SM","ME"))

OK

06:13:14:021 [17] ModemReceiveMessages:
ERROR

06:13:14:021 [17] ModemReceiveMessages: AT+CPMS=?
06:13:14:037 [17] ModemReceiveMessages:
+CPMS: (("SM","ME","BM","SR"),("SM","ME"),("SM","ME"))

OK

06:13:17:021 [17] ModemReceiveMessages:
ERROR

06:13:17:021 [17] ModemReceiveMessages: AT+CPMS=?
06:13:17:037 [17] ModemReceiveMessages:
+CPMS: (("SM","ME","BM","SR"),("SM","ME"),("SM","ME"))

OK

06:13:19:318 [1] ThreadListenForConnections: Before accept
06:13:19:318 [1] ThreadListenForConnections: After accept
06:13:19:318 [17] ThreadProcessModem: AT+CNMI=2,0
06:13:19:318 [17] ThreadProcessModem: Before ModemRelease - COM1:
06:13:19:318 [17] ThreadProcessModem: After ModemRelease - COM1:
06:13:21:365 [0] main: Shutdown: Closing log files
===========================================================
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4998
Registered: 08-2008
Posted on Monday, August 18, 2014 - 04:20 pm:   

Hi Vijay,

The log suggests that there is an unexpected error while polling for received messages. So NowSMS sends some additional commands to verify that the modem is OK ... and those tests seem OK, so a full modem reset is not attempted.

If this happened while sending, after a few repeated error, it would reset the modem. But polling/receive errors are not uncommon, so this does not trigger a reset. In fact, can you confirm that this "ModemReceiveMessages: ERROR" goes away after service restart, or does it r main and everything works?

We'd like to understand the problem better. Certainly, if we can detect an error and use that as a trigger to reset the modem, that would help your situation.

Please edit SMSGW.INI and under the [SMSGW] header, add DebugModemPoll=Yes. This will add considerably more detail to the SMSDEBUG.LOG, so we can get a better idea of what is happening.

After the problem resurfaces, send the SMSDEBUG.LOG to nowsms@nowsms.com with Attention: Des in the subject line. If you do send a log, if you could also reply to the post here, just in case I need to look for the file in an email filter.

--
Des
NowSMS Support
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 4
Registered: 08-2014
Posted on Monday, August 18, 2014 - 05:16 pm:   

Thank You, Des, for the quick response.

Once I restarted the service, all error messages are gone and NowSMS started processing incoming messages normally.

As you suggested, I added DebugModemPoll=Yes and recycled the service. I will wait for the issue to happen again. Is there a web page where all these options are listed?

One Question: Is there a way we can direct logging (IN, OUT and debug) to a different folder instead of the installation folder?

Thanks
Vijay
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4999
Registered: 08-2008
Posted on Monday, August 18, 2014 - 08:02 pm:   

Hi Vijay,

You can find most advanced parameters here:

http://www.nowsms.com/doc/advanced-configuration-settings/ini-file-settings

DebugModemPoll=Yes is not there because it was added for very specific troubleshooting cases. Normally this extra data is not logged because it is very verbose and makes the debug log difficult to follow.

The above link will explain the LogDirectory= and DebugLogDirectory= parameters for relocating the logs.

--
Des
NowSMS Support
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 5
Registered: 08-2014
Posted on Monday, August 18, 2014 - 08:28 pm:   

Thank You, Des!!
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 6
Registered: 08-2014
Posted on Thursday, August 21, 2014 - 03:32 pm:   

Hi Des,

This issue happened again and I am attaching the debug file. Can you please check on this?

Here is what we have in our SMSGW.INI file

WebAuth=Yes
WebMenu=Yes
WebDisplaySender=Yes
WebDisplayRoute=Yes
WebPort=8800
SeparateUserQueues=Yes
ReceiveSMS=Yes
ReceiveMMS=No
PHPEnable=No
PHPAllowRemote=No
ReceiveSMSCharset=utf-8
Modem1=COM1:
AlertEMailSMTPPort=25
AlertEMailQueueSize=10
Debug=Yes
DebugModemPoll=Yes
DebugLogDirectory=C:\Program Files\NowSMS\Debug
LogDirectory=C:\Program Files\NowSMS\Logs

Thanks
Vijay

application/octet-streamDebug Files
SMSDEBUG_820.BAK (20462.1 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5006
Registered: 08-2008
Posted on Friday, August 22, 2014 - 03:53 pm:   

Hi Vijay,

As I mentioned via email, something is obviously going wrong in the modem firmware ... it is just lucky that a simple reset resolves the problem.

We did encounter a similar issue a few years ago, and after a repeated failure polling for messages, some modem tests were run to determine whether the modem should be reinitialized. So we added a test for this condition.

Hopefully it will resolve the problem, as after a number of successive errors, it will reint the modem.

An update is at http://www.nowsms.com/download/nowsms20140821.zip.

--
Des
NowSMS Support
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 7
Registered: 08-2014
Posted on Friday, August 22, 2014 - 04:41 pm:   

Hi Des,

The service is using SMSGWNT.EXE and the zip file has nowsms.exe. Is this a new exe? What should I do? Copy nowsms.exe to NowSMS folder and restart the service?

Thanks
Vijay
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5007
Registered: 08-2008
Posted on Friday, August 22, 2014 - 06:34 pm:   

Hi Vijay,

Sorry, I should have explained.

nowsms.exe is a complete install package.

--
Des
NowSMS Support
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 8
Registered: 08-2014
Posted on Friday, August 22, 2014 - 08:20 pm:   

Hi Des,

Thank You!! I installed the new version.

Thanks
Vijay
Vijay Kalagara
New member
Username: Vkalagara

Post Number: 9
Registered: 08-2014
Posted on Saturday, August 23, 2014 - 05:18 pm:   

Hi Des,

The modem got re-initialized after detecting issue last evening. Everything worked fine after that reset. Thank you for providing the fix.

Thanks
Vijay

Here is data from debug file:
========================================
17:01:08:028 [17] ModemReceiveMessages:
ERROR

17:01:08:028 [17] ModemReceiveMessages:
ERROR

17:01:08:028 [17] ModemReceiveMessages: AT+CPMS=?
17:01:08:044 [17] ModemReceiveMessages:
+CPMS: (("SM","ME","BM","SR"),("SM","ME"),("SM","ME"))

OK

17:01:09:012 [17] ModemTest: COM1:
17:01:09:059 [17] ModemTest: AT+CMGL=0 test failed
17:01:09:059 [17] ModemTest: Failed
17:01:10:012 [17] ThreadProcessModem: IN:

17:01:11:013 [17] ModemTest: COM1:
17:01:11:059 [17] ModemTest: AT+CMGL=0 test failed
17:01:11:075 [17] ModemTest: Failed
17:01:11:075 [17] ThreadProcessModem: modem test failed
17:01:11:075 [17] ModemHardReset: Hard reset technique #1
17:01:31:013 [17] ModemHardReset: Fall back to soft reset
17:01:33:606 [9] WaitForSocketClose: WinSock reported ioctlsocket complete
17:01:44:013 [17] ThreadProcessModem: Before ModemRelease - COM1:
17:01:44:013 [17] ThreadProcessModem: After ModemRelease - COM1:
17:02:05:013 [17] ThreadProcessModem: Before ModemAllocate - COM1:
17:02:05:013 [17] ThreadProcessModem: After ModemAllocate - COM1: - OK
17:02:05:013 [17] ThreadProcessModem: Re-initializing modem: COM1: ...
17:02:06:013 [17] TestModemSpeed: Initialised modem at 115200 bps
17:02:06:060 [17] ThreadProcessModem: ATI0
17:02:06:060 [17] ThreadProcessModem:
WAVECOM MODEM

MULTIBAND G850 1900

OK
===============================================