Posts: 4
Registered: ‎09-25-2017

BGM113 RTS Signal

I have a board that has a CP2102N device on it.

I have an issue toggling RTS when using C# on Windows 10.


After opening the port, any call to "myPort.RtsEnable" causes an :

System.IO.IOException: A device attached to the system is not functioning.

at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.InternalResources.WinIOError()
at System.IO.Ports.SerialStream.set_RtsEnable(Boolean value)
at System.IO.Ports.SerialPort.set_RtsEnable(Boolean value)


This ***only*** happens with C#. If I do the same with Java, everything is fine.

Also, if I set RTS *before* I open the port, no exception, but once the port is opened, any call to set_RtsEnable causes the exception.


Code snippet follows:

                    myPort.BaudRate = Convert.ToInt32("115200");
                    myPort.DataBits = Convert.ToInt16("8");
                    myPort.StopBits = System.IO.Ports.StopBits.One;
                    myPort.Handshake = System.IO.Ports.Handshake.None;
                    myPort.Parity = System.IO.Ports.Parity.None;
                    myPort.DtrEnable = false;
                    myPort.DtrEnable = true;
                    myPort.RtsEnable = true;

DTR however works as expected, no issues. It is only when RTS is set.

The first call to RtsEnable causes the exception.


Interestingly enough, I have a different board that has a CP2102 (no 'N') on it and everything works as expected!!


Is there a bug in the CP2102N or the corresponding driver for the 'N' version?


Posts: 4
Registered: ‎09-25-2017

CP2102N RTS Signal on C#

The topic subject/Title was set incorrectly.

This is a new Issue I'm reporting that applies to the CP2102N when used with C# on Windows10


Posts: 344
Registered: ‎09-22-2009

Re: BGM113 RTS Signal

Looks like you already reposted this topic under the subject line you wanted. I'm going to lock this thread.