Modem does not support SMS (even though it really does!)

Modem does not support SMS (even though it really does!) SearchSearch
Author Message
Michael Self
New member
Username: Mself

Post Number: 1
Registered: 11-2006
Posted on Saturday, November 18, 2006 - 09:57 pm:   

Bryce, et al:

I am running NOWSMS 2006.10.31 with an XTERASYS GPRS PCMCIA modem card (uses the BenQ M32 GSM module).

It appears that went the device is OPEN()ed, that the modem "wakes up" and in a few seconds will accept commands. It's as if when DTR is driven high, the modem wakes up from a sleep, syncs up to the network and then is ready to take commands. Then, after a close() and DTR is dropped, the lights on the card go dark and the modem goes nighty-night.

During the first few seconds of operation after waking up from its deep coma, however, I've noted that responses to certain AT+ commands are NOT consistent, for example, within the first 1 to 2 seconds of the card's "wake up" after the open() of the device, the "AT+FCLASS=?" command will return "ERROR" but then afterwards, it will return a sane value (e.g. 0,2.0,8).

This is my experience using a terminal program (not Hyperterm but like it). It's as if the modem is alive but not fully "aware of its surroundings" yet and it has to have a settling in period before some of the GSM commands are accepted and acted on appropriate.

Case in point - when trying to "Test and Add Modem" under the SMSC tab, it will INTERMITTENTLY say "SMS not supported" and fail to add the modem. Other times, it will add the modem ok, only to have failures when sending SMSes (as evidenced by the same error in the debug logs -- "SMS not supported").

I'm pretty sure that this issue is the SAME issue experienced in this thread:

http://support.nowsms.com/discus/messages/1/14423.h tml

but I have gotten a bit further in diagnosing the issue.

The modem truly DOES support SMS and all of the GSM AT commands. I can hand enter binary SMSes and they're accepted, etc. But NOWSMS doesn't get past a point in the code where it believes that the modem is SMS capable.

Suggestions? Perhaps an option to wait [xx] seconds after performing the open before sending AT commands?

Or, even better, an option that would NEVER close() the device. This would be useful if only nowsms is accessing the modem, which is the case in my application for sure.

Thanks,
Mike.
Michael Self
New member
Username: Mself

Post Number: 2
Registered: 11-2006
Posted on Saturday, November 18, 2006 - 10:08 pm:   

As an aside (I forgot to mention)... NOWSMS sends MMSes just FINE!! It's SMSes that are the issue. :-)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6856
Registered: 10-2002
Posted on Tuesday, November 21, 2006 - 11:33 pm:   

Hi Mike,

I wish we could avoid closing the device ... unfortunately, switching between SMS and MMS mode requires this. (Unless the modem has a multiplexing driver which allows AT command access for SMS and GPRS/EDGE data simultaneously ... but very few modems have such drivers.)

But I would like to try to find a solution to this init problem.

I don't think there would be any harm in us making a change to try several init attempts without closing the connection to the modem between attempts.

About how many seconds are you seeing that the modem requires to wake up?

In particular, it's the AT+CSMS=0 and/or AT+CSMS? commands that we are looking for an intelligent response to.

-bn
Michael Self
New member
Username: Mself

Post Number: 3
Registered: 11-2006
Posted on Wednesday, November 22, 2006 - 01:06 pm:   

Bryce:

It looks like the first 2 -3 seconds is an "unstable" period. Keep in mind that this is through trial and error observation and since I'm not sure what the criteria are for the modem finally settling down, it may be longer..??

Response to AT+CSMS=0 within 1 - 2 seconds will produce an ERROR response but then a few seconds later will say OK. So whatever change is made will have to be "tolerant" to some extent. I know this sounds weird, but perhaps a "best of three" answer in the case of a failure might be a good way to check.

IOW, (via pseudo code):

int errcounter = 0;
Query_modem();
if(response == ERROR)
{
++errcounter;
sleep(INI_FILE_WAIT_TIME);
}
Query_modem();
if(response == ERROR)
{
++errcounter;
sleep(INI_FILE_WAIT_TIME);
}
if(response == ERROR)
{
++errcounter;
sleep(INI_FILE_WAIT_TIME);
}

if(errcounter >= 3)
ObviouslyTheModemREALLYdoesntSupportSMS();

if(errcounter == 2 || errcounter == 1)
WeGotAtLeastOneSuccessfulResponse
// Thereby indicating that the modem responded favorably at least once.

Cheesy solution, I think, but because the actual criteria for determining settling period after the wakeup is unknown, perhaps a better solution than a simple delay mechanism... (my .01555)

Cheers,
Mike
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6884
Registered: 10-2002
Posted on Friday, December 15, 2006 - 07:23 pm:   

Hi Mike,

Apologies for the delay in response. I've been busy with a number of projects, and haven't had time to follow-up on all of the issues on the disucssion board. But I've managed to secure some additional help which should hopefully get response times back under control.

We're trying to figure out a solution, but it is a bit difficult without direct access to a modem that is exhibiting this type of strangeness.

Currently, if the AT+CSMS=0 and AT+CSMS? commands do not receive a satisfactory response, there is a 5 second delay before we retry them. Or at least there should be.

We do only retry once, so there may be some benefit to retrying multiple times. And there may be some benefit to a configurable delay (instead of a hard coded 5 seconds).

We can look at adding some configurable controls, but for the moment, let's see if 4 retries spaced at 5 second intervals makes a difference for you.

I've uploaded a ZIP file to http://www.nowsms.com/download/mikeself.zip. This ZIP contains 2 replacement EXE files, so please let me know if this resolves the issue with that modem.

-bn