My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

The project is made of three parts :

The first project handles the serial connection to the mobile phone using RXTX library and sends SMS messages through AT commands. It will delete each sent message from the mobile's memory in order not to fill it.

The AT code was done for a Motorola V980 mobile phone, so you may have to change the code to get it working on a different model.

It supports sending messages directly indicating the number and message , or using a XML representation of a single SMS, or a xml representation a batch of SMS messages, all sharing the same prefix. It uses XStream for XML to Object mapping.

The second project is a server using RESTlet library to deploy a remote service to send SMS messages. So you can use whatever platform you wish to send SMS messages - PHP,Flex,etc. The configuration can be done via command line or in a config.txt file. The parameters are: -base URL -port -serial port to connect to the mobile

There are three services deployed : sending sms, serial port listing and serial port configuration.

For sms service, the url is base url + /sms. If base url is "atcomm", the sms service url is "atcomm/sms"

http://localhost:9802/atcomm - base url

http://localhost:9802/atcomm/sms - sms service url

If you want to send a sms , you can do it using either POST or PUT method. You can send the information either in text form or xml. If in text form, you can only send a single sms. In the body of the http message, you will writein the first line the number to use, then add a new line character '\n' then on the other line you will write the message to send, without any new lines. You can also use xml to send a single message or a batch of sms messages.

A single message in xml would be like this:

<sms>
   <number>+351969516862</number>
   <message>Testing remote service</message>
</sms>

A batch of sms messages would be like this:

<sms-batch>
   <prefix>+351</prefix>
   <sms-list>
      <sms>
         <number>969516862</number>
         <message>Testing remote service 2 </message>
      </sms>
      <sms>
         <number>969516862</number>
         <message>Testing remote service</message>
      </sms>
   </sms-list>
</sms-batch>

Don't forget : if sending text, set the media type to text/plain, if sendin xml, set to text/xml or application/xml.

For serial port listings, just use base url + /serialports

http://localhost:9802/atcomm/serialports

When using a GET method, it will return the list of serial ports on the server machine.

For serial port configuration, use base url + /serial port

http://localhost:9802/atcomm/serialport You can use a GET method to see what port is currently being used, and you can use a POST or PUT method to change the port in use. Send the port name as text/plain.

The third and final project is a SWING client that uses RESTlet to connect to the remote service as a client. It shows the available serial ports, you can change the connection port to use and also send a SMS message.

This was done for a school, in order that the student's parents would receive mobile messages when the students receives grades or if the student misses more than 3 classes per week.

But i think this would be useful for other purposes too, so I'm making it available. Enjoy.

Powered by Google Project Hosting