Connecting/Disconnecting to Ports via C# applications

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
paau_4742566
Level 1
Level 1

I'm having trouble using the port interfaces in the PP_COM_Wrapper dll that PSOC Programmer provides. I am using a CY8CKIT-0529 PSOC 5LP prototyping kit. I am able to successfully open the port to the board and have verified that I can write to it using the USB-I2C bridge. However, when I go to close the port or check if the port is open the commands returns that the port is closed. For the closeport() command it returns -1 and "Port is not opened!" For the IsPortOpen() command, it returns a 0, which means the port is closed, and no error message. I can still write to the board via I2C after running both commands. Any feedback on why I am unable to close the port and why the program thinks the port is closed would be appreciated. Am I missing a use of the command?

0 Likes
1 Solution
paau_4742566
Level 1
Level 1

In my coding solution I was using different instantiations of the PP_COM_Wrapper dll to open and check the status of the ports. The issue was resolved when I changed all my calls to use the same instantiation.

View solution in original post

0 Likes
1 Reply
paau_4742566
Level 1
Level 1

In my coding solution I was using different instantiations of the PP_COM_Wrapper dll to open and check the status of the ports. The issue was resolved when I changed all my calls to use the same instantiation.

0 Likes