Node reboot issue
If I try to reboot a node, from either MySController or MyController, the node hangs. Once it hangs from the reboot command, manually pressing the reset button on the Arduino Pro mini will not restart the arduino. It only starts again if power is removed and then added again.
I have the same issue using both the standard arduino bootloader and with MySBootloader.
Can anyone guide me to what may cause this?
What Ide version and avr boards definitions are you using?
Arduino IDE : 1.8.2
For standard installed bootloader : Arduino Pro or Pro Mini with Atmega328 (5V, 16Mhz)
For MySBootloader : MySBootloader AtMega328 external 16Mhz
You may try to use older or newer avr boards definitions
If by "board definitions" you mean the detail in the boards.txt file - here is what I have for Arduino Pro Mini / 5V 16Mhz ...
pro.name=Arduino Pro or Pro Mini
Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
pro.menu.cpu.16MHzatmega328=ATmega328 (5V, 16 MHz)
I have updated Arduino IDE o 1.8.2 recently which I guess that also updated the boards.txt file. Both the previous version and the latest version of Arduino have the same reboot issue.
One more thing that may be helpful ... when the node "hangs" the status LED is blinking rapidly.
After some looking around i found this ..
I flashed Optiboot bootloader and that worked.
I flashed MYSBootloader again and now it does work - I am fairly certain this bootloader was causing the issue before ?!? Oh well - it works now !
I flashed with Arduino Pro Mini 5V 16Mhz and that caused the reset hang
So it seems to be an issue with the default Arduino Pro Mini bootloader that comes with Arduino IDE.
Hope this helps anyone else experiencing same issue.
I have exactly the same problem, although I actually have the MYSBootloader installed.
This is also a 5V pro mini.
I'll check my boards.txt file later, maybe I have incorrect settings that don't work with 5V 16 Mhz units.
@maghac I was still having issues with MYSBootloader. This was using the version bundled with MYSController - in a folder called "MYSController_1_0_0beta".
I found one on github here https://github.com/mysensors/MySensorsBootloaderRF24
It seems to be a newer version.
I downloaded that one and setup the 16MHz from their boards.txt file and so far this seems to work.
maghac last edited by maghac
@slt1 Thanks for the tip - I grabbed the files from the development branch - was that the one you were using? I found three versions of the .hex file - 1Mhz, 8Mhz and 16 Mhz.
Now I am unable to upload a sketch after flashing the MYSBootloader. It only works if I go back to the normal Pro Mino bootloader.
The previous version (bundled with MYSController) I was using would not allow me to upload sketches using FTDI cable after flashing the MYSBootloader. It also had the node reboot issue.
The latest dev branch from github link does allow me to now and the node reboot works too !
I copied all 3 hex files into a MySensors folder (C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\MySensors)
They only had one board in the boards.txt - I only have 5V 16MHz Pro Mini's so changed link to hex file in the sample boards.txt they gave and added that to bottom of boards.txt file in Arduino install dir. boards.txt content I copied is ..
proMYSBL.name=ATmega328 16Mhz MYSBootloader
@maghac I tested a bit now again and see there is still an issue when uploading sketch using USB Asp cable. I am getting this error :
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
However, that is non-critical for me as I only want to flash the bootloader using USB Asp cable and then I use the FTDI Cable for sketch uploads
maghac last edited by maghac
Here are my custome entries from boards.txt:
## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader ## ------------------------------------------------- proMYSBL.name=ATmega328 16Mhz MYSBootloader 1.3 beta proMYSBL.upload.tool=avrdude proMYSBL.upload.protocol=arduino proMYSBL.upload.maximum_size=30720 proMYSBL.upload.maximum_data_size=2048 proMYSBL.upload.speed=115200 proMYSBL.bootloader.tool=avrdude proMYSBL.bootloader.low_fuses=0xF7 proMYSBL.bootloader.high_fuses=0xDA proMYSBL.bootloader.extended_fuses=0xfe proMYSBL.bootloader.unlock_bits=0x3F proMYSBL.bootloader.lock_bits=0x0F proMYSBL.bootloader.file=MySensors/MYSBootloader.hex proMYSBL.build.mcu=atmega328p proMYSBL.build.f_cpu=16000000L proMYSBL.build.board=AVR_UNO proMYSBL.build.core=arduino proMYSBL.build.variant=standard ## Arduino Pro or Pro Mini (3V3 & 5V, 16 MHz) w/ ATmega328 MYSBootloader ## ------------------------------------------------- proMYSBL16.name=ATmega328 16Mhz MYSBootloader 1.3 beta DEV proMYSBL16.upload.tool=avrdude proMYSBL16.upload.protocol=arduino proMYSBL16.upload.maximum_size=30720 proMYSBL16.upload.maximum_data_size=2048 proMYSBL16.upload.speed=57600 proMYSBL16.bootloader.tool=avrdude proMYSBL16.bootloader.low_fuses=0xF7 proMYSBL16.bootloader.high_fuses=0xDA proMYSBL16.bootloader.extended_fuses=0xFD proMYSBL16.bootloader.unlock_bits=0x3F proMYSBL16.bootloader.lock_bits=0x0F proMYSBL16.bootloader.file=MySensors/MYSBootloader_16MHz.hex proMYSBL16.build.mcu=atmega328p proMYSBL16.build.f_cpu=16000000L proMYSBL16.build.board=AVR_UNO proMYSBL16.build.core=arduino proMYSBL16.build.variant=standard ## Arduino Pro or Pro Mini (3V3 & 5V, 8 MHz) w/ ATmega328 MYSBootloader ## ------------------------------------------------- proMYSBL8.name=ATmega328 8Mhz MYSBootloader 1.3 beta DEV 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=0xD2 proMYSBL8.bootloader.extended_fuses=0xFE proMYSBL8.bootloader.unlock_bits=0x3F proMYSBL8.bootloader.lock_bits=0x3F 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
MYSBootloader.hex is from the master branch of MYSBootloader 1.3.0-beta.3, the other two are from the development branch.
Doesn't matter which one I use, I can never get my 5V 16MHz boards to accept a new sketch via FTDI cable. I have to go back to the standard bootloader.
Just realized I should probably post this in the Wireless Programming thread instead.
slt1 last edited by slt1
@maghac I copied and tried your settings for
proMYSBL16.name=ATmega328 16Mhz MYSBootloader 1.3 beta DEV
and I get errors like this uploading via FTDI cable ...
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2c
If you want to try my settings then change the 16Mhz settings to this -
#ATmega328 16Mhz MYSBootloader 1.3 beta DEV proMYSBL16.name=ATmega328 16Mhz MYSBootloader 1.3 beta DEV proMYSBL16.upload.tool=avrdude proMYSBL16.upload.protocol=arduino proMYSBL16.upload.maximum_size=30720 proMYSBL16.upload.maximum_data_size=2048 proMYSBL16.upload.speed=115200 proMYSBL16.bootloader.tool=avrdude proMYSBL16.bootloader.low_fuses=0xF7 proMYSBL16.bootloader.high_fuses=0xDA proMYSBL16.bootloader.extended_fuses=0x06 proMYSBL16.bootloader.unlock_bits=0x3F proMYSBL16.bootloader.lock_bits=0x0F proMYSBL16.bootloader.file=MySensors/MYSBootloader_16MHz.hex proMYSBL16.build.mcu=atmega328p proMYSBL16.build.f_cpu=16000000L proMYSBL16.build.board=AVR_UNO proMYSBL16.build.core=arduino proMYSBL16.build.variant=standard
And rem Arduino IDE needs to be closed and restarted after changes
@slt1 Thanks, I'll give it a try next time. Now the node is actually mounted in a place where it's difficult to physically reach it (which is why I wanted to enable OTA updates of course).
The only difference between your entry and mine is the extended_fuses line, isn't it?
Whenever I use your settings (extended_fuses=0x06), avrdude gives me a warning and instructs me to change the value.
@maghac In your one configured as "MYSBootloader 1.3 beta DEV" which uses the MYSBootloader_16MHz.hex there is also a difference in upload.speed.
So, now I have the same problem with a 5V pro clone.
With normal bootloader:
- the board gets stuck in a loop with flashing LED when i try to reboot it.
With MYSBootloader (1.3.0-beta.4 or 1.3.0-beta.3):
- unable to upload a new sketch using the FTDI cable
- node doesn't seem to get recognized properly by the GW or the controller. I see it's contiously sending "mysensors-out/10/255/4/0/0 FFFFFFFFFFFFFE400102" messages on MQTT, which I think is when it's checking for a new firmware, but nothing on the serial monitor. This makes it impossible to upload a new sketch OTA.
Any ideas on how to troubleshoot?