MYSBootloader 1.3.0-beta.3
-
This is my first post in this forum - so hello everyone! And many kudos for all developers and contributors.
I am on my way of building distributed sensors and actuators system for astroimagers, and would love to have OTA firmware update possibility. I use nR24L01 radio and each node will be based on Atmega328 working at internal 8MHz and 3V, and have two questions:- which bootlader hex should I write?
- does MYSbootloader support programming via serial? I tried several hex files with several fuses combinations and never succeeded to program Atmega328P via serial :(
-
This is my first post in this forum - so hello everyone! And many kudos for all developers and contributors.
I am on my way of building distributed sensors and actuators system for astroimagers, and would love to have OTA firmware update possibility. I use nR24L01 radio and each node will be based on Atmega328 working at internal 8MHz and 3V, and have two questions:- which bootlader hex should I write?
- does MYSbootloader support programming via serial? I tried several hex files with several fuses combinations and never succeeded to program Atmega328P via serial :(
-
Ok, what I've done so far according to https://www.mysensors.org/about/ota:
- connected USBasp to Arduino Pro Mini and set fuses to 16MHz external oscillator (using AVRDUDESS)
- then tried to upload MYSbootlader using Arduino IDE (versions 1.6.11 and 1.8.1) but it failed with some "cannot set sck period"
- so I uploaded bootloader with AVRDUDESS
Question is - at this stage should I be able to program Arduino Pro Mini with serial programmer, or now it can be done only using OTA? Because I am not able to do it with serial programmer and Arduino IDE.
Burning bootloader with AVRDUDESS works fine because I changed it many times from original to MYSbootlader, also programming Arduino with precompiled sketch works fine.
I will describe my project little bit later, when I will have more nodes working :) Currently I am on stepper motor controller node.
-
Ok, what I've done so far according to https://www.mysensors.org/about/ota:
- connected USBasp to Arduino Pro Mini and set fuses to 16MHz external oscillator (using AVRDUDESS)
- then tried to upload MYSbootlader using Arduino IDE (versions 1.6.11 and 1.8.1) but it failed with some "cannot set sck period"
- so I uploaded bootloader with AVRDUDESS
Question is - at this stage should I be able to program Arduino Pro Mini with serial programmer, or now it can be done only using OTA? Because I am not able to do it with serial programmer and Arduino IDE.
Burning bootloader with AVRDUDESS works fine because I changed it many times from original to MYSbootlader, also programming Arduino with precompiled sketch works fine.
I will describe my project little bit later, when I will have more nodes working :) Currently I am on stepper motor controller node.
-
@jolo yes, MYSbootlader supports only ota. No serial.
I have updated the ota page to mention the lack of serial.
@mfalkvidd actually looking at the code of mysbootloder, it does support STK500 protocol. I haven't test if it really works...maybe it doesn't.
-
@mfalkvidd actually looking at the code of mysbootloder, it does support STK500 protocol. I haven't test if it really works...maybe it doesn't.
-
@mfalkvidd The most recent MYSBootloader supports OTA and serial uploads via STK500, see here: https://github.com/mysensors/MySensorsBootloaderRF24/tree/development
-
@mfalkvidd The most recent MYSBootloader supports OTA and serial uploads via STK500, see here: https://github.com/mysensors/MySensorsBootloaderRF24/tree/development
@tekka thanks.
I did look there, but didn't find anything that I understood was related to serial. I also looked at the list of commit messages but none of them mentions anything about added support.Anyway, thanks for clarifying. I'll update the ota page again.
-
Many thanks for help - today I made it work :) Here are my steps that worked for me:
- I used MYSController 1.0.0 beta, took bootloader MYSBootloaderV13pre.hex and uploaded to Arduino Mini Pro with AVRDUDESS and USBasp programmer
- then uploaded serial gateway sketch to another Mini Pro
- attached nR24L01+ radios to both
- connected MYSController, configured serial connection and all just started to work
- then uploaded simple DHT sketch, edited csv file in MYSController and selected it for OTA FW update
After less than minute new FW was already at the node and it started to send data. I am very happy :) I played with Arduino projects for several years, but this stuff you have made is absolutely amazing! Now time for some real nodes - first one will be stepper controller for telescope focuser.


-
It still works fine - however I have one more question, maybe stupid :) About RF channels. I use nR24L01+ radios at default channel 76, however for final solution I would like to switch to some higher freq. Does precompiled bootlader work only at this default channel 76? So if I would like to switch to channel 101 I need to compile bootloader with this setting? Or there is some magic behind that makes it work some other way?
-
It still works fine - however I have one more question, maybe stupid :) About RF channels. I use nR24L01+ radios at default channel 76, however for final solution I would like to switch to some higher freq. Does precompiled bootlader work only at this default channel 76? So if I would like to switch to channel 101 I need to compile bootloader with this setting? Or there is some magic behind that makes it work some other way?
-
Really want to try FOTA with MYSBoatloader but a little bit confused. First - do i have to burn the fuses (i'm using a chinese arduino mini pro 16Mhz) or can simply download MYSBootloader_16MHz.hex from dev brach and i'm good to go?
Another thing - i'm using an MQTT gateway attached to RPi3. Don't really want to change the gateway type - so is there a way to do OTA update? I have a spare UNO which i can connect to a notebook.
-
@gohan
Excellent.Searched through the thread but couldn't find any mentions how it can be done via mqtt What about the fuses? -
Yes thank you for the tip! Mycontroller works.
For Mini Pro - no fuses are needed. Just download the hex - rename and flash.
What about the nano?
Looking at boards.txt i see only two difeerencesNano
nano.menu.cpu.atmega328.bootloader.low_fuses=0xFF
nano.menu.cpu.atmega328.bootloader.extended_fuses=0xFDMys
proMYSBL.bootloader.low_fuses=0xF7
proMYSBL.bootloader.extended_fuses=0x06But at the same time PRO mini is same as nano... So can also flash straight away?
-
Nano also doesn't need any fuses. So everything works. Except to begin the flash procedure i have to unplug and plug the node. Is this intended behaviour? Otherwise i only see in MQTT one line of code and no response from node