Sending SMS not working after checking to receive SMS

Sending SMS not working after checking to receive SMS SearchSearch
Author Message
Marko
New member
Username: Bubbihr

Post Number: 1
Registered: 09-2013
Posted on Saturday, September 14, 2013 - 01:49 pm:   

Hi,

I have dowloaded trial version. I have Multitech Model GPRS that is connected to COM1. I can send SMS but ONLY if I DON'T check "Receive SMS Message" in SMSC properties of modem. If I check that option then EVERY SMS I try to send is getting error. In debug file I have error 302 and 305. All received SMSs are processed ok when "Receive SMS Message" is checked.

I also try to set modem as Standard 33600 modem but its all the same.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4654
Registered: 08-2008
Posted on Monday, September 16, 2013 - 05:44 pm:   

Hi Marko,

That is very odd ...

I can't ever recall seeing an issue like this before...and I'm struggling to come up with any suggestions ... or understand what might be happening.

Doing a little searching here, I did find a reference to CMS ERROR 302 ... which looks like it may not be an actual problem. This error might be logged when polling for received messages, if an expected storage location does not exist.

By default NowSMS polls both device memory and the SIM card for new messages. If the modem does not support one of these locations, CMS ERROR 302 might be recorded in the SMSDEBUG.LOG, but it is not an actual problem. It can be avoided by setting the "SMS Message Storage" option to poll only the location that exists "Device Memory" or "SIM card". With most dedicated modem devices, "SIM card" is the best choice.

This does bring up a consideration ... is there a chance that this a Multitech CDMA modem instead of GPRS?

I'm assuming the CMS ERROR 305 is the error that is happening when NowSMS actually tries sending the message. Is it referenced in the SMSOUT-yyyymmdd.LOG? Assuming it is, then this suggests that the modem is in text mode, but NowSMS is trying to talk to it in binary PDU mode. That is very odd, because setting the modem to PDU mode is one of the first things that NowSMS does when it initializes a modem. Some other action must be causing the modem to reset ... maybe the attempt to access a memory type that the modem does not support (triggering the 302 error) is causing the modem to reset. That is the only explanation that would make sense ... but it would make more sense if perhaps the modem does have a device memory storage location on the modem, but the memory is failing.

Try changing the "SMS Message Storage" setting and lets see if it is possible to get past this error.

If not, I'd like to see an SMSDEBUG.LOG that shows me what is happening. Either upload the LOG in reply here, or send via e-mail to nowsms@nowsms.com. If you send via email, please put "Attention: Des" in the subject line of the e-mail, and post a follow-up note here to tell me to look for the email.

--
Des
NowSMS Support
Marko
New member
Username: Bubbihr

Post Number: 2
Registered: 09-2013
Posted on Monday, September 16, 2013 - 06:11 pm:   

Hi,

thank you for trying to help me. I have already try to change SMS Message Storage to every available option, but no change. Today I have install another SMS gateway to try to sent over it. I install Ozek.... (I don't to make any marketing but only to let you know what I have tried so far).

In that other SMS there is option that force modem not to use PDU mode. When I check that option SMS messages went fine but problem appears when I try to send extended characters or long message. So basically, everything was the same as with NowSMS.

The weirdest thing is that modem was working fine for a week, and then suddenly it stops sending. I tough that it was my application that I develop that will send http request to gateway, so I tried to use integrated web interface, and I got same result.

I will send smsdebug file tomorrow when I get back to work.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4655
Registered: 08-2008
Posted on Monday, September 16, 2013 - 06:59 pm:   

Hi Marko,

There is a manual configuration setting that can be applied to force NowSMS to use text mode as well. Add ModemTextMode=Yes under the [Modem - driver] section header in SMSGW.INI.

But as you say, that does have limitations.

Based upon this and your other software experience, I do think there is a failure of some sort occurring in the modem itself.

That said, there is a configuration parameter that allows you to define custom modem commands before each send attempt. Under the [Modem - driver name] section header of SMSGW.INI, add:

CommandPreSend1=AT+CMGF=0

This will cause NowSMS to send the above command (configure the modem for PDU mode) before each message sending attempt.

If the modem is getting knocked out of PDU mode for some reason, this would knock it back.

--
Des
NowSMS Support
Marko
New member
Username: Bubbihr

Post Number: 3
Registered: 09-2013
Posted on Tuesday, September 17, 2013 - 08:31 am:   

Hi,

here is smsdebug.log.

application/octet-stream
SMSDEBUG.LOG (7.8 k)


I'll try what you sudgested and let you know what happend.
Marko
New member
Username: Bubbihr

Post Number: 4
Registered: 09-2013
Posted on Tuesday, September 17, 2013 - 08:41 am:   

Hi again,

I tried what you have sudgested. What happend is that message is sent to my phone now but its get stuck in Qoutbound queue with the modem error so the end result is that message is sent every time nowsms try to send message again. It never leaves queue because of ERROR but the message is sent to my phone.

Here is smsdebug with that configuration.

application/octet-stream
SMSDEBUG.LOG (6.9 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4659
Registered: 08-2008
Posted on Tuesday, September 17, 2013 - 06:37 pm:   

Hi Marko,

I was able to locate a Multitech GPRS modem in one of our storage containers, and was able to connect it for some tests. I didn't experience any problems or see any unexpected errors in the debug log. I could see that our modem is running a different firmware version than yours because of one slight difference in responses during modem initialisation.

That difference proved to be insignificant, so I sat down with one of our engineers to do a code walk-through.

Your 1st log is quite clear ... the modem clearly thinks it is in text mode and is returning CMS ERROR 305 because we are trying to send in PDU format. The modem is always set to PDU mode during init, but the command that does so is not logged in the debug log unless there is an error response.

I was concerned that your 2nd log showed NowSMS waiting less than a second before deciding the message sending attempt had failed, and more concerning, not logging a reason for the failure.

What we found was that an unusual failure when polling for received messages was setting an error indicator that was not being reset. Technically, that's a bug that we can fix.

However, what is also interesting is the error condition while polling for received messages that is triggering the indicator. This is where the CMS ERROR 302 is being reported. We believe this error is being triggered because we are polling the modem in PDU format, but the modem is in text mode.

So while we can easily fix the bug that will allow the messages to be sent, I am concerned that you will not be able to receive.

Something is knocking the modem out of PDU mode regularly, which suggests an internal modem failure.

We're going to fix the bug, and add a configuration setting to allow the PDU mode command to be sent before polling for received messages. But I'm concerned this will be for nothing, because the modem should not be changing modes automatically. We are going to add one config setting to disable some modem tests that are periodically run to see if that makes a difference, but it is a bit of a longshot.

I should be back with an update in 24 to 48 hours.

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4662
Registered: 08-2008
Posted on Wednesday, September 18, 2013 - 09:45 pm:   

Hi Marko,

We put together a minor update to address the issue where the unexpected error while polling for received messages stops the outbound sending of messages. It can be downloaded at: http://www.nowsms.com/download/nowsms20130917.zip

There are also two new settings that may be of use. They can be added under the [Modem - driver name] section header of SMSGW.INI, where I previously had you add this setting:

CommandPreSend1=AT+CMGF=0

The new settings are:

CommandPrePoll1=AT+CMGF=0
FullModemTest=No

CommandPrePoll1 adds a modem command to be sent before polling for received messages ... where again we are telling the modem to go into PDU mode.

FullModemTest=No disables some tests we periodically run to see if the modem is OK. I am concerned that the modem apparently keeps switching from PDU mode back to text mode unexpectedly. While that is likely due to some sort of hardware failure ... we have an idea that maybe that failure is being triggered by something in the modem test. It's a long shot, but since we were making other changes to address this issue, it seemed to be a worthwhile option to try.

--
Des
NowSMS Support
Marko
New member
Username: Bubbihr

Post Number: 5
Registered: 09-2013
Posted on Friday, September 20, 2013 - 10:54 am:   

Hi,

I have install this update and now:

1. Message was sent but after 10-15 sec.

2. None of messages are received (before, the messages were recived). I try Default, and SIM card option

3. If I try to enter SMS longer then 1 SMS (for example 200 characters) then SMS is sending "2 mesages". I is sent normaly and end in "SMS Sent" and second is not sended (ERROR in modem) and stay in queue but the SMS was actually sent to mobile (I received all 200 chars). After second try that "second part", SMS also go to SMS Sent

4. Sending SMS takes "forever". When I need to send 30 messages it usually take 6 SMS per min but now it like there is some pause between every sending.

So at this point I cannot receive SMS and sending takes a long time.
Marko
New member
Username: Bubbihr

Post Number: 6
Registered: 09-2013
Posted on Friday, September 20, 2013 - 10:57 am:   

As I don't have another GSM modem, and I want to try to see if its hardware failure, please can you give me some advice for "OK" GSM/GPRS modem that is also affordable (cheaper). I'm connect modem to PC via serial or USB port.
Marko
New member
Username: Bubbihr

Post Number: 7
Registered: 09-2013
Posted on Friday, September 20, 2013 - 11:30 am:   

It seems that SMS are comming but really slowly. (Modem was off for 3 days and SMS storage is probably full so it would take some time to get them oall from provider.

But as for SMS sending. I try to send 2 long SMS to my phone and the process was like I explain in previus post. I measure time and it takes 7 minutes to deliver those 2 SMS messages.

Here is smsdebug (I have removed text and numbers).

application/octet-stream
SMSDEBUG.LOG (56.7 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4665
Registered: 08-2008
Posted on Saturday, September 21, 2013 - 06:02 pm:   

Hi Marko,


The modem seems to be behaving strangely when we are polling for received messages. I suspect the modem firmware is crashing and the modem is rebooting. And I believe this is triggering the delays.

You could add DebugModemPoll=Yes to the [SMSGW] section of SMSGW.INI, and this would log more information about all of the commands sent while polling. But I suspect there is some sort of internal hardware failure that is causing the firmware to crash.

For an alternative cheap modem, look for an Option ICON 322 or 225 ... or Huawei E16x series. There are a lot of USB stick modems that will work ... I'm just more familiar with the quirks of those models.

--
Des
NowSMS Support
Marko
New member
Username: Bubbihr

Post Number: 8
Registered: 09-2013
Posted on Monday, October 07, 2013 - 09:07 am:   

I have sent you email 3 days ago. Can you please check it. Its about suggestion for modem.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4675
Registered: 08-2008
Posted on Monday, October 07, 2013 - 07:54 pm:   

Hi,

Apologies for the delay in response, but I did include some suggestions in the earlier reply on this thread. (Option ICON 322 or 225 ... or Huawei E16x series)

Manufacturer and model availability tend to vary by country, so it usually works best if you can check with local retailers and web sites to see what models are available at the best prices. Then provide detail on what you find and we can advise of past experience (positive or negative).

Generally speaking, I'd recommend UNlocked modems where possible (if you purchase a locked modem with a SIM plan, carriers think you are using it for internet access and sometimes do not provide a way to activate MMS ... SMS is generally OK).

Avoid modems with built-in WiFi hot spots as they are designed more for internet sharing.

--
Des
NowSMS Support