Sms 2-way problem

Sms 2-way problem SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through July 14, 2004 » Sms 2-way problem « Previous || Next »
Author Message
Jim williams
Unregistered guest
Posted on Thursday, May 06, 2004 - 02:32 pm:   

Hi,

I have a problem with the 2-way sms servive in that it will not open up a application when I want it to??

In the command prefex i have -> enter
in the command to execute I have -> "C:\Program Files\Microsoft Office\Office\winword.exe" @@SENDER@@

I am connected to the computer using a USB cable and a sony ericsson T610 phone.

The now sms program seams to be working because I get the following in the IN-SMS file:

[SMS-IN]
ModemName=COM4:
Sender=353861012736
Data=Enter
Binary=0

The now sms program dose not send back an sms to the sender either? also when I recieve an sms now it goes directly to the IN-SMS file and it dose not go to the inbox on my phone, is this normal??

The thing is that I need to retreve information from a database and send that info back to the sender??Any ideas on how to do this?

Thanks for your time,
Jim.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2512
Registered: 10-2002
Posted on Thursday, May 06, 2004 - 04:37 pm:   

Hi Jim,

Why do you want to pass the sender address associated with a received message to Microsoft Word?

NowSMS runs as a service, and does not interact with the PC desktop. So any commands that you execute in a 2-way script are executed in the background on the PC in the context of the service ... they cannot trigger an application to open on the desktop.

If you're looking for a simple example, try the ECHO example in our documentation:

http://www.nowsms.com/documentation/ProductDocumentation/2_way_sms_support.htm

There's also a simple example of a Windows script being used in a 2-way command at the following link:

http://support.nowsms.com/discus/messages/1/333.html

There is a good simple PHP example here:

http://support.nowsms.com/discus/messages/1/3991.html

Basically, the file is sitting in the SMS-IN subdirectory because NowSMS cannot properly launch the program that you have configured in the 2-way command.


quote:

The now sms program dose not send back an sms to the sender either?




The command that you have configured needs to send a response back. It all goes back to the idea that you are trying to launch Microsoft Word to process the received message, and I just don't understand what that would accomplish. The "ECHO" example in the documentation is a much better starting point.


quote:

also when I recieve an sms now it goes directly to the IN-SMS file and it dose not go to the inbox on my phone, is this normal??




Yes, that is normal. If the message stayed in the phone's inbox, eventually the phone would run out of space to store all of the received messages.


quote:

The thing is that I need to retreve information from a database and send that info back to the sender??Any ideas on how to do this?




It depends on your type of database. If you can interface with the database using either PHP or Windows scripting, then the above examples could provide a good starting point.

-bn
Jim williams
Unregistered guest
Posted on Monday, May 10, 2004 - 08:56 am:   

Hi Bryce thanks a million for your help, but i'm afraid I have another question for you, when I use the 2way.php script at:


http://support.nowsms.com/discus/messages/1/3991.html

I get the following error??

[SMS-IN]
ModemName=COM3:
Sender=+353863111135
Data=Command not completed. Request returned invalid content type: text/html
Binary=0

Any Idea on how to fix this?

Thanks for your time,
Jim.
jim williams
Unregistered guest
Posted on Tuesday, May 11, 2004 - 04:16 pm:   

Hi again,

I changed the smsgw file and put in the debug = yes and I got the following debug file:
text/plainDebug file
Debug.txt (4.1 k)


Dose anyone no what I am doing wrong?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2561
Registered: 10-2002
Posted on Wednesday, May 12, 2004 - 02:56 pm:   

Jim,

Before I answer your questions, I just wanted to post a link to some general 2-way SMS troubleshooting tips for others that are reading this thread:

http://support.nowsms.com/discus/messages/1/4179.html
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2563
Registered: 10-2002
Posted on Wednesday, May 12, 2004 - 03:11 pm:   

Jim,

Sorry about that. Some information got truncated from the PHP script when I uploaded it. Actually, it must have been a cut & paste error on my part.

The first line of the PHP script needs to be:

header ("Content-Type: text/plain");

I've updated the previous thread to fix this problem in the example:

http://support.nowsms.com/discus/messages/1/3991.html
jim williams
Unregistered guest
Posted on Wednesday, May 12, 2004 - 04:55 pm:   

Hi Bryce,
Thanks a million for your help!!Sorry to keep at you but the deadline's getting near!!

There's another problem now I seam to be getting "error - modem response"

DEBUG FILE:

2002-04-12 08:43:17,3CB68FD2.req,Auto-response to +353876797898,+353876797898,Retry Pending - ERROR - Modem Response (1): ERROR -- COM3:

AND

SMSOUT File

2002-04-12 15:27:06,System,,COM4:,Modem Failure -- Unable to access modem, ensure that it is powered on and passes diagnostic tests.

I am using the Sony Ericsson T610 as modem and a usb data cable do you no if this supports receiving SMS messages?

Thanks for your time,
Jim.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2579
Registered: 10-2002
Posted on Wednesday, May 12, 2004 - 06:03 pm:   

Jim,

Are you able to send any messages at all, or is it only affecting 2-way sending?

It seems that you're receiving messages fine, but I'm wondering if you are having a problem with all message sending.

Could you post a comlete SMSDEBUG.LOG with a sending attempt? (Stop the servce, then restart it and send a message, I'd like to see the initialisation commands in the SMSDEBUG.LOG as well as the send attempt.)

I see the error in one of your log files above ... and it looks like the modem is rejecting the AT+CGMS command with an immediate error. So I'm confused, that's why I'd like to see a more complete log.

-bn
jim williams
Unregistered guest
Posted on Wednesday, May 12, 2004 - 06:22 pm:   

Hi again,

Thanks for your help I realy appricate it,
Here is the debug file:

application/octet-streamdebug
SMSDEBUG.LOG (24.3 k)


the sms in says:

2002-04-12 08:42:09,+353876797898,Text,Hello
2002-04-12 09:57:07,+353861012736,Text,James
2002-04-12 10:32:27,+353863111135,Text,James
2002-04-12 15:38:05,+353876797898,Text,hello
2002-04-12 17:08:24,+353876797898,Text,hello

and the sms out file is:

application/octet-streamSMS OUT file
SMSOUT-20020412.LOG (10.3 k)


If you need any more information give me a shout.
Thanks,
Jim
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2586
Registered: 10-2002
Posted on Wednesday, May 12, 2004 - 08:57 pm:   

Jim,

Try sending an SMS message after restarting the service.

I didn't see any send attempts in the SMSDEBUG.LOG, so it's hard to say what is going on.

Obviously, something is wrong though ...

Can you try installing a modem driver for the COM port, and let's see if it works any better going through a modem driver instead of direct to the COM port.

In the Windows Control Panel, just add the Standard 9600 bps Modem driver. Then in NowSMS, configure it to use that modem driver instead of COM3 or COM4.

-bn
james judge
New member
Username: Jjudge

Post Number: 2
Registered: 05-2004
Posted on Thursday, May 13, 2004 - 09:50 am:   

Hi Bryce,

I tryed the standard modem driver and I got the following debug files the first one is for the following command to execute: c:\winnt\system32\cmd.exe /c echo Echo @@FULLSMS@@

text/plainDebug 1
SMSDEBUG1.txt (2.3 k)


The second one is for the php file,
command to excute: http://localhost/2way.php?sender=@@SENDER@@&text=@@FULLSMS@@

text/plaindebug 2
SMSDEBUG3.txt (3.1 k)


I keep getting this errer in the sms out file,

2002-04-13 08:29:44,3CB7D5B4.req,127.0.0.1,0863111135,Retry Pending - ERROR - Modem Response (1): ERROR -- Standard 9600 bps Modem
2002-04-13 08:33:08,3CB7D6BA.req,Auto-response to +353863111135,+353863111135,Retry Pending - ERROR - Modem Response (1): ERROR -- Standard 9600 bps Modem

The thing is that when I got the software first it was echoing an sms back to the sender but now it is not??Is there any settings on the phone I would have to change i.e. conectivity GPRS or GSM?

Thanks again for your help,
Jim.
jim williams
Unregistered guest
Posted on Thursday, May 13, 2004 - 11:35 am:   

.
Alex
Unregistered guest
Posted on Thursday, May 13, 2004 - 12:06 pm:   

Hi Bryce,

Is there any way to define prefix "*" with excludes? Let's say, I want to process all messages exclude message with prefix "abc".

Thanks,
Alex.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2601
Registered: 10-2002
Posted on Friday, May 14, 2004 - 04:03 am:   

Jim,

I wish I knew the answer to this one.

I don't think the problem is anyway related to the process of 2-way messages. For some reason, your modem is not letting any outbound messages be sent.

The strange thing is that the phone reports an error before we even give it the data to be sent out. It rejects the request at a preliminary stage. (Changing the SMS connectivity from GSM to GPRS or vice versa would only affect things at the next stage.)

I've searched through past support incidents, and I can't find anything similar. This is the type of response that would be expected if the modem did not support SMS. Yet, it is responding to other SMS related requests just fine.

I'd try removing the battery from the phone, then put the battery back in ... give it a hard reset.

If things still aren't working, then shut down NowSMS, and go into HyperTerminal.

Type ATZ and press Enter ... you should get an OK response back, indicating that you are talking to the modem.

Enter the following commands (press Enter after each, OK should be part of the response that you get back):

AT+CSMS=0
AT+CMGF=0


Next, enter the following command:

AT+CMGS=18

The phone should respond back with:

>

Enter:

0001000C91538336111153000005E8329BFD06

then press CTRL-Z

This should send a message to +353863111135 (one of the numbers in your log).

In your logs, the phone is responding back with "ERROR" in response to the AT+CMGS= command.

If the test in HyperTerminal works, then I'll really be puzzled.

Can you confirm that in NowSMS you are not able to send any messages at all? (I'm just want to confirm that 2-way is not related to the problems at all.)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2602
Registered: 10-2002
Posted on Friday, May 14, 2004 - 04:04 am:   


quote:

Is there any way to define prefix "*" with excludes? Let's say, I want to process all messages exclude message with prefix "abc".




Alex,

If you define another command that processes prefix "abc" ... then "*" will pick up any prefixes that are not otherwise defined.

-bn
jim williams
Unregistered guest
Posted on Friday, May 14, 2004 - 06:11 pm:   

Hi Bryce,

Yesterday I installed NOW SMS on a different computer and it started working for the simple echo problem that is in the example.

I then tried to execute the php command:

http://localhost/2way.php?sender=@@SENDER@@&text=@@FULLSMS@@

This command did not work and I did not get anything back to the sender??

Here is the debug file for this:
application/octet-streamdebug
SMSDEBUG.LOG (4.5 k)


Here is the sms out file:
application/octet-streamsms out
SMSOUT-20040513.LOG (19.3 k)


When I got your reply I tested it in the Hiper Terminal and it worked it send hello to the phone number!!

So I now do not know what is going on maybe it has something to do with the php script??
The script is the same as the one in a previous post which takes in a sender. What exactly should this script do should it send back a response to the user??

Thanks for your time,
Jim.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2615
Registered: 10-2002
Posted on Monday, May 17, 2004 - 02:17 pm:   

Jim,

I suspect the PHP script is not working, because "command returns response text" needs to be checked for a script that returns the reply in the content of the response.

"Command returns response text" should not be checked for commands that use the redirect technique.

I'm still puzzled that moving the phone to another PC resolved the sending problem.

In the debug logs, what I was seeing was that when sending the AT+CMGS command, the response back was always "ERROR". The modem was not returning the ">" prompt which is a type of continuation response. That problem is going to continue to puzzle me ...

-bn
jim williams
Unregistered guest
Posted on Friday, May 21, 2004 - 06:22 pm:   

Hi again,

Sorry but I have another problem, I have wrote a php script which takes in the first word of the sms message and querys my sql database for a balance that corresponds to the name entered in the text.

Here is the php script:
text/plainsms.php
sms.php (0.6 k)


The problem is that it seams to be going in and querying the database but when it gets the response it is numbers like 321.00 and I think it has a problem with the type like float?I'm not explaining it very well so i'll include the debug file:

application/octet-streamdebug
SMSDEBUG.LOG (5.0 k)


I do not no what the problen I you could help me in any way i'd realy apreciate it!!
Thanks for your time,
Jim.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2647
Registered: 10-2002
Posted on Tuesday, May 25, 2004 - 03:42 pm:   

Hi Jim,

In the debug log it looks like the response is not returning any value.

Unfortunately, I'm not an expert on PHP and database queries.

I would suggest that you try to do some testing of the script outside of NowSMS ... just run the PHP script by connecting to the server directly from a web browser, so that you can confirm that you're getting the correct response back. Then you can start making the requests via SMS.

-bn

Login Login / Register Logout Logout Search Last 30 Days Topics Topics