Specific USB Devices

  How To Find Specific USB Devices That Are Connected This example works by looking for a specific USB device VID and PID and was made to work with devices using Microchips USB CDC USB firmware stack.  However it will work with all sorts of USB devices. using namespace System::IO::Ports; //< Needed for USB serial port […]

Read More

FTDI USB Devices

Finding Connected FTDI Devices using namespace Microsoft::Win32; //< Needed to access registry int Count; int CharPosn; int CheckEachPortCount; String ^RegistryMainFolder; String ^SerialNumber; String ^Port; array<String^> ^FoundCommPorts = gcnew array<String^>(0); array<String^> ^FoundSerialNumbers = gcnew array<String^>(0); //—– SETUP THE COMM PORT COMBO BOX —– //Add the default comm port "None" cmbCommPort->Items->Add(L"None"); try { //—– DISCOVER ALL AVAILABLE […]

Read More

Serial Port

using namespace System::IO::Ports; To Discover Available Comm Ports On The PC array<String^> ^AvailableSerialPorts; array<unsigned char> ^aTemp; String ^sTemp; try { AvailableSerialPorts = SerialPort::GetPortNames(); cmbCommPort->Items->Add("None"); for(int Count = 0; Count < AvailableSerialPorts->Length; Count++) { sTemp = AvailableSerialPorts[Count]; //Remove any non numeric last letter which can be added by microsoft bluetooth drivers aTemp = System::Text::Encoding::UTF8->GetBytes(sTemp); while ( […]

Read More