MYSBootloader 1.3pre2 testing
-
Shall we all join hands and give a warm applause to @tekka for his work and pray that he'll find the time to give us a lovely christmas present. The MYSBootloader 1.3+ pushed to github 😃
-
It's been asked that the source is uploaded multiple times over the last year +, I guess it will not happen anytime soon... :disappointed:
-
This may be a stupid question, but I'm using the mysgateway on a Raspberry Pi as my controller which is described here:
Building a Raspberry Pi Gateway
The Raspberry pi runs headless and I do everything through ssh. Is there any way to use MYSBootloader using the mysgateway and initiating the OTA update using the command line?
You'll need a Controller to update the firmware in the nodes. I'm using MyController.org running on a RPI3 with a MySensors serial Gateway. Works great!
-
For all who have problems with serial (debug) output using MYSBootloader:
When you burn the 8MHz bootloader, it sets avr fuses to internal 8MHz RC oscillator. This has high tolerance. The serial baudrate was only 108000baud in my case and Arduino IDE did not work.
Setting the fuse to use the external quartz/resonator lead to 111000baud, which was close enough to 115200, to get arduino IDE to read serial data. -
Please help to debug:
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.0-beta
4 TSM:INIT
4 TSF:WUR:MS=0
12 !TSM:INIT:TSP FAIL
14 TSM:FAIL:CNT=1
16 TSM:FAIL:PDT@Tigroenot Hi,
TSM Transmission
TSP Transport
PDT Power Down!TSM:INIT:TSP FAIL Error during Transport initialization (Radio)
TSM:FAILURE Error on Transmition (of course, you have a radio error)
TSM:FAILURE:PDT Radio in Power Down (due to the error)Check your radio cabling. If all ok add a capacitor on radio power pins
-
After flasing a node with ISP (bootloader+sketch) the node will not start since the eeprom is emty (forgot to enable eeprom safe). Node needs to get a ID from controller, even if ID is defined in the sketch. After receiving a ID from controller the node starts and uses the ID from sketch.
Any solution to overcome this? -
After flasing a node with ISP (bootloader+sketch) the node will not start since the eeprom is emty (forgot to enable eeprom safe). Node needs to get a ID from controller, even if ID is defined in the sketch. After receiving a ID from controller the node starts and uses the ID from sketch.
Any solution to overcome this?@karlheinz2000 that should not happen. Starting from empty eeprom is normal, that's what all nodes do the first time.
Could you post debug output of the node and the gateway when it fails to use the defined id?
Just to check: the id was defined before including MySensors.h right? -
Attached the log file from MYSC. After activating AUTO ID the node starts. No other GW active.
No serial output during this time.
Node ID is defined before including .h.Node is flashed via ISP (Dragon) with "...with_bootloader.hex".
-
Attached the log file from MYSC. After activating AUTO ID the node starts. No other GW active.
No serial output during this time.
Node ID is defined before including .h.Node is flashed via ISP (Dragon) with "...with_bootloader.hex".
@karlheinz2000 I'm not sure I understand you correctly:
With a cleared EEPROM, the bootloader will not know any ID defined in the sketch. Instead, the bootloader will fetch a new ID from the controller and store it in EEPROM. Once the sketch starts it will either overtake this newly assigned ID (if MY_NODE_ID == AUTO) or overwrite and use a static ID (if MY_NODE_ID != AUTO) from now on. Does this answer your question? -
Understood.
But if I'm not using MYSB, I can flash a sketch with defined ID and this will work instantly in the network.
With MYSB I always have to do assign a new ID just to get the node to run the first time after flashing.
Any chance to get MYSB to know, if a sketch is an flash?
And start this sketch, which then will use the defined ID or request a new ID from controller and writes the eeprom? -
Understood.
But if I'm not using MYSB, I can flash a sketch with defined ID and this will work instantly in the network.
With MYSB I always have to do assign a new ID just to get the node to run the first time after flashing.
Any chance to get MYSB to know, if a sketch is an flash?
And start this sketch, which then will use the defined ID or request a new ID from controller and writes the eeprom?@karlheinz2000 said:
But if I'm not using MYSB, I can flash a sketch with defined ID and this will work instantly in the network.
Yes
With MYSB I always have to do assign a new ID just to get the node to run the first time after flashing.
Only true if EEPROM (i.e. ID address location) was cleared.
Any chance to get MYSB to know, if a sketch is an flash?
And start this sketch, which then will use the defined ID or request a new ID from controller and writes the eeprom?During booting, MYSBootloader calculates the FW CRC in flash and verifies it against the FW CRC stored in EEPROM (which is written after a successful OTA FW update) - if it matches, the sketch starts, if not, the bootloader remains active.