To accomplish this you must have CLI tool to send raw SMS PDU data iPhone 4. It is known as sendrawpdu.
You have to compile sendrawpdu file on the iPhone 4 and only after that to apply it. Prior to we begin you should comply with the demands provided below:
Demands
Mac OS X 10.6 and higher...