Error upgrading firmware

Discussion in 'Community Support' started by aka, Dec 8, 2014.

  1. aka


    The newest Argentum Control software prompts me to upgrade the firmware on the Mega board (which is good, because the previous version of the app failed to upgrade it).

    However, the attempt to upgrade fails and tells me to install avrdude (it's installed and working well, so not sure why that's being shown). Looking at the console, I'm seeing a 403 Forbidden error.

    ...I'd prefer for the app to work properly, but if someone had a link to the firmware file it's looking for (it's not at ).


  2. Trent Waddington

    Trent Waddington Staff Member

    Thanks AdamF. I'm looking into this issue and hope to have a more complete solution soon.
  3. Trent Waddington

    Trent Waddington Staff Member

    The short version of this issue is: get avrdude to work with your printer on your machine, and shove any old 32 bit copy of libusb0.dll into your path or next to avrdude.exe and the gui should be able to flash.

    The long version of this issue is long and somewhat amusing:

    In the next release we'll ensure libusb0.dll is shipped, but it does kinda seem like most Windows users are going to have driver troubles out of the box.
  4. aka


    Thanks for the reply - but if I succeed in manually flashing the most recently-available firmware file on the argentum site, I'll have 0.14.

    Because the app itself appears to be trying to find argentum_0_15_1.hex, I'm concerned that I will lose even more time working to install an old version of the firmware.

    Do you know where I can find the most recent firmware hex file online?
  5. I just checked the windows distribution from and argentum_0_15_1.hex was sitting in the main directory. Maybe it's been added since you downloaded it?
  6. I'm using Linux, had similar issues. After much confusion, it finally became clear that the port speed was wrong for what the control software wanted, but it does not set it.
    As a solution, if BEFORE starting I run the command:

    avrdude -c stk500v2 -p atmega2560 -P /dev/ttyACM0 -b 115200 -t

    The -t puts avrdude into terminal mode, from which I just type quit. Now the port speed is setup correctly and can be started.

    Apparently, when Argentum Control receives gibberish from the printer upon startup, due to the port speed being wrong, it assume a need to upgrade the firmware...
  7. Michael Reed

    Michael Reed Staff Member

    Yeah the firmware upgrade check just validates true or false on whether the printer sends out a firmware version equal to what it believes to be the most recent.

    I'll post a Git issue to have it recognize general communications errors too.
  8. Ack, Phppppt! It appears I am having a similar problem. I got my printer in September but was unable to work until this holiday period. It has firmware 0.12 and the gui wants to update, but fails. I tried XLOADER as sugested above, and that failed too.

    The printer is connected, and in Arduino 1.06 I can open a terminal window and see the Argentium on COM12/115200 baud.

    When I try to update from the gui the progress bar runs to 29%/32% and then fails. The DOS window has the following text:
  9. Running: avrdude -v -c stk500v2 -p atmega2560 -P COM12 -b 115200 -D -U flash:w:a

    avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean,
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is "C:\Argentium\Argentum Control-0.15.1

    Using Port : COM12
    Using Programmer : stk500v2
    Overriding Baud Rate : 115200
    avrdude: stk500v2_getsync(): can't communicate with device: resp=0x01
    AVR Part : ATMEGA2560
    Chip Erase delay : 9000 us
    PAGEL : PD7
    BS2 : PA0
    RESET disposition : dedicated
    RETRY pulse : SCK
    serial program mode : yes
    parallel program mode : yes
    Timeout : 200
    StabDelay : 100
    CmdexeDelay : 25
    SyncLoops : 32
    ByteDelay : 0
    PollIndex : 3
    PollValue : 0x53
    Memory Detail :

    Block Poll Page
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
    W ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
    -- ---------
    eeprom 65 10 8 0 no 4096 8 0 9000 90
    00 0x00 0x00
    flash 65 10 256 0 yes 262144 256 1024 4500 45
    00 0x00 0x00
    lfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    hfuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    efuse 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    lock 0 0 0 0 no 1 0 0 9000 90
    00 0x00 0x00
    calibration 0 0 0 0 no 1 0 0 0
    0 0x00 0x00
    signature 0 0 0 0 no 3 0 0 0
    0 0x00 0x00

    Programmer Type : STK500V2
    Description : Atmel STK500 Version 2.x firmware
    Programmer Model: Unknown
    avrdude: stk500v2_command(): warning: unknown, code 0x90
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: stk500v2_getsync(): can't communicate with device: resp=0x01
    avrdude: stk500v2_command(): warning: unknown, code 0x91
    avrdude: stk500v2_command(): warning: unknown, code 0x92
    Hardware Version: 78
    Firmware Version Master : 78.78
    avrdude: stk500v2_command(): warning: unknown, code 0x94
    Vtarget : 4.0 V
    SCK period : 275.7 us

    avrdude: stk500v2_command(): unknown status 0xc8
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    avrdude: stk500v2_command(): unknown status 0x01
    avrdude: stk500v2_disable(): failed to leave programming mode

    avrdude done. Thank you.
  10. One thing I notice. The arduino powers through the USB - when it is plugged in to the computer the red system LEDs are lit up. Is this expected?

    suggestions welcomed.

  11. Ariel

    Ariel Staff Member

    The system LEDs being on when connected to USB in expected.

    As for the failed firmware update :confused: I'll get someone to look at your output as soon as they're free.
  12. Trent Waddington

    Trent Waddington Staff Member

    What happens with XLoader? You're the first to report that option as not working.

    (I'd dearly love to fix the avrdude problems, but at this point I'm starting to feel that XLoader may be the superior solution for Windows.)
  13. Robert, two things:

    First, did you try initially starting avrdude manually in terminal mode, they just type quit, then start

    Second, if you get the latest develop branch from github, this whole port speed issue is mostly fixed. I say mostly because I have still had a couple of problems, but it works 9 time out of 10.
  14. Thanks for all the responses - made some progress, and had an "Ah ha!" moment.

    A goodly portion of the problems with Xloader I encountered were due to the assignment of COM port.

    By setting the printer to use COM2 instead of COM12 then XLoader allowed me to update the firmware. (likely that 2 digit com port addresses were the primary culprit)

    Now the gui.exe doesn't talk to the printer the printer. The initial pop-up says:

    Printer didn't respond.

    I verified that the COM port is set to 2 in the console window and press CONNECT. This error appears in a pop-up.

    could not open port 'COM2': WindowsError(5, 'Access is denied.')

    Using Arduino 1.06 I can open the serial monitor, and see the printer on COM2:

    /Failed to initialise SD card.

    Which would be the version number, plus a bonus message "/Failed to initialise SD card." <-- Note the Australian spelling :)

    In the 0.12 firmware there were additional lines of text describing X and Y platform settings (?) - did not actually write them down - these do not appear in the 0.15.1 firmware.

    Trying to communicate with avrdude gets this:

    avrdude -patmega2560 -b115200 -Pcom2 -cstk500

    avrdude: stk500v2_ReceiveMessage(): timeout

    So some progress made, but still a ways to go. Not quite sure what to try next,
  15. Trent Waddington

    Trent Waddington Staff Member

    Try to get rid of that error message first by inserting a FAT formatted SD card (assuming it's not a hardware problem).

    All I can recommend for the access denied error is rebooting, to ensure no other programs have the port open.

  16. Inserting the SD card fixed the issue. Thank you.

    I think that what is happening is that the SD card error message comes before the firmware verison number, and as a result the gui.exe code is failing to recognize the printer. It leaves the serial port in a funky state (maybe not clening up properly on the error exit), and on a subsequent connect Windows reports an error.

    However it is working, and perhaps this thread will help the next person...

  17. Trent Waddington

    Trent Waddington Staff Member

    Ahh.. that's already fixed on github :)
  18. The example I gave of avrdude usage used dashes for the options, as I use Linux.

    As you use Windows, it probably needs slashes instead of dashes? as that is the DOS/Windows norm.
    Also, there might need to be a space in things? like /P com2, instead of /Pcom2? not sure. I have not much used Windows for anything serious in many years.

    It looks like you mostly have the problem under control anyway though.
  19. 'm new to this all stuff butafter powering up I got something like this (in console window):
    Printer is running version: 0.16.0+20150107
    Updating firmware list.
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "c:\Python27\lib\", line 810, in __bootstrap_inner
    File "c:\Python27\lib\", line 763, in run
    File "C:\Users\paul\Documents\install\Argentum Control-0.15.1.win32\library.zi
    p\", line 330, in updateFirmwareLoop
    File "C:\Users\paul\Documents\install\Argentum Control-0.15.1.win32\library.zi
    p\", line 92, in update_local_firmware
    firmware_list = get_unavailable_firmware()
    File "C:\Users\paul\Documents\install\Argentum Control-0.15.1.win32\library.zi
    p\", line 39, in get_unavailable_firmware
    all_firmware = get_all_firmware()
    File "C:\Users\paul\Documents\install\Argentum Control-0.15.1.win32\library.zi
    p\", line 25, in get_all_firmware
    return parse_firmware_list(firmware_index)
    File "C:\Users\paul\Documents\install\Argentum Control-0.15.1.win32\library.zi
    p\", line 15, in parse_firmware_list
    f = open(filename, 'r')
    IOError: [Errno 2] No such file or directory: 'firmware.txt'

Share This Page