I am interfacing a sensor module on serialport of computer. I am able to read data but i have to write the port name in the code to receive data, as "COM5" if that is the port with data available.
I want that my application detects the port itself and i have not to look first the name from computer and then write it in code, as it changes if i connect my sensor on some other computer and changes sometimes also on the same computer.
How i can achieve that?
I will be very thankful if somebody help me asap.