• 博客(0)
  • 资源 (1)

空空如也

GPRS通信测试程序

byte[] bSend = new byte[StrCommand.Length + 1]; for (int i = 0; i < StrCommand.Length; i++) { bSend[i] = Convert.ToByte(StrCommand[i]); } bSend[bSend.Length - 1] = Convert.ToByte('\r'); SP.Write(bSend, 0, bSend.Length); State = "命令 " + Encoding.Default.GetString(bSend, 0, bSend.Length) + " 发送完成..."; Thread.Sleep(200); if (SP.BytesToRead == 0) { State = "没有收到返回的信息"; return; } byte[] bData = new byte[256]; State = "收到以下信息"; int iCount = SP.Read(bData, 0, 255); State = Encoding.Default.GetString(bData, 0, iCount); }

2010-03-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除