MYSBootloader 1.3 pre-release & MYSController 1.0.0beta
Lorenzo last edited by
This post is deleted!
yd kim last edited by
@abmantis Interesting. Can you let me know a little bit further detail?
You mean Arduino pro mini pin 10? That pin is connected to CSN on NRF24L01.
I'm keen to find the issue why it get slow.. It took 20-30minutes to upload new firmware....
abmantis last edited by abmantis
@yd-kim Yes, just touch Arduino's pin 10. Dunno if it is a particularity with this Arduino or radio. It updates the node in about 20 seconds!
Jan Hicl last edited by Jan Hicl
@Jan-Hicl This has been fixed - did you try the most recent version from github?
Hi @tekka and thanks for getting back to me! I tried the latest version however with no success. The node that I update is still marked as "Booting" even though I upload Blink.hex. Strangely enough, the led is blinking as it's supposed to blink and if I request presentation the node replies with correct sketch name but then it goes back to Booting. I'm using Arduino IDE 1.8.1, AVRdude v6.1 and MYScontroller v1.0.0 beta (build 3314). I'm using Arduino mini pro, 3V3, 8MHz. I have 5 different nodes but all of them with the same behavior so it does not seem as an HW issue.
Here is my log from the upload of Blink.hex: http://pastebin.com/9grgHb27 Would you have any idea how could I fix that? Thanks!
@Jan-Hicl The blink sketch is somewhat special - it only blinks the built-in LED until the watchdog kicks in and resets the node. What happens if you upload one of your sketches? Please post the full debug log + source. Thanks
yd kim last edited by
I did success with MySBootloader 1.3 beta 3 (https://github.com/mysensors/MySensorsBootloaderRF24 )
It works both arduino and OTA firmware upgrade however it takes longer to boot up (means switch to firmware) about 3-5seconds.
I'm using MYSensors 2.1.0 and MYController (http://www.mycontroller.org) on arduino pro mini 8Mhz 3.3V.
How many sensor you try at the same time?
From memory When I do firmware update for 3-4 sensors, I have to change "Tx message processing delay" to 300ms.
If it's shorter than 300ms, keep rebooting some stage.
I didn't use MYScontroller but probably it has similar setting.
Thanks @tekka for a prompt response!
I tried to upload https://github.com/mysensors/MySensors/blob/master/examples/AirQualitySensor/AirQualitySensor.ino
here is the log: http://pastebin.com/Tc5vhEnF
You can see that the node is successfully running with TimeReporter but AirQualitySensor cannot make it from booting. However, this is happening even with highly modified AirQualitySensor sketch or some of my custom sketches. In the log, you can also see that if I request presentation of that node it replies with correct sketch name.
Please let me know if you need some more info. Thanks in advance!
@Jan-Hicl Please also post the full debug log of the node (running AirQualitySensor).
@Jan-Hicl The GW and node logs are inconsistent: your GW log shows a rebooting node 1 - the node log shows a running node trying to establish the uplink. Do you have logs from GW and node taken simultaneously?
Sorry @tekka, should've sent this in the first post. Here is AirQuality sensor node log: http://pastebin.com/9MVtfRNV
Here is gateway log: http://pastebin.com/QNpmBz4m
Both of them logged simultaneously. Node Id I'm updating is 1. In the log you can again see that TimeReporter is working well before the flashing. Please let me know if there is anything I can provide you with in order to solve this... Thanks!
Nicolas Charrier last edited by
I succed to program booloader but y can not add my sketch to arduino with serial or USB line.
Is is activated by default?
Hi @tekka any update what could be wrong with the upload? Any advice on a workaround? Thanks!
@Jan-Hicl The upload via bootloader is ok (the sketch is running - based on your debug log) - so no issue here.
However, you may have some issues with the CPU frequency (wrong board selected when compiling?) - there are scrambled chars in the debug output:
Starting óensor (RNNNA-, 2.0.0) TSM:INIT TSM:RADIO:OK TSP:ASSIGNID:OK (ID=1) TSM:FPAR TSP:MSG:ÓEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSP:MSG:FPAR RES (IÄ=0, dist=0) TSP:MSG:PAR OK (ÉD=0, dist=1) TSM:FPAR:OK TSM:ID TSM:CHKID:OË (ID=1) TSM:UPL TSP:PING:SEND (dest=0) TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1 TSP:CHKUPL:FAIL (hops=255) !TSM:UPL:FAIÌ TSM:FPAR TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSP:MSG:READ 2-2-255 s=255,c=3,t=7,pt=0,l=0,sg=0: TSP:MSG:BC TSP:MSG:ÒEAD 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0 ÔSP:MSG:FPAR RES (ID=0, dist=0) TSP:MSG:PAR OK (ID=0, diót=1) TSM:ÆPAR:OK
How do we go about compiling this for 8MHz crystal (Internal and External), i'm sure this has already been asked but I can't seem to search through this post very efficiently... Sorry if it has been covered already, just a link back or something would probably suit me if it has been
romeo01 last edited by romeo01
Nice job, the last bootloader seems to run in good conditions.
I use MySensors 2.2.0 beta, MYSController 1.0.0 (3314) and the last version MYSbootloader 1.3.0-beta.4 (https://github.com/mysensors/MySensorsBootloaderRF24)
Update, flash, firmware via OTA is ok.
But 1 problem occurs when a node reboot.
I tried to isolate the problem, so I think that's arround the presentation request.
When I click on "request presentation", I got it
and below the debug output (via serial) of the node
70437 TSF:MSG:READ,0-0-1,s=0,c=3,t=19,pt=0,l=1,sg=0:0 70445 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 70453 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 70460 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.2.0-beta 70469 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0 70497 TSF:MSG:READ,0-0-1,s=255,c=3,t=6,pt=0,l=1,sg=0:M 70504 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=8,sg=0,ft=0,st=OK:OTA Test 70512 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=1,sg=0,ft=0,st=OK:1 70521 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=3,pt=0,l=8,sg=0,ft=0,st=OK:Sensor 1
Maybe a bug or where is the mistake ?
Thanks in advance foryour help
Edit: After a couple of test, the problem is related to the gateway with MySensor Library version 2.2.0 beta.
All nodes (2.1.1 & 2.2.0 libs) from my network present the same error.
Probably a vartype unexpected by the Gateway (2.2.0 lib).
The serial Gateway (2.1.1) is ok
ahmedadelhosni last edited by
I am trying to set up my Serial Gateway. I flashed the OTA bootloader but how can I upload the Gateway sketch through Serial ?
I tried to use the MySysController but the node is not presented so that I can flash new firware with the Gateway sketch. It only worked when I flashed normal Optiboot bootloader and then flashed the Serial Gateway sketch through Serial, then I connected the Gateway to the Controller and the presentation worked well. Thus I now have a Gateway which I can flash other nodes with through OTA.
Is there another way to flash a gateway sketch other than this ?
@ahmedadelhosni Why would you want to flash MYSBootloader on your GW? OTA FW update capabilities only make sense on sensor nodes...
ahmedadelhosni last edited by
@tekka I just thought that if I flashed a bootloader on a new hardware IC then I can decide whether to flash GW or sensor node when connected to the serial computer.
ksya last edited by
I see that after compiling I get to choose between sketch.ino.hex and sketch.ino.with_bootloader.hex
Is it possible to update the bootloader OTA by using this hex file instead? Which is the best bootloader available now, because my nodes are now on 1.3pre (from topic start).
How does GW mode actually work - I have been trying to relay a connection to Vera but not matter what combination I am trying I cannot understand how the GW mode operates?
@itbeyond Have you opened up your firewall so the Vera can communicate with the computer running MYSController?
Here is how I have MYSContoller configured...
First, connect MYSController to your existing gateway (if you are using Ethernet
you only want one device to connect so don't have your Vera connected at the same time)
Once you do that you need to choose a port in the settings:
Then you press Connect (to connect to the actual Ethernet or Serial gateway).
Once connected turn on GW Mode (mine is grayed out because I'm not at home connected to my gateway):
In your Vera you would obviously want to connect to the IP address of the computer running MYSController
I have problems connecting a serial NRF24 gateway to MYSController b3314. After some minutes working properly, no more messages seem to get received by MYSController. If I disconnect and connect again (button, not USB), it works for about the same time until it stops again.
I put a second USB2serial in parallel and connected a terminal program (hterm). The terminal programm continuously receives messages, even when MYSController stops receiving. So it's no gateway issue.
I tried several different USB2serial adapter with MYSController - no difference.
Any idea how to get MYSController to work continuously ?
@petewill - Thanks of course Windows Firewall - how many times does one have to forget about that little gem. One other quick question I created a new post in controllers for a MYSBootloader issue - should I add it to this post or leave it where I posted it? I cannot get one node to accept firmware (wonder if signing is a problem however it should not be).
@itbeyond I responded in the other thread.
@karlheinz2000 Sounds like an issue with your GW - what happens if you connect to your GW via the Arduino serial terminal - does it behave the same?
@tekka I did this already. GW connected to MYSController and to terminal program in parallel via 2 USB2serial adapters. MYSController stops logging, but terminal keeps logging MSGs. So I expect no GW issue. I tried 3 different USB serial adapters with no difference.
@karlheinz2000 Try with the latest build (MYSController 1.0.0beta build 3316) - MYSController will inform you about an available update.
@tekka Where can that be downloaded? All the links I find lead to a 404...
@manutremo see above, you will get notified when running MYSController
Done, nice job, I see the new message types have been added, probably other enhancements under the hood? thanks!
Mark Swift last edited by
@tekka it's been some time since I flashed the bootloader, I notice I currently have a lot of different hex files (which I believe I compiled myself), do I no longer need different files for different speeds, i.e 16 / 8 /1Mhz?
Mark Swift last edited by
I'd also love to use the signal report features, I thought it was enabled by default in MS, seems not to work here when I request an item from MYS?
The new build runs since several hours with no problems
The old one stoped within 10min.
I'm sorry to say that in my case FOTA updates seem to be worse than with the previous version, they stop before the 5th line of sent code... but it may be my fault, I'll continue investigating.
@manutremo As expected, it was my fault. FOTA updates work correctly with this version.
I 'm new to MySensors and MySController. I have everything working and I thanks all the good developers here
I have 1 question to better understand how everything works: when I start MYSController I can see in the message tab those 2 messages (heartbeat) repeating every 10 seconds. Can someone tell me what they are? Where does the GW send the heartbeat to? Is it going through RF24?
Thanks in advance for the reply.
@chris83 Which version do you use? I only have the RX line?
I thought it was for the MYSController, since it is connected to the gateway. Guess the gateway sends it to all connected clients.
@raptorjr Thanks for the quick reply... I'm running MYSController version: 1.0.0beta:
@chris83 Thank you. I use the same version.
@raptorjr So if I got it right, MYSController is sending a ping to my GW every 10 seconds?
@chris83 Yes, as I understand it. But I could be wrong. But it feels logical.
How is the upcoming bootloader release (1.3S) going?
I may be wrong but think I need this to push signed firmware to a node. I have a node with soft signing required. The node works but I cannot update it OTA is this 1.3S to support this?
diogoc last edited by
There are already support for rfm69?
mbedarff last edited by
tekka, first of all, thank you very much for your efforts and shared results on MYSController and MYSBootloader!
I am trying to upload new firmware to battery operated nodes via MYSController 1.0.0beta. But it seems that MYSController does not send an ST_FIRMWARE_CONFIG_RESPONSE message after the node has sent an I_PRE_SLEEP_NOTFICATION before its next smart sleeping. Thus no firmware packages are requested from the node using ST_FIRMWARE_REQUEST messages.
Uploading firmware to nodes that are not sleeping and powered by a power supply basically works. One limitation seems to be that the node has to be restarted while MYSController is connected to the gateway. My guess is that the ST_FIRMWARE_CONFIG_REQUEST message from the node must be received first by MYSController before the assign firmware selection inits a ST_FIRMWARE_CONFIG_RESPONSE message. If the nodes are not sleeping, this can easily be done using the request reboot function of MYSController. In the case of the battery-operated node, this reboot request is not transmitted on the next wake-up respectively pre sleep notification.
I also noticed another bug: After receiving the reboot messages from a node, it is always set as a Sensebender board.
MySensors version: 2.3.2
Gateway: ESP8266 with RFM69HW
Nodes: Canique MK2 boards (Moteino clone) with Atmega328P, RFM69HW, 4mbit Winbond W25X40CLSNIG flash chip and DualOptiboot bootloader.
@tekka: I would like to have a look at the code of MYSController to understand the firmware OTA start problem and the wrong detection of the board and to fix it if necessary. Would you be interested in making your code available on GitHub, for example, so that MYSController is developed further together? Please don't bother with code cleaning in advance.
luizrrocha last edited by
I also have problems with my battery-powered sleeping-most-of-the-time nodes. I actually have to disassemble them and force reset several times until the OTA FW update function starts to work, which pretty much negates its usage.
@Tekka, I echo mbedarff´s words, your job is fantastic but can we all try to add on our efforts and try to make it even better than it already is ?
Cheers from Portugal.
@luizrrocha Can you post your sketch and (if available) debug log here?
vidin last edited by vidin
Hello bootloader support ATMEGA328PB now this uC is cheaper than 328p? Best regards
A3V last edited by
@vidin You can simply program the 328pb with the standard bootloader using AVRDUDESS.
The pb version is software compatible with the p version.