Cannot Send SMS via GSM modem using AX2009

Hi fren,

i’ve issue on sending SMS via GSM modem by AX code. i tried to run this on AX job but somehow, it doesnt send me SMS. However, if i’m using hyperterminal, it’s work. Plus, in hyperterminal i need to check “Force incoming data to 7-bit ASCII” at it’s properties, then can send SMS. if not, no working.

Can u guys help me on this? Thank you.

This is my code :

System.IO.Ports.SerialPort port;

str _charZ = num2char(hex2int(“Z”));

char Z = num2char(26);

;

try

{

port= new System.IO.Ports.SerialPort();

port.set_PortName(“COM4”);

port.set_BaudRate(115200);

port.set_Parity(System.IO.Ports.Parity::None);

port.set_DataBits(8);

port.set_StopBits(System.IO.Ports.StopBits::One);

port.set_Handshake(System.IO.Ports.Handshake::None);

port.set_DtrEnable(true);

port.set_RtsEnable(true);

port.set_NewLine(System.Environment::get_NewLine());

port.Open();

if(port.get_IsOpen())

{

port.WriteLine(“AT”);

port.WriteLine(“AT+CMGF=1”); //set message mode to TEXT

port.WriteLine(“AT+CMGS =\‘01334093214936’\”);

port.WriteLine(“TEST”); //type message text

port.WriteLine(Z); //corresponds to pushing Ctrl+Z

port.Close();

}

}

catch(Exception::CLRError)

{

throw Error(port.ToString()); pause;

}