1

我已经使用下面的代码来读取 rfid 标签值。

try
{
    if (serialPort1.IsOpen) serialPort1.Close();
    serialPort1.PortName = "COM25";

    serialPort1.BaudRate = 9600;
    serialPort1.DataBits = 8;
    serialPort1.ReceivedBytesThreshold = 5;
    serialPort1.Handshake = Handshake.None;

    serialPort1.Open();
    lblStatus.Text = "Serial Port: Connected";
}
catch (Exception ex)
{
    lblStatus.Text = "Serial Port: Unable to Connect";
}

上面的代码适用于 windows 应用程序,但是当我在 windows mobile 模拟器中使用相同的代码时,它说无法连接串口。有人可以帮我吗?

4

1 回答 1

0

您需要对模拟器进行一些特定配置以启用端口。请参阅此处以获取良好的入门文章

谷歌搜索如何配置 windows 移动模拟器串行端口也将产生一些值得关注的东西。

于 2012-04-03T17:38:08.600 回答