MYSBootloader 1.3.0-beta.3



  • @gohan So is it first reboot. Or start flashing - reboot?


  • Mod

    You assign firmware to upload to node and then you send a reboot, if I remember correctly


  • Plugin Developer

    @moskovskiy82 If you use MyController, Yes, you should assign the firmware for the node and send reboot.



  • @jkandasa Thank you!

    One more question. Now need to use a 3,3V arduino Pro (chinese version) (Nano and 5V version flashed via the uno without a hitch)

    This is what i put into boards.txt The MYSBootloader_8Mhz.hex is from the dev branch

    proMYSBL8.name=ATmega328 8Mhz MYSBootloader
    
    proMYSBL8.name=ATmega328 internal 8Mhz with MYSBootloader
    proMYSBL8.upload.tool=avrdude
    proMYSBL8.upload.protocol=arduino
    proMYSBL8.upload.maximum_size=30720
    proMYSBL8.upload.maximum_data_size=2048
    proMYSBL8.upload.speed=57600
    proMYSBL8.bootloader.tool=avrdude
    proMYSBL8.bootloader.low_fuses=0xE2
    proMYSBL8.bootloader.high_fuses=0xDA
    proMYSBL8.bootloader.extended_fuses=0x06
    proMYSBL8.bootloader.unlock_bits=0x3F
    proMYSBL8.bootloader.lock_bits=0xFF
    proMYSBL8.bootloader.file=MySensors/MYSBootloader_8Mhz.hex
    proMYSBL8.build.mcu=atmega328p
    proMYSBL8.build.f_cpu=8000000L
    proMYSBL8.build.board=AVR_UNO
    proMYSBL8.build.core=arduino
    proMYSBL8.build.variant=standard
    

    Tried to flash the mysbootloader but get the following error

    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x06:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m 
    
    avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
    
             Using Port                    : COM7
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             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 : STK500
             Description     : Atmel STK500 Version 1.x firmware
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.03s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: erasing chip
    avrdude: reading input file "0x3F"
    avrdude: writing lock (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x3F:
    avrdude: load data lock data from input file 0x3F:
    avrdude: input file 0x3F contains 1 bytes
    avrdude: reading on-chip lock data:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    avrdude: reading input file "0x06"
    avrdude: writing efuse (1 bytes):
    
    Writing |  ***failed;  
    ################################################## | 100% 0.07s
    
    avrdude: 1 bytes of efuse written
    avrdude: verifying efuse memory against 0x06:
    avrdude: load data efuse data from input file 0x06:
    avrdude: input file 0x06 contains 1 bytes
    avrdude: reading on-chip efuse data:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: verifying ...
    avrdude: WARNING: invalid value for unused bits in fuse "efuse", 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 0xfe instead of 0x06 (double check with your datasheet first).
    avrdude: 1 bytes of efuse verified
    avrdude: reading input file "0xDA"
    avrdude: writing hfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of hfuse written
    avrdude: verifying hfuse memory against 0xDA:
    avrdude: load data hfuse data from input file 0xDA:
    avrdude: input file 0xDA contains 1 bytes
    avrdude: reading on-chip hfuse data:
    
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloader_8Mhz.hex:i -Ulock:w:0xFF:m 
    
    avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
    Reading | ################################################## | 100% 0.01s
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    
             Copyright (c) 2007-2014 Joerg Wunsch
    avrdude: verifying ...
    
    avrdude: 1 bytes of hfuse verified
             System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
    avrdude: reading input file "0xE2"
    avrdude: writing lfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of lfuse written
    avrdude: verifying lfuse memory against 0xE2:
    avrdude: load data lfuse data from input file 0xE2:
    avrdude: input file 0xE2 contains 1 bytes
    avrdude: reading on-chip lfuse data:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lfuse verified
    
    avrdude done.  Thank you.
    
    
             Using Port                    : COM7
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             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 : STK500
             Description     : Atmel STK500 Version 1.x firmware
             Hardware Version: 2
             Firmware Version: 1.18
             Topcard         : Unknown
             Vtarget         : 0.0 V
             Varef           : 0.0 V
             Oscillator      : Off
             SCK period      : 0.1 us
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.02s
    
    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 "C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloader_8Mhz.hex"
    avrdude: writing flash (32754 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 32754 bytes of flash written
    avrdude: verifying flash memory against C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloader_8Mhz.hex:
    avrdude: load data flash data from input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloader_8Mhz.hex:
    avrdude: input file C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloader_8Mhz.hex contains 32754 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: verification error, first mismatch at byte 0x7800
             0x00 != 0x11
    avrdude: verification error; content mismatch
    
    avrdude done.  Thank you.
    
    Error while burning bootloader.
    
    


  • @moskovskiy82 My boards.txt specify bootloader.low_fuses=0xF7 as the Arduino being programmed has a crystal on board.

    One other thing: I built my own programming board, to support programming ATMega 328p chips and Pro boards in 3.3v@8MHz and 5v@16Mhz... I used a switch and a level converter board to connect the Uno ICSP port to the pins of the Pro.

    Uno pins are 5V output, they would burn the input pins of the 3.3v Pro chip, did you account for that ?


  • Mod

    You can use 5v to program a 3.3v pro mini as the chip is the same, one is only clocked down to 8Mhz in order to be stable at 3.3v



  • @gohan I beg to differ. On Page 299 of Atmel's ATMega 328p datasheet you can verify that the Absolute Maximum Ratings table states : "Voltage on any Pin except RESET with respect to Ground . . . . . . . . . .-0.5V to VCC+0.5V" which adds to 3.8V for a 3.3V Pro.

    And also: *NOTICE: Stresses beyond those listed under โ€œAbsolute Maximum Ratingsโ€ may cause permanent damage to the device.

    Perhaps you have mistaken the Pro for the NRF24L01+ radio which is supplied by 3.3v but has 5Volt tolerant inputs ?

    Otherwise there would be no need for those USB to FTDI boards with 3v3/5V selection jumpers ...


  • Mod

    I programmed the pro mini with 5v and it worked. Maybe I was lucky. The 3v ftdi adapter is mandatory for esp8266 for example.



  • @tekka for OSX, the sequencing of flags matters. So, line 45 can be:

    $(PROJECT).o: $(PROJECT).c
    "$(BINPATH)avr-gcc" $(CFLAGS) -I$(INCLUDES) $< -o $@
    

    can be improved to

    $(PROJECT).o: $(PROJECT).c
    "$(BINPATH)avr-gcc" -I$(INCLUDES) $(CFLAGS) $< -o $@
    

    and it all works.

    Also, if anyone is getting error for "avr-gcc" not found, then just add the path to avr-gcc in your path.


  • Admin

    @Bhavin-Doshi Thanks for reporting - could you prepare a PR?
    https://github.com/mysensors/MySensorsBootloaderRF24




  • Admin

    @Bhavin-Doshi PR merged. Thank you!



  • @tekka, I am planning to move from MySensors v2.0.0 to v2.1.1, do I need to use the updated MYSBootloader? Currently I am using MYSBootloader 1.3 pre-relase (https://forum.mysensors.org/topic/3453/mysbootloader-1-3-pre-release-myscontroller-1-0-0beta).

    Can you please also help me understand the differences in the low_fuses and high_fuses values in the older version of bootloader and the latest version?


  • Admin

    @nagurao.basude no, you don't need to but the new version has some stability improvements. The fuse differences are to better match HW (osc type) & clearing eeprom.

    AVR fuse calculator: http://www.engbedded.com/fusecalc/


  • Hardware Contributor

    Hello, has someone used the 1MHz precompiled bootloader ? If yes what baud rate did you use to communicate via serial ?
    I flashed it on a node but I can't upload any script ("not in sync" error). If I believe HW.h it should be 9600 bauds but I have tried hat and nearly every baudrate with no luck.
    I had no problem using the 8MHz version.

    The only way I could use the 1MHz bootloader at the moment is to flash the hex file containing both bootloader and script.
    Sorry to ask this stupid question, I wanted to compile the bootloader but Internet connection is nearly down and I can't even download Atmel Studio ๐Ÿ˜ž



  • @tekka Thank you very much for the response. I will just start migrating my existing nodes to MySensors v2.1.1library.



  • @tekka try as I might, I can't get the nodes to respond to the new 'signal report' option in MYS Controller, any ideas why?


  • Admin

    @Mark-Swift This feature only works on MySensors >=2.2.0



  • @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift This feature only works on MySensors >=2.2.0

    @tekka I'm using the latest dev branch on all my nodes and gateway...


  • Admin

    @Mark-Swift Hmm, that's odd - just tested it here with the latest dev and all is ok. Can you post the logs + node sketch?



  • Hello,

    I have notice strange behavior with MYSBootloaderV13pre.hex 8MHz internal bootloader.

    Problem: When I burn MYSBootloaderV13pre.hex 8MHz internal bootloader to my Standalone Atmega328p i testing it with Arduino Blink and Fade sketches. Problem is that theese sketches doesn't work on this bootloader. LED is just always ON.

    I also tested the same sketches, same wiring, same Arduino Uno (5V when programming), same FTDI programmer (3.3V), same PC with Win 10 with same drivers, same Atmega328p with Nick Gammon Atmega Board Programmer when I burn Lilypad bootloader and then upload Blink and Fade sketches, they perfectly working.

    I tried same uploading with Arduino IDE 1.6.5 and also with the newest version 1.8.5.
    As a programmer I using Arduino as ISP. I theese tests when burning bootloader I don't connect external oscilator.

    With Nick Gammon software I also checked fuses for both Lilypad and MYSBootloader settings, becose i was thought it is becose of them. Once I configure wrong fuses and it had a lot of time to reset it to default value.
    Question: So now before changing fuses I want to ask maybe someone have been faced with similar problem?

    I paste below info about Lilipad and MYSBootloader 8MHz internal oscilator boards fuse settings:

    Lilypad bootloader
    
    Atmega fuse calculator.
    Written by Nick Gammon.
    Version 1.11
    Compiled on Nov 30 2017 at 17:36:58 with Arduino IDE 10805.
    Attempting to enter programming mode ...
    Entered programming mode OK.
    Signature = 0x1E 0x95 0x0F 
    Processor = ATmega328P
    Flash memory size = 32768
    LFuse = 0xE2 
    HFuse = 0xDA 
    EFuse = 0xFD 
    Lock byte = 0xEF 
    Clock calibration = 0x8E 
    External Reset Disable.................. [ ]
    Debug Wire Enable....................... [ ]
    Enable Serial (ICSP) Programming........ [X]
    Watchdog Timer Always On................ [ ]
    Preserve EEPROM through chip erase...... [ ]
    Boot into bootloader.................... [X]
    Divide clock by 8....................... [ ]
    Clock output............................ [ ]
    Bootloader size: 2048 bytes.
    Start-up time: SUT0: [X]  SUT1: [ ] (see datasheet)
    Clock source: calibrated internal oscillator.
    Brownout detection at: 2.7V.
    
    MYSBootloaderV13pre bootloader
    
    Atmega fuse calculator.
    Written by Nick Gammon.
    Version 1.11
    Compiled on Nov 30 2017 at 19:48:16 with Arduino IDE 10805.
    Attempting to enter programming mode ...
    Entered programming mode OK.
    Signature = 0x1E 0x95 0x0F 
    Processor = ATmega328P
    Flash memory size = 32768
    LFuse = 0xE2 
    HFuse = 0xD2 
    EFuse = 0xFE 
    Lock byte = 0xFF 
    Clock calibration = 0x8E 
    External Reset Disable.................. [ ]
    Debug Wire Enable....................... [ ]
    Enable Serial (ICSP) Programming........ [X]
    Watchdog Timer Always On................ [ ]
    Preserve EEPROM through chip erase...... [X]
    Boot into bootloader.................... [X]
    Divide clock by 8....................... [ ]
    Clock output............................ [ ]
    Bootloader size: 2048 bytes.
    Start-up time: SUT0: [X]  SUT1: [ ] (see datasheet)
    Clock source: calibrated internal oscillator.
    Brownout detection at: 1.8V.
    

    I appreciate any helpful info!

    EDIT: I think I already found that there is newer MYSBootloader files of development version which working without problems. I will test it if I write good fuses ๐Ÿ™‚



  • @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift Hmm, that's odd - just tested it here with the latest dev and all is ok. Can you post the logs + node sketch?

    @tekka, just tried again, perhaps I'm missing something obvious?

    I have the gateway and node using the latest dev branch, I click the node in MYS and then request a signal report - I see a tx in the log but nothing further? Do I need anything in the node sketch or the gateway? Does this work with the NRF's?


  • Admin

    @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift Hmm, that's odd - just tested it here with the latest dev and all is ok. Can you post the logs + node sketch?



  • Hello,

    Q1: Does anybody was able to succesfully use 8MHz MYSBootloader 1.3.0-beta.3 on standalone Atmega328p?

    All bootloaders I testing with Arduino BLINK example.
    Arduino 1.8.5

    I was testing 8MHz internal oscilator MYSBootloader 1.3.0-beta.3 with fuses on 2 different Atmega328p standalone but I can't upload sketch to it and test it. Arduino avrdude says that:
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x4a

    Used fuses:
    proMYSBL8.bootloader.low_fuses=0xE2
    proMYSBL8.bootloader.high_fuses=0xDA
    proMYSBL8.bootloader.extended_fuses=0x06 / 07
    proMYSBL8.bootloader.unlock_bits=0x3F
    proMYSBL8.bootloader.lock_bits=0x3F / 0F

    Before that, I was burned my Atmega328p with 1MHz internal oscilator MYSBootloader 1.3.0-beta.3 bootloader and it was working.

    Also I was testing 8MHz internal oscilator MYSBootloader 1.3pre2 with fuses on 2 different Atmega328p standalone and I can upload sketch to it and test it.
    Used fuses:
    proMYSBL8.bootloader.low_fuses=0xE2
    proMYSBL8.bootloader.high_fuses=0xDA
    proMYSBL8.bootloader.extended_fuses=0x06 / 07
    proMYSBL8.bootloader.unlock_bits=0x3F
    proMYSBL8.bootloader.lock_bits=0x3F / 0F

    Q2: I noticed that with 8MHz internal oscilator MYSBootloader 1.3pre2 LED blinks not continuosly it like (* led ON; - led OFF):
    *** --- *** --- *** --- ** - * - * - * - [cycle ends, then repeats again] *** --- *** --- *** --- ** - * - * - * - ...
    And this one cycle of *** --- *** --- *** --- ** - * - * - * - takes ~8 seconds. Could it be something with watchdog timer? I not very know about this setting.

    Thank You for help!


  • Admin

    @Mark-Swift said in MYSBootloader 1.3.0-beta.3:

    @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift Hmm, that's odd - just tested it here with the latest dev and all is ok. Can you post the logs + node sketch?

    @tekka, just tried again, perhaps I'm missing something obvious?

    I have the gateway and node using the latest dev branch, I click the node in MYS and then request a signal report - I see a tx in the log but nothing further? Do I need anything in the node sketch or the gateway? Does this work with the NRF's?

    Did you try with 1.3.0-beta.4? https://github.com/mysensors/MySensorsBootloaderRF24/tree/development



  • @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift said in MYSBootloader 1.3.0-beta.3:

    @tekka said in MYSBootloader 1.3.0-beta.3:

    @Mark-Swift Hmm, that's odd - just tested it here with the latest dev and all is ok. Can you post the logs + node sketch?

    @tekka, just tried again, perhaps I'm missing something obvious?

    I have the gateway and node using the latest dev branch, I click the node in MYS and then request a signal report - I see a tx in the log but nothing further? Do I need anything in the node sketch or the gateway? Does this work with the NRF's?

    Did you try with 1.3.0-beta.4? https://github.com/mysensors/MySensorsBootloaderRF24/tree/development

    @tekka that did it, it's now working... now to figure out what the returned signal report numbers mean ๐Ÿ™‚



  • @tekka thank You for the answer. I'm not sure is answer was dedicated for me or for Mark, but I tested 1.3.0-beta.4 in the same way I described before:

    • Tested with 2 different Atmega328p
    • First try was with 1MHz - working on both Atmega328p
    • Second try with 8MHz - same situation as with beta 3, skecth won't upload and I get answer from Arduino Avrdude (this time I post full log after uploading):
    avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
    
             Using Port                    : COM4
             Using Programmer              : arduino
             Overriding Baud Rate          : 38400
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf1
    avrdude: stk500_recv(): programmer is not responding
    < ... >
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xf1
    
    avrdude done.  Thank you.
    

    It would be best if someone also could try to burn same bootloader on standalone Atmega328p and post results to be sure all wiring and steps I did is without mistakes.
    Strange if I I burn 1.3pre2 8MHz bootloader - it works.

    What troubleshooting I could make?



  • @tekka, Thanks for the link to the beta.4. bootloader. I have tried burning nodes using these and tested them by uploading the FW using MySController 1.0beta_b3316 (latest update meant for MySensors2.2.0) with SerialGatewaySketches using both MySensors2.2.0_rc1 and MySensrs2.2.0_pre1 libraries.

    MysController doesn't seem to even recognize the Beta.4 bootloaded Nodes (Promini 5V16Mhz with default provided fuse settings from Makefile). The extra nRF chip wiring checks and precautions (0.01uF and 100uF Caps) have been taken. What might be the problem? How to debug when SerialMontitor cant be used? Any Network Sniffer link if that helps...

    I guess the MySensors library version of the SerialGateway sketch may be posing a problem. Can you please help me with a link of the correct MySensors library version to use with beta.4 bootloaded nodes?

    Any help will be appreciated...



  • Hi @tekka!
    Do you plan to add support for the RFM69 module in MYSBootloader?



  • No help from the community! Sad!!!


  • Admin

    @wanvo This would certainly be a great addition to MYSBootloader - but very limited dev time atm. Community contributions on that topic are welcome ๐Ÿ˜‰


  • Admin

    @vikasjee Apologies for the late reply - I have no idea what's the issue with your setup - my guess is that something is wrong with the fuses and/or wrong .hex used: Can you post the MYSController log, used fuse settings and any other important information?



  • @tekka thanks for the answer. I'm still a newbie.
    Now I can not make a contribution to the development due to my incompetence.
    I can help as a tester ๐Ÿ™‚



  • @jacikaas

    Hello, maybe someone was trying 8MHz bootloader for standlaone Atmega328p?



  • Hi,

    Anyone seen this error on latest 1.3 release? It seems a define is not done for F_CPU, what am I missing here?

    Generating function prototypes...
    In file included from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/MySensors.h:371:0,
    
    from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors\examples\GatewayW5100MQTTClient\GatewayW5100MQTTClient.ino:138:
    
    C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/core/MyTransport.cpp:777:42: error: operator '>' has no left operand
    
     #if defined(MY_GATEWAY_FEATURE) && (F_CPU>16000000)
    
                                              ^
    
    In file included from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/MySensors.h:396:0,
    
                     from C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors\examples\GatewayW5100MQTTClient\GatewayW5100MQTTClient.ino:138:
    
    C:\Program Files (x86)\Arduino\portable\sketchbook\libraries\MySensors/core/MySensorsCore.cpp:479:11: error: operator '>' has no left operand
    
     #if (F_CPU>16000000)
    
               ^
    exit status 1
    Error compiling for board ATmega328 with MYSBootloader 1.3.0.
    

    Regards



  • @cdr Same Problem here!

    Greetz Henry



  • @cdr @Henry I ran into the same issue. Turned out to be a syntax issue in the boards.txt file. If you change:

    MYSBL.menu.frequency.MYSBL16.f_cpu=16000000L
    

    into

    MYSBL.menu.frequency.MYSBL16.build.f_cpu=16000000L
    

    Then it works again. Adding build. needs to be done for the other menu entries as well.



  • @tsjoender

    PERFEKT!!! thx!!!



  • @tsjoender said in MYSBootloader 1.3.0-beta.3:

    @cdr @Henry I ran into the same issue. Turned out to be a syntax issue in the boards.txt file. If you change:

    MYSBL.menu.frequency.MYSBL16.f_cpu=16000000L
    

    into

    MYSBL.menu.frequency.MYSBL16.build.f_cpu=16000000L
    

    Then it works again. Adding build. needs to be done for the other menu entries as well.

    thanks a lot!


  • Admin



  • Hello,
    I am currently testing the OTA features with a "My Slim 2AA Battery Node", MYSBootloader 1.3.0-rc.1, MYSController Build 3316 and the original example sketch "PassiveNode" (MySensors 2.2.0). Unfortunately, no reboot will be performed if I want to execute it via the MYSController. Even with a firmware update, no reboot is performed. If I disconnect the sensor from the battery and reconnect, the firmware update will be executed. Am I doing something wrong or is this a software bug?

    Regards
    Thomas


  • Mod

    Try using smartsleep instead of usual sleep



  • Hello, thank you. It basically works with smartSleep. I only have to press the FW update or reboot button several times. After several attempts, the desired action is then executed.
    Regards Thomas



  • Hello.
    First, thanks to everybody developing all the stuff that is here, these are awesome projects and sorry to resurrect an old thread.

    Second, i am trying to use the firmware update feature from MYSController, build 3316, with MYSBootloader, 1.3.0-rc1 8MHz, on a barebone atmega 328pu 28dip .
    The device is running a simple thermistor sketch and reports happily to my RPi running MySensors ethernet gateway version 2.3.1-alpha(I have tried with version 2.2.0 as well).
    I get the "reboot" screen if i choose the firmware after setting the device as a "Board with MYSBootloader" and the device clearly reboots but does not start any firmware download.

    And of course, i am running nrf24l01+. Device is batterypowered from an 18650 li-ion, through a mcp1700 LDO 3.3v 250mA. 10uF on the nrf between vcc and gnd.
    Device is set to sleep for 60 secs, but is also set to smartsleep for 500ms, as i read somewhere had solved other peoples issues.

    Edit: I believe i was being stupid as i first burned the bootloader using arduino as isp and then burned the sketch, alas, erasing bootloader.


  • Admin

    @patrikr76 Yes, sounds like you erased MYSBootloader when uploading the sketch via ISP. Please post the MYSController log (starting before you reboot the node until the node is up an running) to verify this assumption.



  • Hello, everyone. Has anyone ever encountered a problem where after a power surge the device on this bootloader stops working? When I first encountered this, I did some tests. They're confirmed. This applies only to network devices. With the battery there are no such problems at all. So I had to switch to DuaiOptiboot. All stable. I do a bit of home programming ๐Ÿ™‚ so I don't think the problem is on my side, simple bugs are excluded.


  • Admin

    @berkseo Can you share additional details regarding your tests, ideally including logs that showed the proper function of the bootloader before the surge and after - what tool are you using for OTA updates?


  • Hardware Contributor

    @berkseo

    +1 for more details please, regarding hw and the power supply, mcu, fuses too.
    weird problem.. it works on batt but not on AC?? how do you replicate these power surge?
    if you have AC powered nodes sensible to power surge, transcient, I would add a TVS diode on the dc power supply side, and I would protect signals if needed. adding some filtering does not hurt too, pcb gnd isolation/shielding plane as well.
    Because, "even if" there is something related to mys bootloader, it seems also related to surge protection..



  • @tekka said in MYSBootloader 1.3.0-beta.3:

    Can you share additional details regarding your tests, ideally including logs that showed the proper function of the bootloader before the surge and after - what tool are you using for OTA updates?

    Now not many can to share on the subject. We need to reproduce the problem again. OTA through the Majordomo system. But it's not about the update. The device died during a power surge, a feeling that was in the mode of receiving firmware due to the jump. Only re-recording the bootloader helped restore the device.



  • @scalz The problem was seen when the voltage surge in the network. It was later reproduced using supercapacitors. Let's try to reproduce the problem as follows: power the unit from 3.3 V, hang the supercapacitor on 1F in parallel and the led on the power through the 1K resistor, wait until the supercapacitor is charged, then wait for the discharge and on the verge of turning off ~ 2V, apply power pulses. I can't debug it right now. Will time will make. Bootloader latest version.
    There was a filter and a stabilizer. power surges are in principle excluded



  • Hello,
    can the bootloader also be used on an Atmega32U4? After programming, the Atmega is no longer recognized by the Usb port of the PC. Should programming via the IDE (Arduino, PlatformIO) still be possible or will it only work via MyController?


  • Mod

    @mafe I don't have experience with FOTA, but this part of the documentation might help:

    The MySensors master branch does not support upload through ftdi / serial (but the development branch does).

    But I don't think MYSBootloader has support for Atmega32U4 at all.



  • Thanks for your answer!
    Sorry, I forgot to mention that I want to do FOTA via an MQTT gateway. Is that working at all right now?



  • @mafe said in MYSBootloader 1.3.0-beta.3:

    imenticato di dire che voglio fare FOTA tramite un gateway MQTT. Sta f

    If I understand OTA well with an MQTT gateway it is not possible. This at least using MYSBootloader


 

239
Online

8.6k
Users

9.4k
Topics

99.0k
Posts