i want to ask how to send at command information to text box?
My code is
serialPort1.Open();
//manuf
serialPort1.Write("AT+CGMI" + System.Environment.NewLine);
//Thread.Sleep(1000);
txtmanuf.text=serialport1.ReadTo("AT+CGMI").ToString();
//TYPE MODEM
serialPort1.Write("AT+CGMM" + System.Environment.NewLine);
Thread.Sleep(1000);
txtType.Text= serialPort1.ReadExisting().ToString();
//IMEI
serialPort1.Write("AT+CGSN" + System.Environment.NewLine);
Thread.Sleep(1000);
txtimei.text=serialport1.ReadTo("AT+CGSN").ToString();
//phone number
serialPort1.Write("AT+CNUM" + System.Environment.NewLine);
Thread.Sleep(1000);
txtphone.text=serialport1.ReadTo("AT+CNUM").ToString();
If I use ReadExisting() all information entered into one text box , and if I use ReadTo("AT+..") there are no errors but when I run the program and click my button my program directly close
try{} catch{}
block? 'Directly close' sounds like an unhandled execption with a debugger not configured to stop at this specific exception to me. – Bastian Thiede Aug 20 '16 at 6:10