I am making a device that uses 232RL to translate from UART to USB and windows see a COM port. The connections are like so:
simulate this circuit – Schematic created using CircuitLab
I want to find a way so that when the customer plugs the product and opens their software, the software can find in which port the product is connected to. I design both the Hardware (product) and the software, so I can have access to anything I might need to change.
My solution, which I think is not optimal: I solved this problem by opening the COM ports one by one (done automatically from the software from COM port 0 to 255) until I find a COM port that sends a code that only the software and the product knows. That way, I know I opened the correct COM port and continue with the communication. (This takes less than a second so it works for me, I just feel there must be a better way)
The question: Is there a 'faster', simplier way to overcome this issue? Like, Can I program the 232RL so that it shows a specific name (vendor name) along with the COM port?
I use win32 API and C/C++ for the software, but I can switch to another API or library if I need to, I can even change the 232RL to another IC if that is what It takes.