Issue with Multimodem GPRS

Issue with Multimodem GPRS SearchSearch
Author Message
Shane Dewing
New member
Username: Shanedewing

Post Number: 19
Registered: 01-2006
Posted on Friday, November 03, 2006 - 04:17 pm:   

Bryce,

Here is the contents of the smsgw.ini file that I tried to upload:-

NOTE: I manually created the modem section in this file. When I attempt to "test" the modem from Now.SMS, it fails with the error listed above. If I wipe the smsgw.ini file clean, load Now.SMS and try to add a new modem, choose the Multimodem, I get the exact same error.

>>>>>>>>>>>>>>
[Modem - MultiTech Systems USB GSM_GPRS Wireless Modem]
PhoneNumber=3105621186
SMSAccess=GSM
ReceiveSMS=Yes
ReceiveMMS=No
Route1=3105621186
CommandPreInit1=AT+CFUN=1
[SMSGW]
Modem1=MultiTech Systems USB GSM_GPRS Wireless Modem
ReceiveSMS=Yes
ReceiveMMS=No
ReceiveSMSCharset=utf-8
ReceiveSMSCommand1=* http://usadev2.ad.nts.net/appmgr/sim.aspx?FromPhoneNumber=@@SENDER@@&Text=@@FULLSMS@@&ToPhoneNumber=@@RECIP@@ No
ReceiveSMSCharset=utf-8
AlertEMailRecip=shane@usawireless.com
AlertEMailSender=nowsms.visual@usawireless.com
AlertEMailQueueSize=20
WebAuth=No
WebMenu=Yes
WebPort=8800
Debug=Yes

<<<<<<<<<<<<<<

Regards,
Shane
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6782
Registered: 10-2002
Posted on Monday, November 06, 2006 - 07:38 pm:   

Hi Shane,

Is this a new modem? That is, were you ever able to get it added successfully?

I'm also puzzled about your problems posting files here ... but that is a side issue. On that note, could you advise what internet browser you are using, so that we can investigate?

I am puzzled by the text of the error message indicating "Modem does not support SMS--- AT+CSMS? ERROR"

If you are seeing this error, it means that we have tried multiple different commands, and they have all failed. The last command being "AT+CSMS?", returning a response of "ERROR".

But before we issued the command "AT+CSMS?", we tried the following:

AT+CSMS=0
AT+CSMS=128 (some Motorola phones use this)
AT+CFUN=1 (to wake up the modem if it is sleeping)
AT+CSMS=0 (again)
AT+CSMS=128 (again)

So by the time we get to "AT+CSMS?", which is a last ditch effort to see if there is some form of SMS support on the modem, we've already gotten an error response to quite a number of other commands.

The Multitech GPRS modem should respond "OK" to both AT+CSMS=0 and AT+CSMS? ... although AT+CSMS=128 would likely return an error (which is expected).

I'm suspicious that there is a configuration problem with the modem driver.

When you connect with HyperTerminal, you are connecting directly to the COM port.

But the NowSMS test is going through the Windows modem driver.

What if you try configuring NowSMS to connect to the COM port directly? I would expect that to work the same as HyperTerminal is working.

If it does work correctly, check the installation of the Windows modem driver and make sure it is configured to point to the correct COM port.

If you need to use a Windows modem driver with NowSMS (because of sending/receiving MMS requirements), then try manually instaling the "Standard 33600bps Modem" driver in Windows instead. Recent Multitech modem drivers seem to be having a lot of problems based upon discussions in other threads, and using the standard driver from Windows tends to resolve problems.

-bn
Shane Dewing
New member
Username: Shanedewing

Post Number: 21
Registered: 01-2006
Posted on Monday, November 06, 2006 - 07:57 pm:   

Hi Bryce,

These modems have never been used with Now.SMS before. They are new.

I am actually attaching to the "Multimodem USB GSM_GPRS Wireless Modem #x" in Hyperterminal and not directly to the COM port. If I attach directly to teh COM in Hyperterminal, I do not connect to the modem.

I tried asking Now.SMS to use the COM port instead - COM 10 or COM 11 - I get "Unable to access modem. Make sure it is powered on and passes diagnostics"

Not sure how I should change the modem driver. Do you want me to update the driver under the COM port or under the Modem in the Device Manager?

I am attaching some screen shots again. I am using Firefox 2.0

Regards,
Shane
application/x-zip-compressedscreen shots
usaw.zip (40.7 k)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6786
Registered: 10-2002
Posted on Tuesday, November 07, 2006 - 04:37 pm:   

Shane,

How do you send the AT commands when you are connecting with HyperTerminal to a Windows modem driver?

When I try, HyperTerminal always wants to dial a number.

I can only send AT commands when I connect direct to the COM port. But you might be able to teach me something about HyperTerminal.

Basically, I want to try to figure out what is different about when you are connecting to the modem driver with HyperTerminal, and when we are connecting to it in NowSMS. So I'd like to try to understand how you are connecting to it in HyperTerminal.

For the modem driver and COM port identification, go into "Phone and Modem Options" in the Windows control panel. Select "Modems", and this will tell you which virtual COM port each driver is connected to. You can add another modem driver via this dialog and manually associate the driver with any modem.

-bn
Shane Dewing
New member
Username: Shanedewing

Post Number: 22
Registered: 01-2006
Posted on Tuesday, November 07, 2006 - 05:22 pm:   

Bryce,

Launch HyperTerminal. At "Connection Description" box, choose "Cancel"

You should get a black terminal screeen with no connection.

Choose File->Properties->Connect Using-> and then choose the modem. This is where I am selecting "Multimodem USB GSM_GPRS Wireless Modem". Then choose "OK"

The terminal connects to the modem. Hit "Enter" and you should "OK" back from the modem. From there on it's a standard terminal session.

Hope that helps.

I tried substituting the modem driver as you suggested, but Windows does not allow me to install another driver for this device.

Regards,
Shane
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6802
Registered: 10-2002
Posted on Tuesday, November 07, 2006 - 10:49 pm:   

Shane,

Thanks, that is helpful with regard to HyperTerminal. I didn't know that!

It looks like one of your earlier follow-up messages mysteriously disappeared. But I'd like to confirm ... when you manually go into HyperTerminal, you get an OK response to both AT+CSMS? and AT+CSMS=0, right?

What about AT+CFUN? ... does it return +CFUN: 1 and then OK?

Assuming that all of this is in order (which I think it is, based upon what I remember you telling me before in the missing message), then I'm stumped. I don't understand why we get an ERROR response when we send the same commands ... unless there is a bizarre timing issue.

Is there any way that you could set things up to temporarily allow me remote desktop or VNC connectivity into a PC with the modem attached so that I can try some things out? Send an e-mail to nowsms@now.co.uk with a subject of "Attention: Bryce", and if that is possible, that might be the easiest way to figure out what is going on.

-bn
Shane Dewing
New member
Username: Shanedewing

Post Number: 23
Registered: 01-2006
Posted on Tuesday, November 07, 2006 - 11:10 pm:   

Hi Bryce,

Here is what I get from the modem in Hyperterminal.

>>>>>>>>>>>

OK
at+csms?
+CSMS: 0,1,1,1

OK
at+csms=0
+CSMS: 1,1,1

OK
at+cfun?
+CFUN: 1

OK

<<<<<<<<<<<<<

I am trying to get my hands on our VPN access software. If you install that you will be able to Remote Desktop into the box. I will try get that off to you shortly.

Regards,
Shane
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6816
Registered: 10-2002
Posted on Thursday, November 09, 2006 - 09:13 pm:   

Follow-up.

We did some additional follow-up with Shane directly, and were able to determine the problem.

The "Add" or "Test" GSM modem function in the NowSMS configuration program was sending an invalid command to the modem. While most modems seem to simply return an "ERROR" response, the command seems to leave the Multitech USB modem in an unstable state.

This error is corrected in the v2006.10.31 version of NowSMS 2006. The current download was changed from v2006.10.30 to v2006.10.31 to include a fix for this modem initialisation problem.

Shane, thanks a lot for your help!!!

-bn
Shane Dewing
New member
Username: Shanedewing

Post Number: 24
Registered: 01-2006
Posted on Friday, November 10, 2006 - 06:11 am:   

Thank you for your help, Bryce!!

-Shane
Shane Dewing
New member
Username: Shanedewing

Post Number: 25
Registered: 01-2006
Posted on Monday, November 20, 2006 - 06:17 pm:   

Bryce,

I am unfortunately still experiencing issues with the Multimodem.

The box is running a licensed version of Now.SMS 2006 ver 2006.10.31 (see screenshot provided)

I am basically unable to run the modems for more than a few sends and receives, before they error out.

Please see attached SMSDEBUG.BAK and SMSDEBUG.LOG files for examples of what I am experiencing.

SMSDEBUG.BAK
1. Modem initialized as [8], MultiTech Systems USB GSM_GPRS Wireless Modem #2
2. Multiple successful sends and receives
3. Then at 11:00:22:847, while processing 455E0193.req for sending, modem errors out
4. 11:00:24:284 [8] ModemReceiveMessages: +CME ERROR: 515


SMSDEBUG.LOG
1. Modem initialized as [10], MultiTech Systems USB GSM_GPRS Wireless Modem #2
2. Multiple successful sends and receives
3. Then at sequence beginning at 11:50:38:213, modem successfully resets beginning 11:50:54:417, ending
11:51:01:417
4. All OK again up to sequence ending at 12:41:28:127
5. At 13:35:56:068 [10] ReceiveModemCommand: Error - 3E3

Please advise

Kind regards,
Shane Dewing
+1-310-308-1103

application/x-zipmultimodem-errors
now.sms-usaw-errors.zip (168.0 k)
Shane Dewing
New member
Username: Shanedewing

Post Number: 26
Registered: 01-2006
Posted on Wednesday, December 27, 2006 - 08:44 pm:   

Hi Bryce or Malcolm,

Is there any chance that we can get some support on this ongoing issue please. We are a licensee of Now.SMS, still within the 1 year support window.

I have sent numerous emails, and have not received any support since Nov. 10, 2006

Please advise.

Regards,
Shane Dewing
USA Wireless
Shane Dewing
New member
Username: Shanedewing

Post Number: 27
Registered: 01-2006
Posted on Thursday, January 04, 2007 - 01:36 am:   

Still trying to get some support!!
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 72
Registered: 12-2006
Posted on Thursday, January 04, 2007 - 09:51 pm:   

Shane,

I'm going to take over this from Bryce, as he is involved in a special project at present.

Unfortunately, I'm a bit lost.

As I understand it, the problem was originally that the modem would not initialise at all.

I discussed this with Bryce, and he told me that in some recent versions of NowSMS, we were sending an AT+CFUN? command to the modem (to check the modem functionality status), but did not include a carriage return. This would cause the next command to be interpreted as part of the AT+CFUN? command. Normally, this would result in the specific command returning an error, but an internal retry of the command would be ok. In most situations, the only noticeable effect to the end user was that it took longer to "test" a modem from the user interface than it should.

But for some reason, with your modem, once this invalid command was sent to the modem, the modem could not recover.

That is what the reference to the 2006.10.30 vs. 2006.10.31 version is all about. The only change between the two versions was to add the missing carriage return to the AT+CFUN? command.

I don't believe that problem is related to any other problem that you are experiencing.

Unfortunately, it is not clear to me what the current problem is.

"CME ERROR 515" is a modem specific error code. In the Multitech documentation, they describe it as "Please wait, init or command processing in progress". An example in the manual that cites this error code seems to suggest that it is related to modem initialisation when a SIM card is first inserted into the modem.

It looks like you have more than one modem. Is it a particular modem that is having a problem?

I'm wondering if something internally is going wrong in that modem.

The "3E3" error is a mystery. It looks like we are waiting for a response from the modem, and the operating system sends us an abort.

The later "3E4" errors are timeouts waiting for a response from the modem.

It almost looks like something has gone wrong in the modem.

Since you have multiple modems, is it a specific modem that seems to be exhibiting a problem?

--
Malcolm
Now Wireless Support
Shane Dewing
New member
Username: Shanedewing

Post Number: 28
Registered: 01-2006
Posted on Thursday, January 04, 2007 - 11:39 pm:   

Hi Malcolm,

The issues are with all the Multitech modems that I have connected to the server (currently 3). The same server also has a number of Nokia devices attached that are all operating with no issues whatsoever.

The Multimodem's initialize fine after updating to ver 2006.10.31 but start throwing the errors noted above under the following conditions:-

1. Traditional race condition where the modem is busy sending an MT when an MO message is received.
2. No activity for about 30 minutes

I have had the modems running under the vendor supplied software (PhoneTools) for long periods of time, sending and receiving SMS's, where the above failure conditions are not evident. I have also had the modems running under HyperTerminal where I was unable to generate similar error conditions. So it does appear, at least to me, that it is the Now.SMS software that is causing the modems to fault. Any help you could give would be greatly appreciated.

Kind regards,
Shane
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 77
Registered: 12-2006
Posted on Monday, January 08, 2007 - 08:39 pm:   

Hi Shane,

The only thing that comes to mind ... have you tried "SMS Message Storage" set to "Direct to Modem"?

If you don't, then I think the default behaviour of the Multitech modem is to store the received SMS message on the SIM card. And then NowSMS has to poll and ask the modem to retrieve the message from the SIM card.

We've seen that iTegno USB modems (which use the Wavecom chipset, like Multitech) can get confused if they are receiving a lot of SMS messages and using the SIM card as storage for the received messages (which is obviously not very efficient). I'm wondering if something similar is happening with the Multitech USB modems.

--
Malcolm
Now Wireless Support
Shane Dewing
New member
Username: Shanedewing

Post Number: 29
Registered: 01-2006
Posted on Monday, January 08, 2007 - 09:41 pm:   

Hi Malcolm,

I definitely get a better experience with the modems when I set the message storage to "direct to modem" as you suggested. However, the modems still fail.

I have 2 modems set up, sending messages to each other. They run fine for a while, then one of the modems loses connectivity with NowSMS. Please see the attached for the debug log and the ini file.

I have installed the latest modem drivers, and the modems are very new (manufactured 10/06), so they have the latest firmware. The box is running WinXP Pro with SP2

Regards,
Shane
application/zipusaw_multimodem_issues
SMSDEBUG.zip (9.6 k)
Shane Dewing
New member
Username: Shanedewing

Post Number: 30
Registered: 01-2006
Posted on Tuesday, January 09, 2007 - 08:45 pm:   

Hi Malcolm,

I decided to try the modems on Windows 2000. I have had much better results, but the modems still fail after a period of time, and it always happens when Now.SMS tries to process an inbound and an outbound message at the same time. See below an extract from the smsdebug.log file (the full file is attached). Please look at the Modem [5] thread.

11:56:21:018 [5] ReceiveModemCommand: Processing +CMT: Message
11:56:21:018 [5] ReceiveModemCommand: +CMT: ,33
07916163838408F4040B818181239484F500007010901155032B0FF4F29C0E6A97E7F3F0B90C8ACD00

OK

11:56:21:018 [5] ReceiveModemCommand: AT+CNMA
11:56:21:018 [5] ModemReceiveMessages: 07916163838408F4040B818181239484F500007010901155032B0FF4F29C0E6A97E7F3F0B90C8ACD00
11:56:21:018 [5] ModemReceiveMessages: SMSC address len = 7
11:56:21:018 [5] ModemReceiveMessages: SMSC Address = +16363848804
11:56:21:018 [5] ModemReceiveMessages: SMS Message Type = SMS-DELIVER
11:56:21:018 [5] ModemReceiveMessages: Sender address len = 11
11:56:21:018 [5] ModemReceiveMessages: Sender Address = 18183249485
11:56:21:018 [5] ModemReceiveMessages: PID = 00
11:56:21:018 [5] ModemReceiveMessages: DCS = 00
11:56:21:018 [5] ModemReceiveMessages: Anticipated user data length = 15
11:56:21:018 [5] ModemReceiveMessages: Message = test message 13
11:56:21:018 [5] ThreadProcessModem: +CMT: ,33
07916163838408F4040B818181239484F500007010901155032B0FF4F29C0E6A97E7F3F0B90C8ACD00

OK

11:56:21:268 [5] ThreadProcessModem: Processing 45A3DB16.req...
11:56:21:956 [5] ThreadProcessModem: OUT: AT+CMGS=26

11:56:22:034 [5] ThreadProcessModem: IN:
+CME ERROR: 515


Note that at 11:56:21:018 the thread is processing a received message and then at 11:56:21:956 starts processing an outbound message. Now.SMS issues the AT+CMGS=26 command and the modem errors out with +CME ERROR:515 which means it is busy with another request (in this case the inbound)

Looking forward to your thoughts on this.

Kind regards,
Shane
application/zipusaw debug logs
usaw_debug_ini.zip (15.3 k)
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 84
Registered: 12-2006
Posted on Wednesday, January 10, 2007 - 07:28 pm:   

Shane,

I see what you mean about this looking like a "traditional race condition".

This is a bit of a wildcard, but try editing the SMSGW.INI, and in the [Modem - MultiTech Systems USB GSM_GPRS Wireless Modem] sections, add AllowPhase2Plus=No

Default behaviour for NowSMS is, that if the modem supports it, when routing SMS direct like this, we put the modem in a mode where we acknowledge each received SMS (AT+CNMA in the debug log). The modem doesn't acknowledge that the message has been received to the network until it recieves this acknowledgment from NowSMS.

If the above setting is configured, then we put the modem into a mode where the modem automatically acknowledges each received SMS over the network, without requiring the ack from NowSMS.

Having NowSMS perform the acknowledgment is safer. But I do think the modem firmware is ending up in an internal race condition of some sort, and possibly if we disable this acknowledgment, that may work-around the problem.

--
Malcolm
Shane Dewing
New member
Username: Shanedewing

Post Number: 31
Registered: 01-2006
Posted on Wednesday, January 10, 2007 - 07:53 pm:   

Hi Malcolm,

I tried that setting. No luck. See attached files. The modem on thread [4] screws up at 11:16:24:029

Any other ideas? Is there a wait state that can be put into the INI file?

Regards,
Shane
application/zipusaw debug(2) and ini
usaw_debug2_ini.zip (4.5 k)
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 98
Registered: 12-2006
Posted on Thursday, January 11, 2007 - 10:40 pm:   

Hi Shane,

In this type of scenario, I'm not sure what type of wait state would be appropriate ... i.e., what would trigger us to enter the state.

In the latest log, here's the sequence of events that I am seeing ...

OUT: AT+CGMS=...
IN: >
OUT: message data to be sent
IN: +CGMS:xxx OK

That is repeated several times.

Then we get this:

OUT: AT+CGMS=...
IN: >
OUT: message data to be sent
IN: OK

Note that the normal "+CGMS:" response is missing. (Which I don't think is technically required, but I'd have to check.)

We go to send the next message, and:

OUT: AT+CGMS=...
IN: +CME ERROR: 515

We try another message, and it is only then that we get an indication of a received message.

But at this point, it seems the modem is already stuck in this "+CME ERROR: 515" state. So I'm not sure what we could do at this point. Or if there is any way to recover the modem.

Several minutes later the modem becomes completely non-responsive.

I really think that something is wrong with the Multitech firmware. But I'm open to any ideas of work-arounds to deal with this.

I'm wondering if there is any way to force the modem into this state manually from within HyperTerminal.

Here's an idea ...

Try the commands for manually sending one of your test messages ...

AT+CSMS=0
AT+CMGF=0
AT+CMGS=25

At this point, the modem should respond with ">"

And you would be expected to send your message ... from one of the examples it would be 0001010A81183842495800000EF4F29C0E6A97E7F3F0B90CC201 then press CTRL-Z.

But what if you leave the modem in the ">" state and send it a few messages? I'm wondering if this could force it into its confused state so that more experiments could be done from within HyperTerminal to find a way to recover the modem from this state?

--
Malcolm
Now Wireless Support


Shane Dewing
New member
Username: Shanedewing

Post Number: 36
Registered: 01-2006
Posted on Monday, January 15, 2007 - 08:53 pm:   

Ok, and here is the attachment for the prior post
application/zipusaw_debug3
usaw_debug3.zip (5.2 k)
Shane Dewing
New member
Username: Shanedewing

Post Number: 38
Registered: 01-2006
Posted on Tuesday, January 16, 2007 - 12:56 am:   

Hi Malcolm,

In case it helps at all, attached are the modem buffers for the MultiTech phoneTools application that seems to have no issues with the modems. Buffer1.txt shows multiple received SMS's and buffer2.txt shows multiple SMS sends. In no case does the modem ever report the +CME ERROR : 515

Regards,
Shane
application/zipusaw_phonetools
PhoneTools_buffers.zip (5.5 k)
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 134
Registered: 12-2006
Posted on Tuesday, January 23, 2007 - 10:07 pm:   

Hi Shane,

Sorry, I was on vacation last week, and it has taken me awhile to get caught back up.

I'm not sure if it helps or not, but I can confirm that PhoneTools is using a technique that would be the equivalent of "SMS Message Storage" = "SIM Card".

In fairness, those logs don't really show it sending and receiving at the same time. And the previous logs seem to suggest that the modem enters its confused state when messages are received while it is trying to send them.

Maybe the "SMS Message Storage" = "SIM Card" setting would be more reliable. It is usually not a setting we recommend (because it tends to be slower at receiving messages, and because there is limited storage capacity on the SIM for received SMS), but for this specific case, it may be worth trying.

--
Malcolm
Now Wireless Support
Shane Dewing
New member
Username: Shanedewing

Post Number: 39
Registered: 01-2006
Posted on Tuesday, January 23, 2007 - 10:19 pm:   

Hi Malcolm,

I will try the "SIM Card" setting, but in case you missed it, the one set of Now.SMS debug logs I provided while you were away last week show the Multitech's generating the same errors on just sending SMS's or just receiving SMS's, that is no simultaneous activity.

Stay tuned for the next results!

Regards,
Shane
Shane Dewing
New member
Username: Shanedewing

Post Number: 40
Registered: 01-2006
Posted on Wednesday, January 24, 2007 - 05:31 pm:   

Hi Malcolm,

I tried your suggested setting, and the debug log is attached. I tested with only inbound messages, and you will notice that the modem still generated the 515 error, but this time Now.SMS was able to recover from the error and proceed, although in my 2 test runs, at least 1 inbound message in each test was not processed by Now.SMS

Is is possible that the 515 error is just bogus and can be ignored?

Regards,
Shane
application/zipsmsdebug_log
SMSDEBUG.zip (6.1 k)
ranny codilla
New member
Username: Cute0gre

Post Number: 1
Registered: 11-2006
Posted on Thursday, January 25, 2007 - 02:16 pm:   

Hello shane,

i encountered the same problem. At first, i used T-MOBILE sim...the gateway works fine, no problem encountered, but when i change to CINGULAR sim, the MODEM works fine for several minutes, then lost connectivity to the nowsms, . so switch back to T-MOBILE

Hope this would help u.
Shane Dewing
New member
Username: Shanedewing

Post Number: 41
Registered: 01-2006
Posted on Thursday, January 25, 2007 - 03:23 pm:   

Hi Ranny,

Thanks for the tip. I will try that. I have been using Cingular SIM's only.

Regards,
Shane