I need location data from PC and use them do something else. Based on the official documents, I should install Tera Term and open it first, then I select right COM port and right baud rate just based on the official documents. And then enter twice and input “lep”, the Tera Term will receive the location of the tags. I want to make one program to simulate the Tera Term by C# language. My codes are below:
var mySerialPort = new SerialPort(ComPortName);
mySerialPort.BaudRate = 115200;
mySerialPort.Parity = Parity.None;
mySerialPort.StopBits = StopBits.One;
mySerialPort.DataBits =8;
mySerialPort.Handshake = Handshake.None;
mySerialPort.Open();
And I input some code to simulate the operation of enter twice and “lep” command. But it can’t work. I still need open Tera Term and do some next operation. I can’t figure it until now. Some one can help me? My input command are below:
mySerialPort.Write("\r");
mySerialPort.Write("\r");
mySerialPort.Write(“lep\r”);
3Q