Reputation: 13
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?
Upvotes: 1
Views: 2152
Reputation: 81459
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.
Upvotes: 0