Modem Failure -- Unable to access modem...

Modem Failure -- Unable to access modem... SearchSearch
Author Message
Stephane HALTER
New member
Username: Styx29

Post Number: 4
Registered: 08-2010
Posted on Wednesday, August 25, 2010 - 01:56 am:   

We have this error occurring several times a day in our system which has 3 Samba 75 modems and 3 Icon 322 modems connected.

The only way to get rid of this is either to physically disconnect and reconnect the failing modem or to reboot the machine.

Could you have a look at the attached NowSMS debug log and tell us if there's anything that can be done at NowSMS app level?

Thanks,
Stephane

In this log, modem named "Siemens AG WM USB Modem 1-415-509-1903 #2" has this problem.

application/octet-streamNowSMS debug log
SMSDEBUG.zip (5.5 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2459
Registered: 08-2008
Posted on Wednesday, August 25, 2010 - 09:02 pm:   

Hi Stephane,

If stopping and restarting the NowSMS service doesn't wake up the modem, then it is unlikely that anything can be done from a software perspective to wake up the modem.

We have experimented with some techniques to simulate USB removal and re-insertion ... which is extremely difficult, because when this happens the underlying problem is not necessarily in any software or driver on the PC side, but rather a lockup/crash in the embedded software (firmware) that is running in the modem itself.

In most cases, the best hope for resolving the issue is figuring out what is causing the modem to crash.

I don't notice anything peculiar in your log (the modem seems to be responding properly the whole time).

But in past situations, there have been things that we did notice.

A very unusual case was one installation where the modem would crash if the user tried to send a message longer than so many characters. We had the user connect to the modem using HyperTerminal and issue the same commands that NowSMS issued to send one of these problem messages, and there was no crash.

We were so intrigued by this problem that after making sure all of the modem drivers were up to date, we acquired one of these modems, and experienced the exact same problem.

In the end, we found that NowSMS was talking to the modem too fast. A buffer was overflowing and rather than telling NowSMS to slow down, the modem driver software would crash.

This led to a configuration setting. Try editing SMSGW.INI and under the [SMSGW] header, add ModemMaxBytesPerSend=1

This will change the buffering logic used for communicating with all modems. However, you are unlikely to perceive any performance difference.

The default setting for this parameter already addresses the buffering problem that we saw with that one particular modem. So it is somewhat unlikely that this will make a difference for you ... but I recommend this first because it is an easy change.

In other situations, what we have observed is modems that have a tendency to crash when a certain sequence of events happen.

One of the most common problem areas is receiving a message while trying to send one out.

There is nothing that NowSMS can do to tell the modem to hold off receiving messages when it is trying to send a message. NowSMS gives the modem a command to send a message, and what we have noticed is that some modems are more prone to crash if a new message is received before the modem finishes sending the message. The crash usually does not happen immediately, but a minute or several minutes before the modem eventually crashes.

We've done a lot of work to try to investigate these types of problems.

And what we've found is that different modems (and different versions of modem firmware) have different issues.

Changing the "SMS Message Storage" setting can improve reliability.

I can see from the log file that this modem does not support the "Direct to Modem" setting.

It is either using the "Default" or "SIM Card" setting. Try changing this to "Device Memory" to see if this makes any difference. I do recall one modem where this improved reliability.

Another thing that I would recommend trying is this...

Edit SMSGW.INI and under the [Modem - Siemens AG WM USB Modem 1-415-509-1903 #2] header, add the following:

CommandPostInit1=AT+CNMI=2,0

This command will tell the modem not to notify NowSMS when a new message is received. If the crash problem is related to a new message being received while the modem is attempting to send a message, this might help stop the modem from crashing, as the crash might be related to a bug in the modem firmware attempting to push this notification while trying to send a message.

So those are a few ideas worth trying. There's also the possibility of a defect in the modem or USB port.

Do leave SMSDEBUG.LOG enabled, and try to catch logs from the time period right before a modem crash, if the problem persists. Those logs might point to a pattern of activity that occurs before a crash that could provide a clue.

--
Des
NowSMS Support
Stephane HALTER
New member
Username: Styx29

Post Number: 5
Registered: 08-2010
Posted on Thursday, August 26, 2010 - 02:20 am:   

Thanks for the reply. I have 2 questions:
1) Which model of USB GSM modem would you recommend to avoid these problems?
2) By adding "CommandPostInit1=AT+CNMI=2,0", would NowSMS still be able to handle incoming texts? If yes, would the notification of incoming text be delayed with this option set?

Thanks,
Stephane
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2464
Registered: 08-2008
Posted on Thursday, August 26, 2010 - 08:36 pm:   

Hi Stephane,

I think you're using good modems, but for some reason when you have a lot of USB devices, it seems to increase the chance of these problems occurring.

AT+CNMI=2,0 won't cause any problems. By default, NowSMS polls the modem for new received messages once a second, so the notification is not critical.

--
Des
NowSMS Support