I want to send fax in serial port with AT Command in C#. I am reading this pdf learning for send or receive a fax with AT Commands. But i have problems. For example this is my method for send command to Serial Port:
void WriteData(string command)
{
maintxt.Text += "Send: " + command + Environment.NewLine;
port.Write(command + Environment.NewLine);
var read = port.ReadExisting();
if (!string.IsNullOrEmpty(read))
maintxt.Text += "Read: " + port.ReadExisting();
//System.Threading.Thread.Sleep(500);
}
and example for send fax:
WriteData("AT+FCLASS=1;+IFC=2,2");//command for set fax class and flow control
WriteData("at+vcid=2");//command for set caller id
WriteData("ATDT333222111");//command for call
after i send these commands to modem:
step 1: modem is calling
step 2: answer call
step 3: report me "CONNECT"
and i don't understanding TSI And CSI frame for send or receive data in fax modem(in pdf page of 156):
AT+FRH=3
<TSI frame data>
<DLE><ETX>
<DCS frame data>
<DLE><ETX>
how to use these commands?