COM2 handshaking not working in 2016 pre-release

Hi - can you confirm whether there is an issue with hardware handshaking in the 2016 pre-release firmware? - for the G120 module.

The following code results in an exception when handshaking is selected

          SerialPort UART = new SerialPort("COM2", 115200);
           UART.Handshake = Handshake.RequestToSend;
           UART.Open();

This is the resulting exception:

Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1)

#### Message: 
#### Microsoft.SPOT.Hardware.Port::ReservePin [IP: 0000] ####
#### System.IO.Ports.SerialPort::HandlePinReservations [IP: 0050] ####
#### System.IO.Ports.SerialPort::Open [IP: 001d] ####

I cannot test it atm, but given that I see “ReservePin”, I think it will be a bug in SDK.

@ robert42 -

That is a bug in SDK 2016 Prerelease. Refer to release note to see different between 2015 R1 and 2016 Pre1, and if handshaking is more important then you may have to switch back 2015R1 while wait for the fixing.

@ Dat - Just a suggestion. Maybe you could mention in 2016 Pre1 release notes (more precisely, G120 -> Issues) that ReservePin is causing some problems. It is not the first report where ReservePin is causing issues.

Hi,

I have FEZ Cobra III and the latest SDK NETMF SDK 2016 R1.

My code:
SerialPort UART = new SerialPort(“COM2”, 115200);
int counter = 0;
UART.Handshake = Handshake.RequestToSend;
UART.Open();

And this is working !! I am able run interruption code of
COM2 RTS signal. I have hooked COM2 Rx and Tx, also
P0.6/COM2.RTS is wired to P0.3 as interruption initiation.

Regards

Jari

I ran into this problem on a custom F7 board. Turned out the UART feature was commented out in my TinyCLR.proj. Just posting this here in case the next guy googles the error message so he won’t have to hunt down the cause.