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.
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
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.