Go Down

Topic: COM port remains "busy" (Read 1 time) previous topic - next topic

Dr_Quark

I am fiddling around with two Nanos, one shows up as COM_6 and the as COM_4. The IDE is installed on Win10. Uploads and serial monitor work on whichever Nano I plug in, until I unplug it. Most of the attempts to plug in another Nano and upload a sketch results in a "com port busy" error.

I have sometimes managed to get the com port to work if I had a "com_6" Nano plugged in and I change to a "com_4" version. Sometimes not. And never if I replug the original "com_6" back in. The port shows up in the Tools dropdown window, and the port available will change if the new nano has a different ID, but the port is still "busy."

When I retry, with com port 6 clearly available under Tools,  I also get the error "can't open device "\\.\COM6": A device which does not exist was specified."

Dr.Q
Dr.Quark

DrAzzy

#1
Oct 21, 2019, 06:06 pm Last Edit: Oct 21, 2019, 06:08 pm by DrAzzy
What kind of nanos are they? Ie, which serial adapter chip?

Is that the exact error message you get? I have not seen that exact phrasing of the error before.
You mentioned a port being "busy" - what is the exact error message?

Also, for good measure, what IDE version?

Does the problem happen if you close the serial monitor before you unplug the nano?
Does the problem happen if you do not use serial monitor, but do upload code to it?

Can you open a serial connection using a tool other than serial monitor?
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Dr_Quark

#2
Oct 21, 2019, 08:40 pm Last Edit: Oct 21, 2019, 09:01 pm by Dr_Quark
You might have nailed it.
1. It doesn't happen if the monitor is used first, last, or not at all, or close it first or last. I've done every combination, I think.
2. No, I don't have a terminal program on this laptop.

Using Win10 with IDE 1.8.10

Here's the steps that break the com port:

1. Open Windows
2. Open IDE
3. Connect Nano with CH340 chip
4. COM4 is available
5. Uploads and serial monitor work
6. Connect Nano with FTDI chip
7. COM6 is available
8. Error message is "Error opening serial port 'COM6'. (Port busy)"
9. Disconnect FTDI Nano and reconnect CH340 Nano
10. COM4 is available.
11. Uploads and serial monitor work

Now, if I restart the laptop, I can attach the FTDI chip and I see COM6 and everything works. Then I reattach the CH340 chip, COM4 is both available (and since serial monitor was open) it opens and everything works. I change to another CH340 chip and everything works. Now I switch to the FTDI chip and I get the "port busy" message.

The interesting thing is that the FTDI version programs just fine if it is the first unit connected. I haven't tried to disconnect the first FTDI unit and connect another, yet.

Dr.Q

Dr.Quark

DrAzzy

You might have nailed it.
1. It doesn't happen if the monitor is used first, last, or not at all, or close it first or last. I've done every combination, I think.
I'm confused, if it doesn't happen if the monitor is used first, last or not at all, then when *does* it happen? That would seem to cover all possibilities.

2. No, I don't have a terminal program on this laptop.

That's easy to change. There are tons of them to choose from - I like hTerm, as it lets you see the modem control pin inputs and manually switch DTR and RTS (depending on the board, one of those will usually trigger the autoreset), shows all control characters, and lets you use ascii or char codes in hex or decimal format for both sending and receiving. And it's small and requires no installation.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Dr_Quark

The monitor can "discover" the "busy port," just like plugging in a Nano and trying to upload also will "discover" the "busy port." The device accessing the port doesn't seem to be the critical fact.

However, what seems to trigger the problem is changing from an interface that looks like COM-A to a device that looks like COM-B, eg, the CH340 equipped Nanos that look like COM4 to an FTDI equipped Nano that looks like COM6.

And once the "busy port" problem is triggered, Windows needs to be reset to solve the problem.

My question is, if the drivers for the FTDI interface work (as long as it is plugged in first, no CH340 unit before it), the IDE and the drivers are functioning properly, but does the FTDI driver leave some process active that ties up the USB/COM port after the FTDI unit has been disconnected? Has this potential "bug" been reported by others?

Dr.Q
Dr.Quark

DrAzzy

Has this potential "bug" been reported by others?
I read and post on these forums uhm, a lot.

I have not seen anyone else describe this issue.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Dr_Quark

New evidence. I think it is either a Win10 problem, or my new-ish laptop.

I plugged in a Mega yesterday and now I have 3 (three) COM8 ports listed as available. They don't go away when I unplug the Mega. I haven't checked to see if I select any or all of them.
Dr.Quark

DrAzzy

Ugh, I thought they had fixed the multiplying tools->port entry thing >.<
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up