MYSBootloader 1.3pre2 testing
-
@Tetnobic No, you won't see anything in the node log - but in the GW log you should see somehting like:
1;255;4;0;0;64000200C803948D0105@tekka Hi, I found my mistake ! You were absolutely right when you said there is no sign of MYSBootloader in my GW log...
But now I know why :) :
I use an USBasp Programmer with Arduino IDE for upload my bootloader and my sketch..., and I mistakenly thought that when I upload bootloader then sketch, it keep bootloader.....but NOT, it overwrite bootloader :(
I fix it by uploading the xxx.with_bootloader.hex file generated by Arduino IDE when compile.Sorry for the inconvenience and thank you for your help
-
@tekka Hi, I found my mistake ! You were absolutely right when you said there is no sign of MYSBootloader in my GW log...
But now I know why :) :
I use an USBasp Programmer with Arduino IDE for upload my bootloader and my sketch..., and I mistakenly thought that when I upload bootloader then sketch, it keep bootloader.....but NOT, it overwrite bootloader :(
I fix it by uploading the xxx.with_bootloader.hex file generated by Arduino IDE when compile.Sorry for the inconvenience and thank you for your help
-
@Tetnobic can this be done within the IDE? I have some nodes where I have to upload with ISP and thought to still have the bootloader, but this explains why OTA didn't work afterwards...
@Anduril I think you can do this without Arduino IDE...
but how compile you code for generate sketch+bootloader ( the xxx.with_bootloader.hex file) in command line I don't know....
For upload this file on my ATMega, I use avrdude, the same command line that ardunio IDE use, but change the .hex file... -
Tried this bootloader.
Have two nodes 8MHz internal, two nodes 1MHz. All run beautifully, the OTA firmware update around a minute with binaryButton sketch. But the node startup is around 7-8 seconds. And no problems uploading the sketch via serial.
I use an UNO as an ASP to burn the bootloader and a simple USB_TTL FTDI converter to upload sketches. -
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?
-
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?