data 是我要发送的指令。总是出现写入超时
try
{ byte[] sendBytes = Encoding.UTF8.GetBytes(data);
int n = data.Length;
_serialPort.Write(sendBytes, 0, sendBytes.Length);
}
catch(TimeoutException)
{
}
try
{ byte[] sendBytes = Encoding.UTF8.GetBytes(data);
int n = data.Length;
_serialPort.Write(sendBytes, 0, sendBytes.Length);
}
catch(TimeoutException)
{
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货