My Arduino UNO is connected to my Windows 10 laptop via USB. No problem with uploading software.
I can communicate with my program via the serial monitor. The serial port in use is COM3.
I also have a dual USB RS-232 adapter connected. It shows up as COM4 and COM5. These ports have RS-232 signal monitors attached (passive LEDs showing signal status). Both these ports are inactive and unused by any software on the laptop.
When I start the Arduino GUI, both ports COM4 & COM5 indicates activity.
When the GUI is terminated, this activity ends.
I think what is happening is the Arduino IDE is constantly scanning all ports to update the Tools > Port menu. I think this will always happen but there is a known issue with Arduino IDE 1.6.8 on Windows that is causing interference with using serial ports: https://github.com/arduino/Arduino/issues/4700 which has already been fixed. You can avoid it by using any IDE version previous to 1.6.8 or if you're feeling adventurous try the hourly build: http://www.arduino.cc/en/Main/Software#hourly
and thanks for your reply.
This explains it pretty well.
But is it not possible to check if a port is available without generating traffic on it?
I noticed another interesting thing:
When the extra serial port is opened via another terminal program, the traffic generated by Arduino GUI on that port stops, even after the terminal program has closed the port and exited. And the ports are still shown as avaialble on the Arduino port list.
Only one application can use a serial port at a time; if a terminal program has a port open, the IDE can't open the port and hence no traffic. Once the IDE has figured out that it can't use the port, I guess it does not retry the port again.
Which ports are listed in the IDE might (not sure) be pulled from the device manager when the IDE starts up. If the device manager shows three COM ports, the IDE will list 3 ports.
The newer IDE that you now have might do things a bit differently; if I'm not mistaken, one complaint about 1.6.8 was continuous polling on the com ports.