Hi,
I have an issue.I am using netduino1, Quectel M10 and Quectel L10. When I try to change ports from GPS to GSM ans recieve some data a i got error "A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.SerialPort.dll".
Here is my code.
serial2.DataReceived -= new SerialDataReceivedEventHandler(serial_DataReceived2);
Thread.Sleep(4000);
serial2.Close();
Thread.Sleep(3000);
serial.Open();
Thread.Sleep(1000);
serial.DataReceived += new SerialDataReceivedEventHandler(serial_DataReceived);
Thread.Sleep(3000);
settings = null;
while (settings == null)
{
initializationPost();
}
I suppose that problem is when I try to remove hadnler and than close the port, port is still recieving data and it throws an exception.
Could you please help me how to solve this?