Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. OpenHAB
  4. Beginner - what is wrong

Beginner - what is wrong

Scheduled Pinned Locked Moved OpenHAB
45 Posts 6 Posters 11.3k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xmonika
    wrote on last edited by
    #35

    Unfortunately I didn't solved it, I just gave it up and am waiting for new ISP programmer to arrive. That is the last piece I didn't changed (I have changed computer/SW, sensebender Micro and it didn't helped). Hope you will be more successfull.

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #36

      Only thing that is left, that I can think about, is if itead had somehow forgotten to write the bootloader..

      But then again, I have supplied them with a binary including both bootloader, and default sensebender micro sketch, so it should have the bootloader. Unless they have made some mistakes..

      I haven't bought any sensebenders for the last couple of years, so unfortunately I can't verify this.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zeroxdeadbeef
        wrote on last edited by
        #37

        Thank you for you input. I had luck and we have an AVRISP mk2 lying around in my company that I can borrow for the weekend. So my plan would be to try to re-flash DualOptiboot first or another bootloader (maybe the stock Arduino Pro Mini one) in further tries and see if this helps.

        The only two things I am trying to figure out in this very moment are:

        1. in which direction the ISP cable has to be mounted so that nothing is damaged
        2. and I do not know yet for sure if the AVRISP mk2 is actually suppyling power or not to the board (for cases where e.g. it may feed 5 volts).
        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zeroxdeadbeef
          wrote on last edited by
          #38

          Okay, I have soldered the second Sensebender too and tried to burn the bootloader via Arduino IDE onto both devices. The verbose log was the following:

          
          /home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -Uflash:w:/home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:i -Ulock:w:0x0F:m 
          
          avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
                   Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                   Copyright (c) 2007-2014 Joerg Wunsch
          
                   System wide configuration file is "/home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
                   User configuration file is "/home/x/.avrduderc"
                   User configuration file does not exist or is not a regular file, skipping
          
                   Using Port                    : usb
                   Using Programmer              : stk500v2
          avrdude: usbdev_open(): Found AVRISP mkII, serno: redacted
                   AVR Part                      : ATmega328P
                   Chip Erase delay              : 9000 us
                   PAGEL                         : PD7
                   BS2                           : PC2
                   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                       Polled
                     Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                     ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                     eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                     flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                     lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                     hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                     efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                     lock           0     0     0    0 no          1    0      0  4500  4500 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: AVRISP mkII
                   Hardware Version: 1
                   Firmware Version Master : 1.23
                   Vtarget         : 3.0 V
                   SCK period      : 8.00 us
          
          avrdude: AVR device initialized and ready to accept instructions
          
          Reading | ################################################## | 100% 0.00s
          
          avrdude: Device signature = 0x1e950f (probably m328p)
          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: reading input file "/home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex"
          avrdude: writing flash (32768 bytes):
          
          Writing | ################################################## | 100% 0.00s
          
          avrdude: 32768 bytes of flash written
          avrdude: verifying flash memory against /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:
          avrdude: load data flash data from input file /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:
          avrdude: input file /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex contains 32768 bytes
          avrdude: reading on-chip flash data:
          
          Reading | ################################################## | 100% 0.00s
          
          avrdude: verifying ...
          avrdude: 32768 bytes of flash verified
          avrdude: reading input file "0x0F"
          avrdude: writing lock (1 bytes):
          
          Writing | ################################################## | 100% 0.01s
          
          avrdude: 1 bytes of lock written
          avrdude: verifying lock memory against 0x0F:
          avrdude: load data lock data from input file 0x0F:
          avrdude: input file 0x0F contains 1 bytes
          avrdude: reading on-chip lock data:
          
          Reading | ################################################## | 100% 0.00s
          
          avrdude: verifying ...
          avrdude: WARNING: invalid value for unused bits in fuse "lock", should be set to 1 according to datasheet
          This behaviour is deprecated and will result in an error in future version
          You probably want to use 0xcf instead of 0x0f (double check with your datasheet first).
          avrdude: 1 bytes of lock verified
          
          avrdude done.  Thank you.
          

          Interesting in this log is the warning about the invalid value for some fuse bits...

          Flashing a sketch after re-burning the bootloader sadly did not work, the same not in sync error occured again. Next, I tried to burn the bootloader using the board setting of the Arduino Pro Mini (3.3v, 8mhz). Strange enough, this does not work anymore now, yielding a pretty generic error:

          avrdude: stk500v2_command(): command failed
          avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
          avrdude: initialization failed, rc=-1
                   Double check connections and try again, or use -F to override
                   this check.
          

          I do not know, I can only assume that maybe burning another bootloader does not work because of the invalid value warning while burning the default bootloader. I also tried to burn the original Optiboot without success.

          X 1 Reply Last reply
          0
          • Z zeroxdeadbeef

            Okay, I have soldered the second Sensebender too and tried to burn the bootloader via Arduino IDE onto both devices. The verbose log was the following:

            
            /home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v2 -Pusb -Uflash:w:/home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:i -Ulock:w:0x0F:m 
            
            avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
                     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                     Copyright (c) 2007-2014 Joerg Wunsch
            
                     System wide configuration file is "/home/x/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
                     User configuration file is "/home/x/.avrduderc"
                     User configuration file does not exist or is not a regular file, skipping
            
                     Using Port                    : usb
                     Using Programmer              : stk500v2
            avrdude: usbdev_open(): Found AVRISP mkII, serno: redacted
                     AVR Part                      : ATmega328P
                     Chip Erase delay              : 9000 us
                     PAGEL                         : PD7
                     BS2                           : PC2
                     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                       Polled
                       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                       lock           0     0     0    0 no          1    0      0  4500  4500 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: AVRISP mkII
                     Hardware Version: 1
                     Firmware Version Master : 1.23
                     Vtarget         : 3.0 V
                     SCK period      : 8.00 us
            
            avrdude: AVR device initialized and ready to accept instructions
            
            Reading | ################################################## | 100% 0.00s
            
            avrdude: Device signature = 0x1e950f (probably m328p)
            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: reading input file "/home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex"
            avrdude: writing flash (32768 bytes):
            
            Writing | ################################################## | 100% 0.00s
            
            avrdude: 32768 bytes of flash written
            avrdude: verifying flash memory against /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:
            avrdude: load data flash data from input file /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex:
            avrdude: input file /home/x/.arduino15/packages/MySensors/hardware/avr/1.0.1/bootloaders/DualOptiboot/optiboot_atmega328_pro_8MHz.hex contains 32768 bytes
            avrdude: reading on-chip flash data:
            
            Reading | ################################################## | 100% 0.00s
            
            avrdude: verifying ...
            avrdude: 32768 bytes of flash verified
            avrdude: reading input file "0x0F"
            avrdude: writing lock (1 bytes):
            
            Writing | ################################################## | 100% 0.01s
            
            avrdude: 1 bytes of lock written
            avrdude: verifying lock memory against 0x0F:
            avrdude: load data lock data from input file 0x0F:
            avrdude: input file 0x0F contains 1 bytes
            avrdude: reading on-chip lock data:
            
            Reading | ################################################## | 100% 0.00s
            
            avrdude: verifying ...
            avrdude: WARNING: invalid value for unused bits in fuse "lock", should be set to 1 according to datasheet
            This behaviour is deprecated and will result in an error in future version
            You probably want to use 0xcf instead of 0x0f (double check with your datasheet first).
            avrdude: 1 bytes of lock verified
            
            avrdude done.  Thank you.
            

            Interesting in this log is the warning about the invalid value for some fuse bits...

            Flashing a sketch after re-burning the bootloader sadly did not work, the same not in sync error occured again. Next, I tried to burn the bootloader using the board setting of the Arduino Pro Mini (3.3v, 8mhz). Strange enough, this does not work anymore now, yielding a pretty generic error:

            avrdude: stk500v2_command(): command failed
            avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
            avrdude: initialization failed, rc=-1
                     Double check connections and try again, or use -F to override
                     this check.
            

            I do not know, I can only assume that maybe burning another bootloader does not work because of the invalid value warning while burning the default bootloader. I also tried to burn the original Optiboot without success.

            X Offline
            X Offline
            xmonika
            wrote on last edited by
            #39

            I just have this problem with "programming" solved. I bought this USBISP programmer, downloaded libUSBk drivers from here and pushed it into SBmicro via programmer USBasp. I don't know why but from some reason two UART programmers were not working.

            It may save frustration and time to somebody in future.

            Z 1 Reply Last reply
            0
            • X xmonika

              I just have this problem with "programming" solved. I bought this USBISP programmer, downloaded libUSBk drivers from here and pushed it into SBmicro via programmer USBasp. I don't know why but from some reason two UART programmers were not working.

              It may save frustration and time to somebody in future.

              Z Offline
              Z Offline
              zeroxdeadbeef
              wrote on last edited by
              #40

              @xmonika

              Thanks, I just ordered the same programmer. Let's see if this is working. How did you wire the programmer to the Sensebender? Just asking because the programmer has more pins available than the Arduino board.

              1 Reply Last reply
              0
              • tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #41

                @zeroxdeadbeef

                the SB micro is using the standard 6pin AVR-ISP header.

                Would be interesting to get a memory dump from a fresh SB micro that exhibits the problems with programming.. One of my theories is that it lacks the bootloader, or are misconfigured somehow from the factory.

                1 Reply Last reply
                0
                • X Offline
                  X Offline
                  xmonika
                  wrote on last edited by
                  #42

                  The programmer has 10 pins but the GND is presented 4x. Check the picture [here](http://www.avrfreaks.net/forum/adapter-program-10-pin-6-pin-socket-cable-computer-pc-led-reset-power for wiring, this is how I did it.

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    zeroxdeadbeef
                    wrote on last edited by
                    #43

                    Thanks for your responses. Sadly, both of my devices are not in factory state anymore. Nevertheless, I will report back after I have received this USBISP programmer.

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      zeroxdeadbeef
                      wrote on last edited by
                      #44

                      Hello!

                      Finally, I have received this USB programmer... I wired everything up, but flashing the Sensebender Micros does not work, sadly. According to avrdude they do not seem to respond:

                      avrdude: warning: cannot set sck period. please check for usbasp firmware update.
                      avrdude: error: program enable: target doesn't answer. 1 
                      avrdude: initialization failed, rc=-1
                               Double check connections and try again, or use -F to override
                               this check.
                      
                      Error while burning bootloader.
                      

                      I managed to program and burn the bootloader of a normal Arduino Pro Mini using this programmer and the same cable, so the programmer is working as expected.

                      1 Reply Last reply
                      0
                      • sinczeS Offline
                        sinczeS Offline
                        sincze
                        MySensors Evangelist
                        wrote on last edited by
                        #45

                        Mmm i think I received a DOA... No pling pling sound in windows...

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        36

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular