MYSBootloader 1.3 pre-release & MYSController 1.0.0beta



  • @tekka said:

    @Mickey Ok, I see, this is something related to the internal checksum, need to adjust that. In short: the bootloader doesn't hand over to the sketch

    Has this adjusted already?


  • Hardware Contributor

    Hi @tekka, can you help me?
    I want to start exchanging between my MDMSGate device and MYSController via Ethernet. But I don't use Ethernet Shield W5100 in my MDMSGate, I use microcontroller PIC18F67J60 instead. I have uploaded to the PIC18F67J60 firmware which converts TCP/IP packets to serial and conversely.
    0_1474892376023_Ethernet_gateway.jpg
    In atmega328P I use the serial gateway sketch. So, I can't connect MYSController to my MDMSGate. Can you explain me, how MYSController exchanges with gateway generally? In an exchange through CP2102 (as a serial gateway mode) everything works well.



  • In the "firmware_config.csv" file, on the first line it says:

    Type,Name,Version,File,Comments
    

    I know that it is there to explain how to add new lines to the file.
    But I don't know what "Type" is used for.
    The two examples have the numbers 10 and 20. I added a 30 and it seems to work but I would like to know what it's for.

    Thanks



  • @Anduril Haven't tried serial yet. The old bootloader seemed indeed a bit faster. I also noticed that if I touch pin 10 with my finger, it gets really fast! It just sends the packages continuously without stoping. As soon as I stop touching pin 10, it pauses.

    The gw and the node were like 1 meter, so it is not a distance problem. Also tried moving them closer and apart.



  • This post is deleted!


  • @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....



  • @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!



  • Hi @tekka, I'm having the very same issue as @Mickey so I just wanted to ask if there is any workaround to that or if happen to make the adjustment to the bootloader. Thanks a lot! Original comment


  • Admin

    @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!


  • Admin

    @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



  • 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!


  • Admin

    @Jan-Hicl Please also post the full debug log of the node (running AirQualitySensor).



  • @tekka here is the AirQualitySensor node log: http://pastebin.com/XWfFCbUx


  • Admin

    @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!



  • Hello
    I succed to program booloader but y can not add my sketch to arduino with serial or USB line.
    Is is activated by default?
    Thanks.



  • Hi @tekka any update what could be wrong with the upload? Any advice on a workaround? Thanks!


  • Admin

    @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
    

  • Hardware Contributor

    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 🙂



  • 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

    http://hpics.li/93e8861

    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



  • @Nicolas-Charrier
    Hello @tekka , I have the same problem.

    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 ?

    Thanks.


  • Admin

    @ahmedadelhosni Why would you want to flash MYSBootloader on your GW? OTA FW update capabilities only make sense on sensor nodes...



  • @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.



  • 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?


  • Admin

    @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)
    0_1510582509499_upload-28bab7f1-4863-41bc-a749-179cb82ecf6c
    Once you do that you need to choose a port in the settings:
    0_1510582093482_upload-14ac4c29-1501-49ea-b0c5-d7503a02b769

    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):
    0_1510582137860_upload-dd16413a-ef4c-4c1f-9dd9-7377f5090ed5
    In your Vera you would obviously want to connect to the IP address of the computer running MYSController
    0_1510582624549_upload-5296052c-b9b0-446b-b089-259b375d11e9



  • 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).


  • Admin

    @itbeyond I responded in the other thread.


  • Admin

    @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.
    0_1510862025401_Unbenannt.PNG


  • Admin

    @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...


  • Admin

    @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!



  • @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?



  • 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.



  • Hi,

    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.

    0_1515952260956_c30753a1-053c-4177-85cc-6a4112408cb5-image.png



  • @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:
    b3316.



  • @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?



  • There are already support for rfm69?



  • 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.

    My setup:
    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.



  • 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.

    Luiz


  • Admin

    @luizrrocha Can you post your sketch and (if available) debug log here?



  • Hello bootloader support ATMEGA328PB now this uC is cheaper than 328p? Best regards



  • @vidin You can simply program the 328pb with the standard bootloader using AVRDUDESS.
    The pb version is software compatible with the p version.



  • Hi! Where can I download MYSBootloader 1.3 pre-release & MYSController 1.0.0beta? The given link is not working.



  • @Alan-Sales it seems the project is abandoned. But I have it, so please use this link:

    https://www.dropbox.com/s/b0qls8a251ol4tc/MYSController.zip?dl=0

    @tekka maybe you could share the code somewhere? Maybe someone else could make a use of it or develop it further?



  • Anyone else experiencing crashing of the application after about 10seconds?



  • @iguaan The same applies to me. The application crashes after a few seconds after launching (Windows 10). No problem before on the same system, so I suspect a Windows update but I don't know which one.



  • Hi all,
    I think I have found the problem, the program at startup makes a connection (probably to look for an update) to the following address 162.55.0.134 (port 80) but it fails, this blocks the program for several minutes, unfortunately without the sources it is not possible solve the problem.
    BR
    Angelo



  • There's another somewhat way around:

    you just need to open prog and then close when it gets stuck and then clik try to restore or wait button few times:
    https://pasteboard.co/GQTHDnaQsawY.png
    then you should get this screen at some point and then press ok/ignore and it works
    (https://pasteboard.co/9iuz1LC7kgWC.png

    needs several tries.



  • MYSController is crashing me too... Are there any alternatives to update the firmware of mysensors nodes?



  • @Mac65 Good catch! I blocked MYSController from acessing the network in the Windows Firewall and... it works! Only block TCP port 80 if you are connecting to a MySensors TCP gateway.



  • @nfj25 said in MYSBootloader 1.3 pre-release & MYSController 1.0.0beta:

    om acessing the network in the Windows Firewall and... it works! Only block TCP port 80 if you are connecting to a MySensors TCP gateway.

    Can't get it working that way, even if i block all the traffic on Myscontroller.



  • @iguaan said in MYSBootloader 1.3 pre-release & MYSController 1.0.0beta:

    @nfj25 said in MYSBootloader 1.3 pre-release & MYSController 1.0.0beta:

    om acessing the network in the Windows Firewall and... it works! Only block TCP port 80 if you are connecting to a MySensors TCP gateway.

    Can't get it working that way, even if i block all the traffic on Myscontroller.

    Got it working, I have program on onedrive and seemed that automatically generated path in rules didn't work:
    "%USERPROFILE%\OneDrive\MYSController\MYSController.exe"
    Had to change it to "C:\Users\user\OneDrive\MYSController" and it works now, great success.



  • Today I couldn't get it to work again unless I blocked all ports, ran program and then unblock again (to access GW).
    Solution was to block myscontroller from accessing only that remote IP on all ports, letting me still connect to gateway without any fiddling in firewall settings on every program start.

    Hope this solution stays for good 🙂



  • If anyone is getting "Property 'bootloader.tool.' is undefined" error with arduino 2.x when trying to burn bootloader, then you just have to add another row in bold below to boards.txt file

    MYSBL.upload.tool=avrdude
    MYSBL.upload.protocol=arduino
    MYSBL.upload.maximum_size=30720
    MYSBL.upload.maximum_data_size=2048
    MYSBL.bootloader.tool=avrdude
    MYSBL.bootloader.tool.default=avrdude



  • Today i suddenly find out, that Tekka updated app. Old app said "there is an update" and i've clicked link, which lead me to dropbox page.
    So anyone, who previously blocked all traffic for program (@iguaan , @nfj25 , @Mac65 , @tplet) - you may want unblock it in your firewall and update.
    I just replaced MYSController.exe and MYSController.ini files, leaving all other - it worked! Did not yet tested all functionality. But still make backup of all files for sure before dong that. Also you may need click on sensor and choose "settings->offline FOTA update" in order OTA to work. I'm wondering what does "online" version mean...
    Thank you very much, Tekka!



  • @tekka
    Is there any changelog to it also or it was just made officially available again?
    although last online status was 22 AUG 2020, so anyone else can confirm anything about it?
    I'd just be cautious without confirmation.



Suggested Topics

  • 482
  • 9
  • 3
  • 189
  • 1
  • 10
  • 73
  • 50

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts