Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: JP2222 on Jun 14, 2018, 04:31 am

Title: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 04:31 am
I have been using Arduino on Linux for years.

I was using version 1.6.13 on Ubuntu 16.04, when I unplugged my board and plugged it back in, and it was no longer visible in the "ports" tab. I restarted my PC, and the ports tab is completely grayed out.

To eliminate a lot of responses:
- I am a member of my dialout group
- The device shows up as a USB device in /dev/ and the instance can be seen with dmesg
- I have tried uninstalling and reinstalling the IDE on the computer
- I have tried the latest version of the IDE (1.8.5) with no better results
- I have removed the .arduino15 directory
- I have tried both IDE versions listed on another 16.04.4 PC with no better results (I am a member of the dialout group on this PC and the device is recognized by the kernel)

Any insight would be greatly appreciated.

Thank you
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: kprims on Jun 14, 2018, 05:05 am
Linux Mint 18.3 here and mine is working the same way. Wait long enough and then the Ports show up. Also tried the hourly build and  getting the same results.

Pulled the network cable and everything went back to normal. Plugged it back in and the problem returned.  Will try on another box in the morning.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: gdsports on Jun 14, 2018, 10:17 am
modemmanager or getty may be grabbing the port. See the following for details.

https://hackingmajenkoblog.wordpress.com/2016/08/24/diagnosing-arduino-problems-in-linux/ (https://hackingmajenkoblog.wordpress.com/2016/08/24/diagnosing-arduino-problems-in-linux/)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: hermenj on Jun 14, 2018, 11:31 am
Same here, suddenly this morning after restarting the arduino IDE the ports section was greyed out on Ubuntu 16.04. Tried all kinds of stuff, no success. Finally found this thread and disconnected the network connection.
Boom, all ports are back. WTF is this?

uninstalled the modem manager, but no change.

Once arduino is started i can reenable the network connection ann everything works fine, even new ports are detected then.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: rmtucker on Jun 14, 2018, 02:33 pm
I have signed up just to reply.
Exactly the same problem with ubuntu 16.04.
Just started doing this today.Annoying >:(  >:(
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: Paulo74 on Jun 14, 2018, 03:31 pm
Very strange, we experiment the same problem today with two different laptops running Windows 7 and Windows 10 and two different genuine Arduino Uno boards. It was working last week.

We tried to reboot, to reinstall the IDE and the CH340 drivers, without success. We can see the connexion in the Windows Device Manager, and which port is used (usually COM6), but the port does not appear in the IDE.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: Paulo74 on Jun 14, 2018, 06:12 pm
A solution (at least for Windows users): plug your Adruino AND WAIT!

On my laptop it takes exactly 3 minutes to let the COM port appearing in the menu. On a friend desktop, near to 5 minutes! But after it's working.

I guess the reason is a Windows update :-(
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 06:18 pm
Same issues here (win10)!

Looks like a bug or update issue...  Since other folks are also reporting problems on Linux builds, I'm going to guess some sort of odd bug...

Looks like we need an update to the IDE?
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 06:36 pm
I just checked a couple of my other Win10 machines and then downloaded a few older versions of the IDE to test.

Looks like all versions of the IDE since 1.6.11 are suddenly having this problem...  1.6.11 continues to properly enumerate all the COM ports, but any newer version has suddenly stopped working!

I would chalk this up to some Microsoft update nonsense, but other folks (in this thread) are also reporting this same behavior on Linux platforms as well.






Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 07:40 pm
A solution (at least for Windows users): plug your Adruino AND WAIT!

On my laptop it takes exactly 3 minutes to let the COM port appearing in the menu. On a friend desktop, near to 5 minutes! But after it's working.

I guess the reason is a Windows update :-(
This does not work for me.  The only thing which is working is to downgrade to v1.6.11.  (All later versions appear to have same issue)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: caslor on Jun 14, 2018, 10:24 pm
Same problem here

with linux -  Ubuntu 16.04.4 LTS

suddenly as i was refreshing one library and restarted my arduino ide  (1.8.1 x64)   couldnt see the ports any more

i was searching almost 2 hours for a solution to this

i have noticed that when i am starting Arduino Ide with no board in the usb  then the port is active with the   /dev/ttys0  option

but when i have connected previously a uno board  the port option is Grey

also i noticed that with some mega 2560 boards  the arduino ide can see them if they are connected


after i read the previous posts here  i can confirm that mine also after 3 minutes  the port became active and can see the usb ports

Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 10:39 pm
Same problem here

with linux -  Ubuntu 16.04.4 LTS

suddenly as i was refreshing one library and restarted my arduino ide  (1.8.1 x64)   couldnt see the ports any more

i was searching almost 2 hours for a solution to this

i have noticed that when i am starting Arduino Ide with no board in the usb  then the port is active with the   /dev/ttys0  option

but when i have connected previously a uno board  the port option is Grey

also i noticed that with some mega 2560 boards  the arduino ide can see them if they are connected


after i read the previous posts here  i can confirm that mine also after 3 minutes  the port became active and can see the usb ports


That's very interesting...  "Board Connected BEFORE starting IDE = Greyed Ports Option"

The hub on my Win10 PC normally has an M5Stack device connected just for power/charging.  (The M5Stack is an ESP32 device which is supported by the Arduino IDE).

So I tried disconnecting it BEFORE starting the IDE and now I can see the PORTS.  If the IDE starts up with the MStack Connected, I can not see the PORTS.

So I have done some more testing testing (using an Arduino Mega2560 variant).  It appears:

1.  Having ANY Arduino (compatible) device connected BEFORE starting the IDE will render the PORTS Option greyed out...

2.  Connecting ANY Arduino device AFTER starting the IDE will leave the PORTS Option Functional, but the recently added device will not be listed (just the non-Arduino ports)...

So...   Still can't program any of my Arduino devices even if I connect them AFTER the IDE is started...

Something is really wrong here.  And as a daily user of the Arduino IDE, this is something very new (and very painful).

(1.6.11 still seems to work OK regardless...)

Title: Re: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 10:44 pm
After doing some more testing on Ubuntu 16.04.4 I can confirm several things:
- Disconnecting from the network allows the ports to show up
- Version 1.6.11 does not have these bugs
- If you let another version (1.6.13) sit for a long time, it will eventually detect the ports
- Interestingly, if you have the default port at ttyUSB0 (showing in the lower left of the IDE), even though the "ports" are not available, you can still successfully program the board. Weird.

Temporary solution on Ubuntu 16.04:
- Downgrade to version 1.6.11 of the Arduino IDE
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 10:54 pm
Leaving all networking configured on the Ubuntu 16.04 PC, the 1.6.13 IDE does not work (as stated before).

If you disconnect the internet connection (unplug the router from the external internet), still leaving all networking configured on the PC so you have your local network still, THE IDE WORKS.

Are the IDEs attempting to connect to a server somewhere, and only working if they fail to connect? Anyone have any insight?
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 11:04 pm
I can confirm EXACTLY the same experience on my Win10 PC!

- If my ethernet cable is connected, my port option is greyed out.

- If I disconnect my ethernet cable, I can see all my ports!

What kind of nonsense is this?  This would indicate that some network service is required to be up and running if we are to do development on an online PC?  Why would that be?  Exactly what info is being exchanged?

Its also somewhat "comforting" that the Linux IDE is currently behaving the same as the Windows IDE...

Perhaps some online Arduino service is offline?  If so, why do we have this dependency?

(Thanks for a very astute observation!)

Title: Re: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 11:15 pm
I can confirm EXACTLY the same experience on my Win10 PC!

- If my ethernet cable is connected, my port option is greyed out.

- If I disconnect my ethernet cable, I can see all my ports!

What kind of nonsense is this?  Why do we require network connectivity to see our Com Ports?  This would indicate that online connectivity is required to use the IDE?  Why would that be?  Exactly what info is being exchanged?

Its also somewhat "comforting" that the Linux IDE is currently behaving the same as the Windows IDE...

Perhaps some online Arduino service is offline?  If so, why do we have this dependency?

(Thanks for a very astute observation!)


You have contradicted yourself here. Network connectivity is resulting in the IDE NOT to work. The connectivity is therefore resulting in the loss of functionality.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 11:17 pm
Just checked back in with another Arduino developer in my company.  I noted previously that he did NOT see this issue but he also did NOT have ny Arduino connected at that time.  Once we introduce an Arduino into the equation he can replicate all these same observations!

So, currently, we can't do any Arduino programming or development unless our machines are disconnected from the Internet?  WTF?

I guess its time to fire up Wireshark to see exactly who the Arduino IDE is trying to talk with and what info its requesting/exchanging...
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 11:22 pm
You have contradicted yourself here. Network connectivity is resulting in the IDE NOT to work. The connectivity is therefore resulting in the loss of functionality.
(You are correct - I was editing my post as you posted)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 11:29 pm
Running wireshark while starting the IDE, I can see a load of network traffic coming from arduino.
Notably contacting amazon webservices, must be the host for arduino.cc. Trying to compare the network traffic from 1.6.13 and 1.6.11 to see the difference.


Strange that if there is no response from the servers the IDE works.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: gdsports on Jun 14, 2018, 11:42 pm
We are not alone.

https://old.reddit.com/r/arduino/comments/8r1304/no_access_to_serial_ports_after_os_upgrade/ (https://old.reddit.com/r/arduino/comments/8r1304/no_access_to_serial_ports_after_os_upgrade/)

https://github.com/arduino/Arduino/issues/7690 (https://github.com/arduino/Arduino/issues/7690)

@JP2222 Thanks for making the discovery about disconnecting the network!

I noticed the IDE accesses api-builder.arduino.cc on startup (thank you wireshark) so I blocked access to this host. I added an entry to /etc/hosts like this to blacklist the host.

Code: [Select]
127.0.0.1       api-builder.arduino.cc

Now the IDE starts up with the serial ports listed immediately without having to disconnect the network cable.

Perhaps something has changed on api-builder.arduino.cc.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 14, 2018, 11:53 pm
I'm also seeing traffic to AWS just before the IDE "stabilizes"...


Notably a HTTP 301 "Moved Permanently" reply just before the IDE settles down:

1074   15.998826   184.73.237.236   10.100.1.1   HTTP   532   HTTP/1.1 301 Moved Permanently  (text/html)


Perhaps something is broken at AWS?  The IDE needs to be fixed to remove this dependency!


Why is our IDE contacting the api-builder web site anyway?  Someone vacuuming up a lot of code?  Grrr?


(Nice workaround hijacking api-builder.arduino.cc!!)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: JP2222 on Jun 14, 2018, 11:55 pm
I noticed the IDE accesses api-builder.arduino.cc on startup (thank you wireshark) so I blocked access to this host. I added an entry to /etc/hosts like this to blacklist the host.

Code: [Select]
127.0.0.1       api-builder.arduino.cc

Now the IDE starts up with the serial ports listed immediately without having to disconnect the network cable.

Perhaps something has changed on api-builder.arduino.cc.

Thank you very much for this, gets me going on a new IDE again. Hopefully someone gets to the bottom of what is happening, and takes away this unnecessary communication as well.
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 15, 2018, 12:03 am
It will be interesting to see exactly what info is being exchanged AFTER they get the AWS side up and running properly again...



A paranoid person (ahem), might think they could be:

- Collecting code?

- Using our machines for Crypto Mining?


;-)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: rmtucker on Jun 15, 2018, 01:05 am

Adding "127.0.0.1 api-builder.arduino.cc" to the Etc/Hosts file.

That worked a treat on ubuntu 16.04

Thank you :)  :)
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: rmtucker on Jun 15, 2018, 11:52 am
According to:-
https://github.com/arduino/Arduino/issues/7690

It is all innocent and just a problem with a slow server. :smiley-confuse:
Title: Re: Arduino "Ports" Suddenly grayed out
Post by: evanevery on Jun 15, 2018, 03:23 pm
Looks like everything is back to working again this morning.

Hopefully they have learned something from this and will remove that dependency from the IDE to avoid future issues...