Reading SMS from PC - java

Scenario : 1
Suppose there are two phones A and B. phone B sends a message to phone A. Phone A has that message in its inbox. Both the phones are nokia multimedia phones that can be connected with my laptop via nokia pc-suite.They can also be connected via Bluetooth with my HP laptop.
Scenario : 2
A valid sim card of my local operator is inserted into a modem and the modem is connected with my laptop. I can read messages sent in that number(sim) by using the software provided with the modem.
Question:
The received text message will be the input of my java program. How can I read that message with my java program. Solution for any of the two scenarios will solve my problem.
It would be very helpful for me if someone provide me some resources regarding this issue. I am interested to implement it by java but it would be also helpful if the resources are not in java platform but relevant to my task.

You can connect GSM modem built in Mobile Phone via bluetooth or RF232 connection, then send AT Commands. Pure java conenction functions should not be enough to make it possible. So you can use low level API coded by C programming language then connect it with Java applicatio via JNI.

Related

SIM800L + TTL Serial to USB Converter interfacing with PC

As AT-Commands for SMS receiving do not work for many phones I decided to use GSM modem instead so I googled and found SIM800L (please not that L in the end, as this one is a bit cheap) to be the solution. Furthermore, I found out that TTL serial to USB module is required to get it connected to PC (I guess so). Some time ago I have used Java + AT-Commands with some Nokia phone to send SMS but the receiving commands were not supported by the phone. Now my questions are: Will these circuits (I have very limited knowledge of electronics) connect to the PC and my java program? and would I be able to issue AT-Commands from java? Plus: Is there any java library for At-Commands which would work with SIM800L to get things a bit simple.

how to read sms from sim dongle using java code and AT commands?

I want to read sms from sim which is connected to my laptop by dongle(USB connector) using java code, I know that I have to use AT commands but I don't know which commands and how ???
If you are using Windows 7 and a reasonably new modem, you don't have to use AT commands. You can use the Windows Mobile Broadband API (it is available from Win 7 onwards).
It includes interface functions for SMS.
You need to enable a serial data connection via the USB connector to your GSM device/phone.
You will also need some type of terminal emulation software to connect and communicate to your phone.
You did not say what Operating system/Hardware you were trying to do this from, or what model of phone, this can affect the AT command set you need to use to access the SMS info, so I can't be more specific.
I have done this a few years ago using a bluetooth connection to a Motorola Razor from a mac Laptop, using a small Realbasic program to send and recieve SMS messages as a proof of concept for sending server monitoring messages to IT staff via sms. You can google the AT for GSM command set.

Talking to several USB modems from java

I wish to connect 10 usb modems to a windows/linux pc and send AT comments to them to send sms and receive sms from them. Is this possible in Java?
I think it is possible. You just have to know the COMM port ID for each modem. I do not know pure java way to discover these IDs. So, you need some platform specific way (e.g. WMI on windows or some command on Unix). But once you have ID it should not be a problem.
Assuming the USB modem implements a serial interface, it should get a COMM port id. If so, you can use RXTX to talk to the model.
afaik, you can use serial communication while talking to usb devices as long as device hardware contains an ftdi chip or so. I used a c++ serial lib in a Qt project, talking to an Arduino connected on a usb port. arduino appears as a com device.
otherwise, you may look at the jusb project: http://www.ibm.com/developerworks/library/j-usb/index.html

sms through usb port using java

I have connected my nokia through data cable to USB port. I need a program in java to access the gsm module of my mobile and send text messages.
which API i need to use for it? communication need to be taken place through USB port.
Thanks & Regards,
Sri
You can use smslib. It is a very reliable solution. It supports GSM phones and GSM modems connected via serial port interfaces or IP interfaces.
Look here for more.
Have a look at Kannel. It is not a Java application, BTW.
Java API for Kannel
An Example
Sending SMS with SMPP, Kannel and Java
The phone needs to be hooked up via a serial port for RS-232. Using either a USB data cable or a USB-to-RS232 adapter and a serial data cable.
Use Java Communications API to connect to the Phone.
Then use the AT command to send and receive SMS messages. There is and example here. It is not specific to Nokia, but it is pretty much a standard command set.

Detected android device connected to PC

I have an android devic, i wish to know when it is connected to the pc via java/.net
i know its possible - the Samsung New PC Studio is doing it, when ever i connect an android device it lets me know. how can i achieve the same?
You have to listen for one of this notifications
http://developer.android.com/reference/android/content/Intent.html
If you're using it as a mass storage device then use this
http://developer.android.com/reference/android/content/Intent.html#ACTION_UMS_CONNECTED
Other USB events aren't clearly described in the documentation
EDIT:
If you want to read on the computer side I would read this article
http://today.java.net/article/2006/07/05/java-and-usb
and then check which kind of devices are connected to the usb port. if it is a mobile phone, then you can try to send a short message to it. on your phone you make a small piece of code which returns an appropriate answer so you can detect thats its really android/your phone/this phones you want to identify
java device detection
This site have a guide on how to detect device with java web and java core
http://51degrees.com/Support/Documentation/Java/GettingStarted.aspx

Categories