2-way SMS Questions and Problems

2-way SMS Questions and Problems SearchSearch
Author Message
Yaswanth N
New member
Username: Yaswanth

Post Number: 1
Registered: 03-2006
Posted on Wednesday, March 15, 2006 - 08:10 pm:   

Hi!

I have few questions regarding NowSMS:

1) I am unable to process the 2-way SMS. The HTTP request is being sent, but I am not getting anything SMS or other fields. The HTTP command is as follows
http://192.168.36.100/smscommands.php?sender=@@SENDER@@&fullsms=@@FULLSMS@@&recipient=@@RECIP@@

The HTTPD log shows something like this:
192.168.36.12 - - [15/Mar/2006:14:32:38 -0800] "GET /mycommands.php?sender=&fullsms=&recipient=9294567211 HTTP/1.1" 200 22 "-" "Now SMS/MMS Gateway v5.51 (b20040823)"

Though this is the case, the PHP returns some or the other text but thats not being sent to the sender.

2) How do I view the log files of what SMS has been set to which number and when. Does NOWSMS Store the data somewhere.

For reference:
1) I am able to send message to a number through the web interface, thats working perfectly fine.

2) My Settings are as follows:
Phone: Samsung SGH-500 (Sigmatel IRDA, recognises as standard modem over IRDA)
GSM Modem Properties:
Phone Number: 9294567211 (Thats the number given to my modem)
SMS Access: Default
Recieve SMS Messages (Checked)
SMS Message Storage: Direct to Modem

Routing:
Support any outbout message traffic (Checked)
Preferred SMSC connection for: *
(I dont have any other modems or connections)

2-Way SMS Support Settings:
Processe Recieved SMS Messages (Checked)
SMS Command Prefix: *
Recieve Phone Number(s):
<blank>
Command to Execute: http://192.168.36.100/smscommands.php?sender=@@SENDER@@&fullsms=@@FULLSMS@@&recipient=@@RECIP@@
Command returns response text (Checked)

SMS Command Prefix: ST
Command to Execute: c:\windows\system32\cmd.exe /c echo Echo @@SMS@@
Command returns response text (Checked)

In both the cases I am not getting reply messages.

Please let me know if I am doing anything wrong.

Regards,
Yaswanth
Yaswanth N
New member
Username: Yaswanth

Post Number: 2
Registered: 03-2006
Posted on Wednesday, March 15, 2006 - 08:21 pm:   

Hi! This is my smsgw.ini

[SMSGW]
WebAuth=Yes
WebMenu=Yes
WebPort=8800
ReceiveSMS=Yes
ReceiveMMS=No
ReceiveSMSCommand1=* http://192.168.36.100/smscommands.php?sender=@@SENDER@@&fullsms=@@FULLSMS@@&recipient=@@RECIP@@ Yes
AdminUser=Yaswanth
AdminPassword=LUIQPKBVNQOXCC
Debug=Yes
Modem1=Standard Modem over IR link #2
ReceiveSMSCommand2=ST c:\windows\system32\cmd.exe /c echo Echo @@SMS@@ Yes
[Modem - Standard Modem over IR link #2]
ReceiveSMS=Yes
ReceiveMMS=No
ReceiveTo=Direct
Route1=*
PhoneNumber=9294567211

Hope this will help you guys solve my probs fast :-)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 5651
Registered: 10-2002
Posted on Wednesday, March 15, 2006 - 11:27 pm:   

Hi Yaswanth,

It certainly looks like you have configured everything correctly.

Could you enable the SMSDEBUG.LOG? (Easiest way to do this is via the checkbox option on the "Serial #" page.) I'd like to see an SMS message being received and routed to the 2-way command in this log file.

My suspicion is that there is something unusual about the format of the SMS message coming in via that phone. But we should be able to get a clear picture from the SMSDEBUG.LOG.

-bn
Yaswanth N
New member
Username: Yaswanth

Post Number: 3
Registered: 03-2006
Posted on Monday, March 20, 2006 - 10:35 pm:   

Hi Bryce,

This is my SMSDEBUG.LOG. It says that the server is sending data in text/html format (I will correct it). But what I am not able to get is, the arguments @@SMS@@ and @@FULLSMS@@ are not being sent to the server properly. Previously atleast @@RECIP@@ was being sent properly, now even that is not being sent. Waiting for your reply.

----------- SMSDEBUG.LOG -----------------------

03:49:47:189 [4] ModemReceiveMessages: 91198954800710040C9119899421691500006030123025724015D4F29C0E6A97E7F3F0B90C0ACF41 F2329C9D070000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000
03:49:47:189 [4] ModemReceiveMessages: SMSC address len = 145
03:49:47:189 [4] ModemReceiveMessages: SMSC Address = 984508700140C019919849129651000006032103522704514D2C9E0A6797E309BC0A0FC14223C9D9 70000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000
03:49:47:189 [4] ModemReceiveMessages: SMS Message Type = SMS-DELIVER
03:49:47:189 [4] ModemReceiveMessages: Sender address len = 0
03:49:47:189 [4] ModemReceiveMessages: Sender Address =
03:49:47:189 [4] ModemReceiveMessages: PID = 00
03:49:47:189 [4] ModemReceiveMessages: DCS = 00
03:49:47:189 [4] ModemReceiveMessages: Anticipated user data length = 0
03:49:47:189 [4] ModemReceiveMessages: Message =
03:49:47:970 [3] ThreadProcessInboundSMS: Processing 441F2A55.in...
03:49:47:970 [3] GetProgramToExecute: http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:49:47:970 [3] ThreadProcessInboundSMS: Executing http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:49:47:970 [3] RetrieveURL: Retrieving http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:49:48:270 [3] RetrieveURL: Retrieving mycommands.php?sender=&fullsms=&recipient=
03:49:48:270 [3] RetrieveURL: GET /mycommands.php?sender=&fullsms=&recipient= HTTP/1.1
User-Agent: Now SMS/MMS Gateway v5.51 (b20040823)
Accept: */*
Connection: Close
Host: 192.168.36.100


03:49:48:571 [3] HttpResponseWait: Ok
03:49:48:571 [3] RetrieveURL: got success response
03:49:48:571 [3] RetrieveURL: text/html; charset=UTF-8
03:49:48:571 [3] ThreadProcessInboundSMS: Command not completed. Request returned invalid content type: text/html; charset=UTF-8
03:52:30:233 [4] ModemReceiveMessages: 91198954800710040C911989942169150000603012305511400F532A68FA6E9741EDF27C1E3E9701 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000
03:52:30:233 [4] ModemReceiveMessages: SMSC address len = 145
03:52:30:233 [4] ModemReceiveMessages: SMSC Address = 984508700140C019919756489245000006032103551104F035A286AE67914DE2C7E1E37910000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000
03:52:30:233 [4] ModemReceiveMessages: SMS Message Type = SMS-DELIVER
03:52:30:233 [4] ModemReceiveMessages: Sender address len = 0
03:52:30:233 [4] ModemReceiveMessages: Sender Address =
03:52:30:233 [4] ModemReceiveMessages: PID = 00
03:52:30:233 [4] ModemReceiveMessages: DCS = 00
03:52:30:233 [4] ModemReceiveMessages: Anticipated user data length = 0
03:52:30:233 [4] ModemReceiveMessages: Message =
03:52:30:664 [3] ThreadProcessInboundSMS: Processing 441F2A57.in...
03:52:30:664 [3] GetProgramToExecute: http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:52:30:664 [3] ThreadProcessInboundSMS: Executing http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:52:30:664 [3] RetrieveURL: Retrieving http://192.168.36.100/mycommands.php?sender=&fullsms=&recipient=
03:52:30:954 [3] RetrieveURL: Retrieving mycommands.php?sender=&fullsms=&recipient=
03:52:30:954 [3] RetrieveURL: GET /mycommands.php?sender=&fullsms=&recipient= HTTP/1.1
User-Agent: Now SMS/MMS Gateway v5.51 (b20040823)
Accept: */*
Connection: Close
Host: 192.168.36.100


03:52:31:255 [3] HttpResponseWait: Ok
03:52:31:255 [3] RetrieveURL: got success response
03:52:31:255 [3] RetrieveURL: text/html; charset=UTF-8
03:52:31:255 [3] ThreadProcessInboundSMS: Command not completed. Request returned invalid content type: text/html; charset=UTF-8

----------- SMSDEBUG.LOG -----------------------

Yaswanth
Yaswanth N
New member
Username: Yaswanth

Post Number: 4
Registered: 03-2006
Posted on Tuesday, March 21, 2006 - 12:09 am:   

Just converted the above binary (PDU) data to Text and I understand that the Text and Sender data is coming NULL. I have no clue of why this is happening. I am using Samsung SGH 500 as my GSM modem. Any idea why I am not getting the text properly? Is it a problem with the service provider or is it the problem with the phone??

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

Post Number: 5683
Registered: 10-2002
Posted on Tuesday, March 21, 2006 - 05:23 pm:   

Hi Yaswanth,

I would suspect a problem with the phone. That's why I wanted to get a look at the raw PDU that is coming in.

We have encountered a few phones that make slight encoding errors that we try to work around.

In this particular case, it looks like the modem is not including the SMSC address correctly. It should have a length field present.

Based upon my tests, if 07 were present as the first byte, indicating the length of the SMSC address, then everything would be ok. (Well, except that all of the 00 null characters might cause some confusion.)

But I don't see any easy way of programmatically detecting this problem and correcting for it in a generic way.

So, I'd have to recommend a different phone.

Although you might be able to make some progress by forcing NowSMS to use the modem in a text mode only ... as the modem might just have a bug in its PDU mode implementation.

To force NowSMS to use the modem in text mode, edit SMSGW.INI, and under the [Modem - driver name] section, add ModemTextMode=Yes. Then restart the service.

You won't be able to send/receive any binary message types, but you might be able to send/receive text messages.

-bn

Yaswanth N
New member
Username: Yaswanth

Post Number: 6
Registered: 03-2006
Posted on Thursday, March 23, 2006 - 01:55 am:   

That was great, I too just figured out the problem! Struggled a lot though. Its working great now. Thank you for the reply anyways. Text SMS is fine for my application. Expect a WireTransfer from me soon ;)