Hacking/Making "/>

Too many USB Serial’s listed in OSX Network

15 July 2020 at 2:44 pm

Article image for Too many USB Serial’s listed in OSX Network

​My MacBook suddenly quit reconnecting to wifi and it was also not able to see any wifi access points any more. The solution to this is far from obvious, but in my case its related to my job as a hardware developer. I basically had too many Network Services installed due to plugging in several hundred different microcontrollers.

Given that most people will never plug a single microcontroller (or any other Serial device) into their machine, this is a fairly exotic problem. I went to my certified Apple Store and asked them if they had any idea what this could be. They bounced it it around the service technicians and finally one of them remembered that they had had this problem with one of their own machines.

This was the machine they used for testing all sorts of exotic stuff that customers bring in. Every time a new device with a Serial port is plugged into a Mac, it will assign it a brand new Network Service. By default, this service will have a priority that is higher than Wifi, so if you install more devices than some Apple developer thought to be likely - the machine will just give up and say that there’s no networks available. I do not know the exact number of devices you need to connect for this to trigger, but it’s above 300 and likely closer to 500.

I would suggest that this is a bug in OSX, as you would never (under normal circumstances) want Serial devices to have a higher priority than Wifi, Bluetooth or Thunderbolt. Also - there should not be a maximum number. The solution they used for this problem at my local Apple Center was to just reinstall the entire machine. That’s quite easy to say if it’s just a testing device, but as a developer with maybe 50 different tools that require command line setup - you just don’t want to break this. It just takes too much time to get it all working again.

To try to solve this, I manually deleted all the irrelevant Serial devices (puhhh…..) but it did not solve the problem. It was obvious that the OS had this cached somewhere, but where on earth is that stored?

Solving it without reinstalling

It took me many hours of Google-fu to find a correct answer, so I’m posting it here for others to find. Any of the logical search-words will just return irrelevant results, but I finally hit jackpot. This post tells where these files are stored on OSX and that it’s safe to just delete them. You just open a Terminal and type this:

cd /Library/Preferences/SystemConfiguration/ sudo rm com.apple.airport.preferences.plist sudo rm preferences.plist 

I did not have to delete the third file mentioned on discussions.apple.com. This will likely also solve similar problems, so if you have a lot of Network Services listed in the “Network control panel” and your Apple MacBook takes forever to list available networks, it is worth trying this trick.