Need code in C# .net to read rfid tag values in windows mobile emulator

2.1k Views Asked by At

I have used the code below to read rfid tag values.

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";
}

The above code is working for windows application but when i use the same code in windows mobile emulator it is saying unable to connect serial port. Can someone please help me out?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to do some specific configuration with the emulator to enable ports. See here for a good, starter article.

Googling how to configure windows mobile emulator serial port for will also yield some things to look at.