Every time I connect the Arduino Uno to the Mac through USB port, the Mac restarts. Why is this happening? How can Arduino make such a sophisticated machine reset? This also happens with my ESP12E Node MCU.
-
1Have you considered blaming the cable? The port?– Ignacio Vazquez-AbramsCommented Oct 12, 2016 at 10:46
-
Is the arduino connected to anything else or is the only connection to the computer? It's just as easy if not easier to make a sophisticated machine reset than a simple one.– AndrewCommented Oct 12, 2016 at 10:49
-
Tried using different cable, cant really blame the port because my Mac is pretty new. This is happening ever since i upgraded to Sierra. The Arduino is not connected to anything.– Milap JhumkhawalaCommented Oct 12, 2016 at 10:56
-
1I hope "real computer" isn't meant to start a flame war. We're big boys and girls in this space who use Unix/Linux, Windows, or MacOS on manufactured/purchased or home-built hardware according to what suits our own needs and wants. No one has to change hardware or OS to successfully develop embedded software for Arduino or something else....– JRobertCommented Oct 12, 2016 at 20:59
-
1... I can confirm that Apple hardware and operating systems support Arduino development absolutely as well as do Unix-oid or various flavors of Windows OSes on appropriate hardware. I made a living writing embedded systems with Digital, Data General, IBM, and Dell computers with Digital, Data General, and Microsoft (from DOS onward) operating systems and continue to develop with Apple hardware and operating systems, right up to Sierra including the Sierra betas. They all work. Use what works for you.– JRobertCommented Oct 12, 2016 at 21:04
3 Answers
It is almost certainly a device-driver issue. Since Arduinos are probably a little way down the pecking order for things that Apple is interested in, they probably don't test as extensively as (say) printers.
How can Arduino make such a sophisticated machine reset?
Device drivers would operate with elevated privileges, because they need to control, well, devices, like hard disks, printers, etc. If one has a programming error (like dereferencing a NULL pointer) then it could crash the whole operating system.
I suggest you look at this page: IDE 1.6.12 released with Sierra support and more
It says there:
A new version of the Arduino IDE (1.6.12) supporting OSX Sierra is available for download! All OSX users updating to Sierra are invited to also update the IDE to avoid crashes when uploading sketches.
This may or may not help. They seem to be suggesting that the IDE crashes rather than the Mac, but it could be worth trying.
There are some posts on macOS Sierra Usb Serial Crash which seem relevant:
I need to use a arduino nano and my Mac with mac os sierra is rebooted when i plug in the arduino
It sounds like the CH340 chip set used on clone Arduinos is causing this.
A suggested new device driver fix is at ch340g-ch34g-ch34x-mac-os-x-driver
-
2It's generally not "Arduinos" as such. Mainstream Arduinos with FTDI USB to serial chips or ATmegaXXu[24] microcontrollers are supported by drivers shipping with the OS, and those tend to be tested and work. The problem tends to be with clones using CH340 based USB to serial chips, which are supported by vendor drivers of dubious reliability (though there are quite reliable third party drivers for them). Commented Jan 18, 2017 at 6:04
i have had the same problem and found that the CH340 driver was at fault. With the Arduino MEGA clone attached to the computer, it would throw a kernal panic at startup, then keep restarting over and over.
With the clone unhooked, the computer started normally. Therefore the driver when trying to load at startup was cauing a panic.
I went back to the web site and found an “updated” driver that solved the panic problem. It starts and runs OK, BUT -
- Every print command prints twice. A simple “Hello World” prints twice.
I don't have a solution for the double print.
- The program would compile, but never load in to the clone. When I switched the USB cable from a 6ft one to the included 1 ft blue one, it worked.
My MacOS is High Sierra 10.13.4 the simple solution is :
Download CH341SER_MAC.zip from here https://github.com/awangga/NFCReader/raw/master/driver/CH341SER_MAC.zip
remove old driver, please open terminal and run command:
rm -rf /System/Library/Extensions/usbserial.kext
rm -rf /Library/Extensions/usbserial.kext
Unzip CH341SER_MAC and install CH34x_Install_V1.4.pkg then restart MAC,
after rebooting login to your MAC and open terminal, Conect arduino into your Mac and Look at your serial folder : ls /dev/
You can access your Arduino on /dev/cu.wchusbserialfa130 or /dev/tty.wchusbserialfa130 or just type : ls /dev/cu. then tab twice.