SMS sent from j2me not recieved by non-java phones like android and gsm modem - java-me

I need to send a pattern like "username,password,0,1,1,1,0,1,0" using sms from j2me app to a gsm modem that is not in my control. It is used to reserve foods.
If anyone send a sms to provided number of the gsm modem using any mobile phone normally (like how you send sms to anyone), it will reply an answer.
My problem is sms sent from my j2me app is received by any java phone, but the gsm modem doesn't get it (as I didn't receive the reply and the food is not reserved). Same as gsm modem android phones don't receive my sms.
I used the typical j2me libraries to send sms. I tried TextMessage, no luck. Then I tried BinaryMessage, it didn't received by gsm modem but android received it!
Another thing is that I couldn't find any complete source, documentation or examples about sms pdu. Is the binary payLoad all the full sms format sent using BinaryMessage?
At the end I would now is it possible to send normal text sms using BinaryMessage? Any examples?
Thanks in advance.
Regards, Ali.

You should try to send sms by AT commands, compose message and send it sending by commands: (AT+CMGS, AT+CMSS)
Here is tutorial for it
At the bottom you have full list of topics about AT commands and SMS sending.
For using AT commands tutorial for AT commands in java me

Related

How to send APDU's via SMS to a java card applet?

I want to perform RMI , to an applet via SMS. My applet will process an APDU sent via the SMS and it will call a method depending on the APDU. I cannot find a method to achieve this.As per my reserch this depends on the card manufacturer and is not supported by all OS's. Is there any framework or technique which can help us to achieve the required result ?
#Abhirup Ghosh: This is possible, search for NowSMS and Open Kannel.
Using these tools and GSM Modem, i have created utility that sends SMS to JAVACARD applet which processes the sms and gets the APDU in it.
You have to change your SMS Class and TYPE so that the OS of card treat it as envelope and pass it to the JAVACARD application.
You can also refer this paper:
http://www.ijsrp.org/research-paper-0415/ijsrp-p4024.pdf

Restcomm handle messages from sip phone

we are going to configure our restcomm instance to handle sms messages.
But we would like to test this functionality with sip chat messages during development
is it possible to send message from sip phone to the specific to the registered sip number?
do we have another way "to send" sms to sip number w/o real sms sending?
maybe some resp api can help us with this.
Thanks,
You can use Linphone or other SIP client to send/receive SMS from/to RestComm.
To send SMS from RestComm:
design SMS application in RVD and assign sms enabled DID to it
in your SMS application, in "To" section, enter the SIP address to which you want to send SMS (e.g.: sip:user#sip.linphone.org)
register in your SIP client
in your sip client enter the number bound to your SMS application (SMS applications must use SMS enabled DIDs in order to send/receive SMS)
call the number associated with your application
user#sip.linphone.org should have received SMS
Here you are useful post from the RestComm docs page on how to send SMS to SIP phone http://docs.telestax.com/restcomm-send-sms-to-a-sip-phone/
If you want to send SMS from SIP client to RestComm application you can do the following:
register in your SIP client
enter the SIP number registered in Restcomm and associated with SMS application
right-click on the app number and choose to send text message
enter your message and click on the Send button
To check if the SMS has been received from Restcomm in Admin UI go to Logs -> Messages
Here is how log for received message from SIP client (Linphone in this case) looks like:
Here you are an example of sending SMS using the API:
curl -X POST http://ACae6e420f425248d6a26948c17a9e2acf:MyPassword#192.168.1.3:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/SMS/Messages -d "To=7777" -d "From=6666" -d "Body=This is a SMS Restcomm test"
<RestcommResponse>
<SMSMessage>
<Sid>SMde6b385aaba548b889a678a8357cea7f</Sid>
<DateCreated>Thu, 6 Aug 2015 07:55:25 -0600</DateCreated>
<DateUpdated>Thu, 6 Aug 2015 07:55:25 -0600</DateUpdated>
<DateSent/>
<AccountSid>ACae6e420f425248d6a26948c17a9e2acf</AccountSid>
<From>6666</From>
<To>7777</To>
<Body>This is a SMS Restcomm test</Body>
<Status>sending</Status>
<Direction>outbound-api</Direction>
<Price>0</Price>
<PriceUnit>USD</PriceUnit>
<ApiVersion>2012-04-24</ApiVersion>
<Uri>/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/SMS/Messages/SMde6b385aaba548b889a678a8357cea7f</Uri>
</SMSMessage>
</RestcommResponse>[user#localhost configuration]$
The "To" must be a number registered with Restcomm listening to an SMS application

How can I receive incoming sms in JavaME?

I'm developing an application in javaME and I'm trying to receive incoming sms but there is a way to catch them that is working only with ports and there must be two applications but I want to send sms in a phone without using javame application to other phone that hasn't javame application.
I want to receive incoming sms without using port. How can I do this, is it possible?
In Java ME, You can't read SMS from inbox. There is a way to read SMS from Inbox, but it is for symbian phone like S60 series ( Nokia E72,E5 ) etc only.
In S60 series phone using API Bridge jar file, you can achieve your requirement. Please check out http://www.developer.nokia.com/Resources/Tools_and_downloads/Other/APIBridge/ page for more details.

J2ME WMA send SMS for device without MIDlet installed

I'm using the WMADemo from the J2ME samples to send and receive SMS.
If I send one SMS from the SMSSend MIDlet for one device that doesn't have SMSReceive MIDlet installed the message goes to the inbox.
Is there any way to prevent this from happening?
Thanks.
I assume you want the message to be received by the MIDlet if it's present, and to be discarded if it's not installed, is that right?
There's nothing you can do about that, it's down to the individual handset. Some handsets (e.g. Nokia S40) will silently discard an SMS sent to a port number if there is no MIDlet listening for the message, whereas others will just display it as if it were a regular SMS.

Is it possible to have a J2ME app get an SMS and send it to a computer?

That's basically my question, I have written the code for sending/receiving SMS but it's basically a "server/client" so I can't get the SMS that are sent directly to the phone number instead of through the j2me program. Is it even possible?
It is quite possible to write an app that receives an incoming SMS, extracts the message and sends it to server through a HTTP call. You can then make that server send that SMS to another phone.
Using the Wireless Messaging API (JSR 120) you can receive SMS to a JavaME application. However, you must register to receive SMS on a particular port, and you cannot read SMS from the phone's standard inbox.
Register:
import javax.wireless.messaging.MessageConnection;
MessageConnection connection =
(MessageConnection) javax.microedition.io.Connector.open("sms://:1234");
There are 2 different methods of receiving SMS:
event-driven using javax.wireless.messaging.MessageListener
using blocking method javax.wireless.messaging.MessageConnection.receive()

Resources