Download my sms io project and you will have almost all the answer you need.

http://techni.caliti.es/blog/2008/12/sms-io-controller.html

Al.