Port busy

hey folks,

i got my arduino uno wifi rev2 two days ago. i made progress, even if there where some serious problems, but some errors bother me more then others…

whenever i upload a sketch whilst my serial monitor is running, the upload fails and i have to un- and replug the link between arduino and computer (windows 10). so my solution was simple: always close the serial monitor before uploading the sketch.
but i have to go a step further now and the problem needs to be solved once and for all!
i am trying to send data to vvvv. therefore i have to open the serial monitor after uploading the patch, but this is impossible, cause it is already busy. my guess is, that vvvv is blocking it somehow, but actualy i have no idea (coming from the design side of life).
would be amazing, if somebody can pls explain an solve this issue :confused:

greetz

avrdude: 280 bytes of flash written
avrdude: verifying flash memory against C:\Users\WomirAig\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6/bootloaders/atmega4809_uart_bl.hex:
avrdude: load data flash data from input file C:\Users\WomirAig\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6/bootloaders/atmega4809_uart_bl.hex:
avrdude: input file C:\Users\WomirAig\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.6/bootloaders/atmega4809_uart_bl.hex contains 280 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.10s

avrdude: verifying …
avrdude: 280 bytes of flash verified

avrdude done. Thank you.

Error opening serial port ‘COM3’. (Port busy)
Error opening serial port ‘COM3’. (Port busy)

Who is "vvvv" ?

The message you included looks as if the upload went well so not sure what we would be looking for there ?

Serial monitor inside the IDE or an external one ?

Think I may have already given you these links once but JIC i did not let me put them here for you.

Could you take a few moments to Learn How To Use The Forum. Other general help and troubleshooting advice can be found here. It will help you get the best out of the forum in the future.

I think the problem is that one has to close the serial monitor for the upload to succeed and after the upload the original port is busy. I don't have the board so can't verify or advise.

@womiraig What does Windows device manager say?

but i have to go a step further now and the problem needs to be solved once and for all!

What is that step?

hey again and thx for you willingness to help me :slight_smile:
this time i try to explain my situation as accurate as possible.

i following a tutorial series called “prototiping interfaces”. it’s made for coding-lazy-designers like me, who prefer a visual concept for programming. this is where the program “vvvv” from the german company “meso” comes in handy. it is able to connect with many hardware - also arduino.

first i compiled a simple bit of code and uploaded it to my arduino uno wifi rev2.
tools>board>arduino uno wifi rev2
tools>port:COM3(arduino uno wifi rev2)
doublechecked all needed libraries
no problems so far…

int A0Pin = A0;
int A0_value;
int delayTime = 10;

void setup() {
  Serial.begin(9600); 
}

void loop() {                                                                                 
  A0_value = analogRead(A0Pin);
  Serial.println(A0_value);
  delay(delayTime);
}

when i open the serial monitor my potentiometer gives values between 0 and 1023. nice!

at this point i have two ways to get into trouble.

1

when i tweak the code and try to upload it again, whilst the serial monitor is still open, it fails, saying the port is busy this is what the compiler gives me:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : xplainedmini_updi
         Overriding Baud Rate          : 115200

when i first got this error i also got - avrdude attempts from 1 to 10, which where not in sync and resulted in a busy port too. this took quite a while and also now it takes long, before the final error message calls it a fail
i reinstalled arduino and also checked the verbose upload, but could not reproduce this compiler error (but i think in the background it’s the same as the sync error from 1 to 10)
at this point i also don’t understand what avrdude is and what it’s for.

a picture of my device manager is enclosed.
could it be, that the port should not be virtual?
i installed all drivers as intended in the installation guide.

i also switched my usb3 to usb2, just to be sure and installed CH340/341 and CP2102 drivers (don’t know what they are for)

2

i uploaded the sketch to the arduino and it works as intended.
in VVVV i open the tutorial folder, so code should be right

an now it get alittle bit tricky…

if the serial monitor in the arduino IDE is closed and i enable the “RS-232”-node in the script, nothing happens, sometimes it crashes. this can - of course - be due to outdated scripts, my fault or otherwise - or a port problem? i don’t know.
baudrate is the same in both programs.
now, when i try to open the serial monitor in the arduino IDE, it’s busy again!
afterwards i disable the RS-232"-node in the script and the serial monitor works perfectly fine!

maybe it’s worth mentioning, that closing the serial monitor takes about 10 seconds - quite long, if you ask me.

_

i don’t know if this issue has something in common, but i was searching for a firmata for arduino uno wifi rev2 to get easy access to the arduino from VVVV.
sadly there is no support for this board.
would you recommend to get the arduino uno + gyro + accelerometer + wifiShield instead? just to be able to have the easy to use firmata
_

thank you so much for your time in advance. i realy hope i can get through this soon and are able to do some creative work.

regards,
raphael

deviceManager.PNG

Only thing that I can say at this stage is that only one application can make use of the Serial Port at a time. Not sure if I completely understand your description but it sounds like VVV want's to use it and the IDE wants to use it. If VVV has the port open, you will get the message "Port Busy" in the IDE.

For testing purposes, only use the IDE and keep above in mind.