Hello! I started working with the MPrint t58 printer through the virtual com port using esc / pos protocol, printing works fine, but when I try to find out if there are any errors, the printer either doesn’t answer or sends only \ 0. Maybe someone already worked with such equipment and encountered such a problem?

serialPort2.PortName = "COM5"; serialPort2.BaudRate = 9600; serialPort2.DataBits = 8; serialPort2.Parity = System.IO.Ports.Parity.None; serialPort2.StopBits = System.IO.Ports.StopBits.One; serialPort2.ReadTimeout = 10000; serialPort2.WriteTimeout = 10000; serialPort2.Open(); //serialPort2.Close(); //serialPort2 = new SerialPort("COM5", 9600, System.IO.Ports.Parity.None, 8/*data bits*/, System.IO.Ports.StopBits.One); serialPort2.Encoding = Encoding.GetEncoding("windows-1251"); serialPort2.DataReceived += serialPort2_DataReceived; 

send status request to printer:

 data = new byte[2]; data[0] = 27; data[1] = (int)'v'; serialPort2.Write(data, 0, data.Length); 

ink quantity request:

 data = new byte[2]; data[0] = 27; data[1] = (int)'u'; serialPort2.Write(data, 0, data.Length); 

On the first request, if everything is ok, the answer is \ 0, if there is no paper, then nothing comes, on the second there is no reaction

    0