OpenSprinkler Forums OpenSprinkler Unified Firmware avrdude on linux terminal

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #38692

    ottorino
    Participant

    Hi all,
    I’m trying to update my old firmware (2.0.9 on OS 2.1) to 2.1.5
    https://opensprinkler.com/forums/topic/unwanted-loop-caused-a-large-waste-of-water/#post-38436

    I’ve been following the instructions for the GUI but to no avail.
    Then Samer told me that I should run a command in the old good terminal.
    https://opensprinkler.com/forums/topic/announcing-opensprinkler-unified-firmware-2-1-5-major-bug-fix/#post-38583

    I’ve found the complete command here
    https://opensprinkler.com/forums/topic/firmware-update-problems-hardware-version-2-1/#post-36533

    From this directory
    ~/Scaricati/Firmware-Updater-master/Firmwares/OpenSprinkler_v2.1 $

    and after connecting to an USB port the OS device (B2 released after 2 sec) I run:

    avrdude -c usbasp -p m644p -U flash:w:firmware2.1.5.hex
    

    This is the answer:

    avrdude: Warning: cannot query manufacturer for device: error sending control message: Operation not permitted
    avrdude: Warning: cannot query product for device: error sending control message: Operation not permitted
    avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
    
    avrdude done.  Thank you.

    I also tried the command as su

    sudo avrdude -c usbasp -p m644p -U flash:w:firmware2.1.5.hex
    
    avrdude: warning: cannot set sck period. please check for usbasp firmware update.
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e9609
    avrdude: Expected signature for ATmega644P is 1E 96 0A
             Double check chip, or use -F to override this check.
    avrdude: error: usbasp_transmit: error sending control message: Protocol error
    
    avrdude done.  Thank you.
    

    What obvious thing am I missing here ?

    PS
    Last time I did an update, I had problems with USB 3.0 port
    http://rayshobby.net/phpBB3/viewtopic.php?f=2&t=758&start=10#p5275
    I tried both ports, but the result is the same. Now I’m on Mint Qiana with MATE

    Here the relevant line of lsusb, when the OS is connected in bootloader mode

    Bus 001 Device 022: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb

    #38702

    cuteboi
    Participant

    You have to use sudo or the root user, OR add your user to use the serial console without question. I posted this in the update page.

    #38703

    ottorino
    Participant

    Yes, I already sent the command as sudo, but without success

    #38704

    cuteboi
    Participant
    #38705

    cuteboi
    Participant

    lsusb to list out your usb devices, a strange looking entry should appear, also the tail of your dmesg or var log system messages should say it was able to initialize. If it was unable to initialize, power down your computer system, and start it up again. It’s typically a USB port protection to disable certain devices if they are known to cause issues during your computing session (stored on the USB chipset).

    A powerdown/powerup (not a reboot) would reinit the chipset completely.

    #38706

    ottorino
    Participant

    It seems that I’m missing a “-F” here.

    What I sent
    sudo avrdude -c usbasp -p m644p -U flash:w:firmware2.1.5.hex

    what I’m supposed to send

    sudo avrdude -c usbasp -p -F m644p -U flash:w:firmware2.1.5.hex
    

    I suspected this since an answer was;

    > Double check chip, or use -F to override this check.

    Should I “force” the command ?

    @ cuteboi I already wrote the lsusb outcome in my first post

    From avrdude masnual

    -F      Normally, avrdude tries to verify that the device signature
                       read from the part is reasonable before continuing.  Since
                       it can happen from time to time that a device has a broken
                       (erased or overwritten) device signature but is otherwise
                       operating normally, this options is provided to override
                       the check.  Also, for programmers like the Atmel STK500 and
                       STK600 which can adjust parameters local to the programming
                       tool (independent of an actual connection to a target con‐
                       troller), this option can be used together with -t to con‐
                       tinue in terminal mode.
    #38724

    Ray
    Keymaster

    @ottorino: according to the output of avrdude, you have successfully upgraded your firmware. The warning messages have to do with the behavior of the bootloader upon reset, and the warning about chip signature is normal (2.1 uses ATmega644 whereas the command you are running is for ATmega644p. The p version is the same as non-p except it’s pico-power, and has a different signature).

    #38732

    ottorino
    Participant

    @ray: infact the app is no longer showing the red alert on the upper right. But I’m baffled: the very same app insists on telling me that the firmware is still 2.0.9. (From information: app 1.4.5)
    Which part of the app is trustable ?

    I lean on the side of the old firmware: the old programs are still there without restoring them from the backup

    #38734

    Samer
    Keymaster

    The notification regarding a new firmware is not shown again if you pushed “dismiss”, until a newer version is released. This likely why you are not seeing the notification anymore.

    #38739

    ottorino
    Participant

    Thanks Samer. I actually do not remember to have dismissed the notification: but evidently this was the case

    I finally succeeded to upgrade to 2.1.5: the right command for OS 2.1 was

    sudo avrdude -c usbasp -F -p m644 -U flash:w:firmware2.1.5.hex
    which gave

    avrdude: warning: cannot set sck period. please check for usbasp firmware update.
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e9609
    avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
    avrdude: erasing chip
    avrdude: warning: cannot set sck period. please check for usbasp firmware update.
    avrdude: reading input file "firmware2.1.5.hex"
    avrdude: input file firmware2.1.5.hex auto detected as Intel Hex
    avrdude: writing flash (56878 bytes):
    
    Writing | ################################################## | 100% 3.97s
    
    avrdude: 56878 bytes of flash written
    avrdude: verifying flash memory against firmware2.1.5.hex:
    avrdude: load data flash data from input file firmware2.1.5.hex:
    avrdude: input file firmware2.1.5.hex auto detected as Intel Hex
    avrdude: input file firmware2.1.5.hex contains 56878 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 2.71s
    
    avrdude: verifying ...
    avrdude: 56878 bytes of flash verified
    
    avrdude: safemode: Fuses OK (H:00, E:00, L:00)
    avrdude: error: usbasp_transmit: error sending control message: Protocol error
    
    avrdude done.  Thank you.
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware avrdude on linux terminal