AlanChatham / UnoJoy

UnoJoy! allows you to easily turn an Arduino Uno (or Mega or Leonardo) into a PS3-compatible USB game controller
GNU General Public License v3.0
482 stars 130 forks source link

--force needed on Mac OS X Catalina #39

Open mircobabini opened 3 years ago

mircobabini commented 3 years ago

First of all, under catalina the path to the USB analysis is different: About this Mac > System report... and so on.

Then, when in DFU mode, the Arduino is seen Composite Device.

Then, I had this error running the script to get it back to an Arduino:

$ sh TurnIntoAnArduino.sh
.
Like magic.
Trying to program for Arduino Uno R1/R2...
dfu-programmer: no device present.
We didn't find the R1/R2 model, checking for an R3...
Checking memory from 0x0 to 0xFFF...  Not blank at 0x1.
The target memory for the program is not blank.
**Use --force flag to override this error check.**

dfu-programmer couldn't connect to the Arduino...
Did you put the Arduino into DFU mode?
Did you run the script as a root user?

Solved it by adding the --force option to the dfu-programmer script: dfu-programmer atmega16u2 flash Arduino-usbserial-uno.hex --force

Done. Don't want to pull a request with the --force param into it. Instead, I think that when the shell says "Use --force flag..." should be handled by the TurnIntoAnArduino.sh this way:

$ sh TurnIntoAnArduino.sh --force

And yes, I'm not a bash addicted, so I can't provide you a pull request. I'm sorry :)

titulebolide commented 3 years ago

I encountered the same issue, and solved the same way