var tmp = new byte[0x2000]; //var tmp = new byte[0x11]; int dataLength = 0; try { for (int i = 0; i < tmp.Length; i++) tmp[dataLength++] = (byte)serialPort.ReadByte(); } catch (Exception ex) { }