To send SMS using a 3G modem, you need to use the appropriate AT commands. First you need to set the modem to text mode:
AT+CMGF=1
Then you send your message:
AT+CMGS=<number><CR> <message><CTRL-Z>
Where <CR> is the carriage return (ASCII 13), and <message> is the message you want to send, <CTRL-Z> is ASCII 26, and <number> is the number to which you want to send your message.
To read received messages, you do this:
AT+CMGL=<stat><CR>
Where <stat> is one of: "ALL" , "REC UNREAD" , "REC READ" (with quotation marks), which means all messages, unread messages and messages to read, respectively.
To do this in Java, you need to use the Java Communication API. Here is a quick example: http://java.sun.com/products/javacomm/reference/docs/API_users_guide_3.html
source share