Show Posts
Pages: [1]
1  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: December 03, 2012, 02:37:26 am
hahaha it worked.  that firmware didn't know what hit it.  ITS GONE.  erased.

Watch me take over the world by creating sick USB interfaces.  PEACE

thank you nueh
2  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: December 02, 2012, 02:36:10 pm
I downloaded the file you attached to my desktop and ran the .config from there.

This is how I tried to run what you suggested (I wanted to make sure these were directories as I went along):

Code:
Adam-Rolphs-iMac-3:~ adamrolph$ /usr
-bash: /usr: is a directory
Adam-Rolphs-iMac-3:~ adamrolph$ /usr/local
-bash: /usr/local: is a directory
Adam-Rolphs-iMac-3:~ adamrolph$ /usr/local/bin
-bash: /usr/local/bin: is a directory
Adam-Rolphs-iMac-3:~ adamrolph$ /usr/local/bin/dfu-programmer
-bash: /usr/local/bin/dfu-programmer: No such file or directory

Obviously something is wrong there.

But, I took what you said and tried running it from where I think I installed it and this is what I got:

Code:
Adam-Rolphs-iMac-3:~ adamrolph$ /Users/adamrolph/Desktop/DFU/dfu_programmer_install/dfu-programmer
-bash: /Users/adamrolph/Desktop/DFU/dfu_programmer_install/dfu-programmer: is a directory
Adam-Rolphs-iMac-3:~ adamrolph$ sudo /Users/adamrolph/Desktop/DFU/dfu_programmer_install/dfu-programmer atmega16u2 erase
sudo: /Users/adamrolph/Desktop/DFU/dfu_programmer_install/dfu-programmer: command not found


I also tried creating a new directory, redownloading the patch you attached, and installing from there, but after I get to the actual dfu-programmer part of the file directory, it's saying the directory I created doesn't  exist even though I am copy pasting the directory of the newly downloaded dfu-programmer from the "get info" tab
3  Using Arduino / Interfacing w/ Software on the Computer / Re: best interface for 5th graders on: December 02, 2012, 01:55:39 pm
Here is a link to the IDE you will need: http://arduino.cc/en/Main/Software

You will probably want to use Arduino Uno Rev3's, which can be bought at any electronics store worth your time.

You should have them try this tutorial, and then have them change how long the light blinks for within the code by changing the number of milliseconds in the parameter list of the delay function.
http://www.arduino.cc/en/Tutorial/BlinkingLED

Good luck and may the force be with you
4  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: December 02, 2012, 12:49:45 pm
When I do that, the menu prints back out and the
Code:
no device present
error is gone.  This is awesome, but no matter what combination of erase, reset, or flash (a different hex file) I do, even with the menu printing back after each command, the arduino still functions normally in the Arduino IDE and continues to appear as an Arduino in the port manager after each plug cycle, even though it appears as a "composite device" before I plug cycle it, and after I short the pins. (which would be when I perform the operations via dfu-programmer).  Any ideas?  Thanks for all your help nueh

edit: There is no atmega16u2 option when the menu prints, so when I am entering what you suggested I think the dfu-programmer menu is just reprinting because the terminal is recognizing the first part of the command, which is "dfu-programmer".  I think that the atmega16u2 may not be visible because I am using an unpatched version of dfu-programmer somehow.  Should I attempt to reinstall?
5  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: December 02, 2012, 01:55:11 am
I have been able to confirm that my Arduino Uno is in DFU mode.  By checking in "About this mac", "System Report", and "USB" I have been able to see the my Arduino recognized in two states, depending on whether or not the pins have been shorted.  (when I short the pins it is no longer recognized as an Arduino, but a different device from "atmega corp")  This means the chip is in DFU programming mode and can have its firmware updated.

I am still having trouble with dfu-programmer though.  The dfu-programmer menu prints out, but when trying to erase the firmware on the Arduino I still get the error
Code:
no device present

I have found a thread where somebody seems to have had the exact same problem I am having, and was able to solve it, but they did not post exactly how they did it.  They just said that they weren't actually running things as a root user and were able to and that solved it for them.

The thread is here: http://arduino.cc/forum/index.php?topic=99902.15

If anybody can make more sense of it than I can I would really appreciate some insights.  I am very discouraged at this point.  All libraries seem to have been installed, the chip is clearly in DFU mode, so I really don't know what else to do, except to uninstall and reinstall all of the tools I have downloaded..

Edit: upon further investigation, I am relatively sure that my issue is that I am running the unpatched version of dfu-programmer from within the terminal, even though there is a patched version on my machine.  Can anybody help me figure out how I would use the patched one over the unpatched one?  Or is this issue even possible? There are like 10 different versions of dfu-programmer on my machine right now.

Thanks for any help
6  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: December 01, 2012, 06:35:42 pm
I've been able to successfully install and patch dfu-programmer now, thanks to the information you've provided.  Thanks.

Unfortunately I'm still having trouble flashing firmware.  When I short the two pins on the ISP header closest to the USB port in order to put the Uno r3 16u2 into DFU mode, the serial port in the native Arduino IDE goes away.  So, I am relatively certain the board is in DFU mode.

However, when I run sudo
Code:
dfu-programmer at90162 erase
I still get the error
Code:
dfu-programmer: no device present.

I have the menu for dfu programmer printing, as well as the menu from Macports, which can be seen here:

Code:
Adam-Rolphs-iMac-3:~ adamrolph$ port search libusb
libusb @1.0.9 (devel)
    library for USB device access

libusb-compat @0.1.4 (devel)
    library for USB device access

libusb-devel @1.0.8.20101017 (devel)
    library for USB device access

libusb-legacy @0.1.12 (devel)
    Library providing access to USB devices

Found 4 ports.

This post by member Stimmer may be helpful to me but I do not know how to run the commands mentioned in it:

Quote
Both dmesg and lsusb should confirm the device mode change. If there's just a reset without a mode change dmesg should confirm that too.

Any help is appreciated thank you.
7  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: November 28, 2012, 07:52:57 pm
When I try to run it with the Arduino plugged in and set to DFU mode I see this:

Code:
Adam-Rolphs-iMac-3:~ adamrolph$ /Users/adamrolph/Downloads/dfu-programmer atmega16u2 reset
dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
  Referenced from: /Users/adamrolph/Downloads/dfu-programmer
  Reason: image not found
Trace/BPT trap: 5

I'm sorry that my knowledge of the terminal is so limited..  I have learned how to use IDE's at my school but I have never done this before and I am having a lot of trouble.  Your help is very appreciated thank you
8  Using Arduino / Interfacing w/ Software on the Computer / Re: uno rev3 16u2 firmware flashing with dfu-programmer on: November 26, 2012, 01:55:51 pm
I see.  Thank you.

Can I move forward with performing the binary install by looking up steps on how to do that, or do I need to uninstall my current dfu 0.5.4 first?

I'm getting this when I try to run the configure file in the install you attached

Code:
Last login: Mon Nov 26 11:17:43 on ttys000
Adam-Rolphs-iMac-3:~ adamrolph$ /Users/adamrolph/Desktop/OSX-dfu-programmer-binary/dfu_programmer_install_src/dfu-programmer/configure ; exit;
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /Users/adamrolph/Desktop/OSX-dfu-programmer-binary/dfu_programmer_install_src/dfu-programmer/m4/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
configure: error: source directory already configured; run "make distclean" there first
logout

[Process completed]



This is what I got when I ran the executable file
Code:
Last login: Mon Nov 26 11:18:26 on ttys000
Adam-Rolphs-iMac-3:~ adamrolph$ /Users/adamrolph/Desktop/OSX-dfu-programmer-binary/dfu-programmer ; exit;
dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
  Referenced from: /Users/adamrolph/Desktop/OSX-dfu-programmer-binary/dfu-programmer
  Reason: image not found
Trace/BPT trap: 5
logout

[Process completed]



Thanks for any help.  I just want to be able to flash memory so I can start learning how to code drivers..  setting up the proper workspace in the terminal really has me hung up.
9  Using Arduino / Interfacing w/ Software on the Computer / uno rev3 16u2 firmware flashing with dfu-programmer on: November 25, 2012, 12:43:13 am
I'm trying to get my Arduino Uno r3 into DFU mode in order to flash new firmware to it using Macports and DFU programmer.
I want to do this so I can use it as a USB recognized device.

I am using:
Mac OSX Lion v. 10.7.5
dfu-programmer 0.5.4
Arduino Uno R3

I have been following the directions given from this post:

Quote
Title: Re: Resetting the Arduino Uno R3 Atmega16U2
Post by: dhunt on February 19, 2012, 12:27:20 AM
I got the dfu-programmer to build on OSX Lion 10.7.3 with the following steps:

    Install Xcode 4.3 from the Appstore
    Install Xcode command line tools from Xcode preferences (see https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html (https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html)).
    Tell Xcode where Xcode is installed: sudo xcode-select -switch /Applications/Xcode.app
    Set up a link for the missing clang executable: cd /Applications/Xcode.app/Contents/Developer/usr/bin; sudo ln -s clang llvm-gcc; cd -
    Install macports from http://www.macports.org/ (http://www.macports.org/)
    Install autoconf tools via macports: sudo port install pkgconfig automake
    Install libusb via macports: sudo port install libusb-devel ******this is where I encounter my problem please see below for details**********
    Configure and build dfu-programmer: cd dfu-programmer-0.5.4; ./bootstrap.sh; ./configure; ./make; ./sudo make install


After this you should be pretty much set for building other packages and tools too. You can also search for available packages using the macports search command.

For example:
port search libusb
libusb @1.0.8 (devel)
    library for USB device access

libusb-compat @0.1.3 (devel)
    library for USB device access

libusb-devel @1.0.8.20101017 (devel)
    library for USB device access

libusb-legacy @0.1.12 (devel)
    Library providing access to USB devices

Here is the result of me running: sudo port install libusb-devel
Code:
--->  Configuring libusb-devel
Error: [b]Please do not install this port since it has been replaced by 'libusb'.[/b]
Error: org.macports.configure for port libusb-devel returned:
Please see the log file for port libusb-devel for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb-devel/libusb-devel/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libusb-devel failed


Some assorted findings I have made:
The r3 is supposed to enter DFU mode more easily than previous versions of Arduino, but it seems that I may have been better off with an Arduino r2.   I might be encountering problems because the 16u2 chip (which is on the uno r3) is possibly not supported by tools I want to use. (dfu-programmer) However, the 8u2 chip, which is on the uno r1 and r2, is.

The "no device present" was my original error, but after having shorted the pins correctly on my Arduino and no longer being able to see it in the Arduino IDE, I am pretty sure it entered DFU mode correctly.  Maybe it did not? I have never successfully reflashed the 16u2 chip on my Arduino at any point, it still contains its original hex file

I think my main problem is that when I try to install usb-devel I get this error Please do not install this port since it has been replaced by 'libusb'

I've used the following tutorials and sources:

http://arduino.cc/en/Hacking/DFUProgramming8U2
http://mitchtech.net/arduino-usb-hid-keyboard/
http://arduino.cc/forum/index.php?topic=28734.0

A source which has claimed to have updated dfu programmer for r3:
https://code.google.com/p/unojoy/issues/detail?id=1

Thanks so much for any help
Pages: [1]