You have to use Java comm API. many functions are provided there to control the
ports. you have to connect first your mobile to PC. and then send AT commands to
the port to send recieve messages and any other functions. you can get AT
commands list from etsi site.