MySensors 1.5.2 Released


  • Contest Winner

    We are happy to announce a maintenance release of MySensors library to 1.5.2!

    This version is backward compatible with 1.5.1 and contain security related bugfixes and stabilizations:

    • Backport of bugfix (#259) in repeaters when forwarding signed messages
    • Prevent SecureActuator from accepting ACKs as commands
    • Make sure nodes not supporting signing informs gateway
    • Fixes addressing bug in _doSign bitfield
    • Stabilizes Jenkins

    It is recommended that you update all your nodes and gateways if you use message signing.



  • yeah!

    is it possible to update the gateway via shell?


  • Contest Winner

    How do you mean 'via shell'? Using avrdude it is possible to flash the built hex file via a shell yes. But I don't know the exact arguments for that.



  • @Anticimex like homeduino with:

    sudo apt-get install arduino-core avr-libc avrdude binutils-avr gcc-avr libconfig-yaml-perl libftdi1 libyaml-perl screen python-serial
    git clone --recursive https://github.com/pimatic/homeduino.git
    make upload
    

  • Contest Winner

    Well, that is up to you. It depends on the HW you have used for your GW. The library is just software and how you choose to download that SW to your HW is entirely up to you 🙂 This is a SW release, so you can flash it exactly as you flashed it before, or in a new way if you prefer that. But the method of flashing is totally decoupled from the contents of release 1.5.2.
    And when it comes to OTA updates, there are no changes in this release compared to 1.5.1 so you can expect the same featureset with respect to OTA functionality.


  • Hero Member

    How can I do the following on this Library version?

    #define MY_NODE_ID 12
    #define RF24_CE_PIN		4	
    #define RF24_CS_PIN		10	
    #define RF24_PA_LEVEL	RF24_PA_MAX
    
    MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL);
    
    MySensor (transport);
    
    
    void setup()
    {             gw.begin(NULL, MY_NODE_ID);
    

    Cant seem to wrap my head around this. btw, I'm using Codebender.


  • Contest Winner

    There is no difference in how you write your sketch in 1.5.2 compared to 1.5.1. So I am not sure I understand your question.


  • Hero Member

    Whell a sketch used to compile just fine using 1.5 but now I get:

    In file included from (sketch file) MultiTemp.ino:39:
    (personal library file) MySensors/MySensor.h:158:70: error: unknown type name 'MyHwDriver'
    MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
    ^
    (sketch file) MultiTemp.ino:71:10: error: redefinition of 'transport' with a different type: 'MySensor' vs 'MyTransportNRF24'
    MySensor(transport);
    ^
    (sketch file) MultiTemp.ino:69:18: note: previous definition is here
    MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL);


  • Contest Winner

    If you skipped on 1.5.1 and went from 1.5 to 1.5.2 I think @hek needs to fill you (and me) in on what changes has been made.


  • Hero Member

    Btw, I just upload the MySensor folder from the library as a .zip to codebender. Do I need anything outside this folder?


  • Contest Winner

    I don't think so. Perhaps it helps to re-download the image. Which link did you use? The zip link to 1.5.2 is here.


  • Admin

    Github is the best place. I have a vague memory of routing problems fixed in 1.5.1.
    https://github.com/mysensors/Arduino/releases


  • Hero Member

    Tried to get the Lib again but it does not seem to be any different:

    Trying to compile the sketch (coodiebender.something/sketch:213307) unchanged results in this:

    In file included from (sketch file) MultiTemp.ino:35:
    (personal library file) MySensors/MySensor.h:158:70: error: unknown type name 'MyHwDriver'
            MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                                                                                ^
    (sketch file) MultiTemp.ino:63:10: error: no matching constructor for initialization of 'MySensor'
    MySensor gw(transport);
    

    So I remove the "gw" but it stil complains:

    (personal library file) MySensors/MySensor.h:158:70: error: unknown type name 'MyHwDriver'
            MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                                                                                ^
    (sketch file) MultiTemp.ino:63:11: error: redefinition of 'transport' with a different type: 'MySensor' vs 'MyTransportNRF24'
    MySensor (transport);
    

    I'm just not doing it right that is all, but how should it be done?


  • Contest Winner

    Have you looked at one of the existing examples as a reference? For example the DallasTemperatureSensor.ino


  • Hero Member

    The examples do not include a transport definition


  • Hero Member

    Is there "SOMETHING" missing like this??

    MySensor gw(transport, SOMETHING);
    
    candidate constructor not viable: requires 2 arguments, but 1 was provided
            MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
    

    How do I define "MyHwDriver"??


  • Contest Winner

    Have a look at this example


  • Hero Member

    Thanks for the example @Anticimex now I know how but it is stil not working when using codebender.

    (personal library file) MySensors/MySensor.h:158:70: error: unknown type name 'MyHwDriver'
            MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                                                                                ^
    (sketch file) MultiTemp.ino:66:1: error: unknown type name 'MyHwATMega328'
    MyHwATMega328 hw; // Select AtMega328 hardware profile
    

    I tested now with Arduino IDE 1.6.5 and my sketch compiles just fine.


  • Contest Winner

    Sorry, I am not very familiar with codebender. It looks to me that the library you try to build with is very out if date if it lacks those hw definitions. I don't know how the library ends up at codebender. Perhaps @hek has some communication with them to support it.



  • Hello,

    I tried to compile with 1.5.2 and got these errors:

    
    
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp: In member function 'boolean MySensor::sendRoute(MyMessage&)':
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:27:25: error: '_doSign' was not declared in this scope
     #define DO_SIGN(node) (~_doSign[node>>3]&(1<<(node%8)))
                             ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:356:6: note: in expansion of macro 'DO_SIGN'
      if (DO_SIGN(message.destination) && message.sender == nc.nodeId && !mGetAck(message) && mGetLength(message) &&
          ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp: In member function 'boolean MySensor::process()':
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:28:25: error: '_doSign' was not declared in this scope
     #define SET_SIGN(node) (_doSign[node>>3]&=~(1<<(node%8)))
                             ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:670:6: note: in expansion of macro 'SET_SIGN'
          SET_SIGN(msg.sender);
          ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:29:27: error: '_doSign' was not declared in this scope
     #define CLEAR_SIGN(node) (_doSign[node>>3]|=(1<<(node%8)))
                               ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:673:6: note: in expansion of macro 'CLEAR_SIGN'
          CLEAR_SIGN(msg.sender);
          ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:27:25: error: '_doSign' was not declared in this scope
     #define DO_SIGN(node) (~_doSign[node>>3]&(1<<(node%8)))
                             ^
    /Users/carlierd/Arduino/libraries/MySensors/MySensor.cpp:682:40: note: in expansion of macro 'DO_SIGN'
          if (signer.requestSignatures() && DO_SIGN(msg.sender))
                                            ^
    Erreur lors de la compilation.
    

    No compilation issue with 1.5. And everything is working perfectly.

    David.


  • Admin

    @Anticimex
    Yes, I'll have to update the codebender library manually.


  • Contest Winner

    @carlierd I found a problem there. I have to make a new release. Sorry for the inconvenience!



  • @Anticimex No problem !! Thanks for the support 🙂


  • Hero Member

    @hek said:

    @Anticimex
    Yes, I'll have to update the codebender library manually.

    I have uploaded 1.5.2 library as a Personal Library in codebender. I have not had any trouble doing this before. Just tried 1.5.3 but I get the same error.


  • Admin

    candidate constructor not viable: requires 2 arguments, but 1 was provided
            MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
    

    Weird it finds the MySensors constructor, it has a default value (MyHwDriver) but doesn't use it. Darn compilers.


  • Contest Winner

    And you have selected a atmega328-based target when you build?


  • Hero Member

    @hek said:

    Weird it finds the MySensors constructor, it has a default value (MyHwDriver) but doesn't use it. Darn compilers.

    I take it you have managed to reproduce the situation or do you need some more information from me?

    @Anticimex said:

    And you have selected a atmega328-based target when you build?

    Yes, I have an "Arduino Pro Mini 5V 16MHz w/ ATmega328" selected when compiling.


  • Admin

    @korttoma said:

    I take it you have managed to reproduce the situation or do you need some more information from me?

    No, I'm currently @work.


  • Admin

    @korttoma

    Updated codebender lib to 1.5.3 and it fails with the same error you got.

    Seems like codebender doesn't define ARDUINO_ARCH_AVR for the Uno board... which is used to select the correct hw-driver here:
    https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.h#L47

    I've tried to reach Vasilis over at codebender but I guess it's a bit late for a reply today.


  • Hero Member

    I updated to 1.5.3 and I get 2 warnings just by opening arduino IDE

    Warning: platform.txt from core 'MySensors AVR based boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
    WARNING: Category '' in library UIPEthernet is not valid. Setting to 'Uncategorized'
    

    I'm using IDE 1.6.6
    It was working before with MySensors 1.5


  • Contest Winner

    Those warnings are no reason for concern. Everything works like before.


  • Hero Member

    @Anticimex
    Ok, but is there a way to remove them?

    I can confirm it compiles and uploads correctly.

    Thanks


  • Contest Winner

    Should just be a matter of editing platform.txt I suppose. I have not worked with those aspects. The release only change signing related parts. Those warnings are probably relating to IDE and versions of board support packages.


  • Admin

    @korttoma

    1.5.3 in codebender compiles now.

    They're only compatible with arduino IDE 1.0.5 currently. Which means they don't define ARDUINO_ARCH_AVR which MySensors relies on.

    Patched the codebender library (manually defining this) as a workaround until they update their things.


  • Hero Member

    @hek how do I Patch my copy of 1.5.3 or where can I download the Patched version? Seems like it is stil 1.4 that is used on codebender unless you upload your own version.


Log in to reply
 

Suggested Topics

  • 3
  • 109
  • 10
  • 347
  • 109
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts