• Post Reply Bookmark Topic Watch Topic
  • New Topic

Response Ok, but message not delivered. (SMS)  RSS feed

 
Murty Navuduri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am sending sms messages successfully from HyperTerminal, but when i run my application, am getting Response 'OK', but message is not delivered.

i am using NetBeans IDE 5.5 and Comm Api 2.0. here is the part of the code. what could be the problem,

char ctrlZ = (char)26;
String message = "Hello" + ctrlZ;

output.write("AT+CMGF=1\r\n".getBytes());
output.write("AT+CSMP=17,167,0,0\r\n".getBytes());
output.write("AT+CMGS=\"+91mynumber\"\r\n".getBytes());
output.write(message.getBytes());



OUTPUT
------

AT+CMGF=1

OK
AT+CSMP=17,167,0,0
AT+CMGS="+91mynumber"
Hello
OK


Any Suggestions or Solutions.

Thanks in advance.

Murty.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried setting the encoding as UTF-8 rather than accepting the default?
 
Murty Navuduri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello David,
I tried setting

output.write("AT+CSCS=\"8859-1\"\r".getBytes());

no use.

Murty.
 
Murty Navuduri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running this class in a Servlet, NetBeans Uses Tomcat, do i need to set any configurations.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!