Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Does the simple security option work for a serial gateway?

Does the simple security option work for a serial gateway?

Scheduled Pinned Locked Moved General Discussion
12 Posts 3 Posters 1.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • alowhumA Offline
    alowhumA Offline
    alowhum
    Plugin Developer
    wrote on last edited by
    #3

    I'm not sure I understand completely.

    Why would I need to change anything on the pi if I use a serial Arduino gateway? Wouldn't the Arduino take care of the encryption with all the nodes?

    My expectation/assumption is that from the Raspberry Pi's perspective it will just see a normal unencrypted Arduino gateway with which it communicates over serial.

    If I create an Arduino to use as the gateway, then I don't need to install any MYSensors software on the Pi, right? Then in Domoticz I just select "MySensors Serial Gateway" and I'm done?

    AnticimexA 1 Reply Last reply
    0
    • alowhumA alowhum

      I'm not sure I understand completely.

      Why would I need to change anything on the pi if I use a serial Arduino gateway? Wouldn't the Arduino take care of the encryption with all the nodes?

      My expectation/assumption is that from the Raspberry Pi's perspective it will just see a normal unencrypted Arduino gateway with which it communicates over serial.

      If I create an Arduino to use as the gateway, then I don't need to install any MYSensors software on the Pi, right? Then in Domoticz I just select "MySensors Serial Gateway" and I'm done?

      AnticimexA Offline
      AnticimexA Offline
      Anticimex
      Contest Winner
      wrote on last edited by
      #4

      @alowhum sorry, I misunderstood. Yes, that is correct. But you have to recompile the GW if you change key. Your controller remain unaffected.

      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

      1 Reply Last reply
      0
      • alowhumA Offline
        alowhumA Offline
        alowhum
        Plugin Developer
        wrote on last edited by
        #5

        Perfect. Thanks!

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #6

          I'm looking for the easiest way to allow users of the Candle Manager (which runs on the Raspberry Pi) to change the Simple Security password.

          As mentioned above, the easiest route would be to create an Arduino gateway node that is plugged into the Raspberry Pi.

          However, I'm still dreaming of keeping the whole device small and compact by directly plugging the NRF24 onto the Raspberry Pi's GPIO pins, and using the Ethernet Gateway option.

          As @Anticimex mentioned above, this would currently mean that whenever the users changes the password, the entire ethernet gateway software would have to be recompiled.

          I have two questions:

          1. I want to make this possible straight form the Candle Manager. However, after a bit or wrestling the exact .configure command to use the Simple Security option still eludes me. What would this command look like?

          2. Could there theoretically be a way to change the password without having to recompile the gateway software? Recompiling takes quite a while. It this would have to be built in, is that something worth creating a feature request for? Something like:

          mysgw -newSimplePassword="batmanRocks"
          
          AnticimexA 2 Replies Last reply
          0
          • alowhumA alowhum

            I'm looking for the easiest way to allow users of the Candle Manager (which runs on the Raspberry Pi) to change the Simple Security password.

            As mentioned above, the easiest route would be to create an Arduino gateway node that is plugged into the Raspberry Pi.

            However, I'm still dreaming of keeping the whole device small and compact by directly plugging the NRF24 onto the Raspberry Pi's GPIO pins, and using the Ethernet Gateway option.

            As @Anticimex mentioned above, this would currently mean that whenever the users changes the password, the entire ethernet gateway software would have to be recompiled.

            I have two questions:

            1. I want to make this possible straight form the Candle Manager. However, after a bit or wrestling the exact .configure command to use the Simple Security option still eludes me. What would this command look like?

            2. Could there theoretically be a way to change the password without having to recompile the gateway software? Recompiling takes quite a while. It this would have to be built in, is that something worth creating a feature request for? Something like:

            mysgw -newSimplePassword="batmanRocks"
            
            AnticimexA Offline
            AnticimexA Offline
            Anticimex
            Contest Winner
            wrote on last edited by
            #7

            @alowhum technically I do not think it will be a problem to have the rPi gw read the static data from a file at runtime. I do not have good insight in the rPi port though so I don't know how much work will be needed to support that.

            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

            1 Reply Last reply
            1
            • alowhumA Offline
              alowhumA Offline
              alowhum
              Plugin Developer
              wrote on last edited by
              #8

              Thanks. Holding the key in a file could be a nice way to make generating it more generic.

              1 Reply Last reply
              0
              • alowhumA alowhum

                I'm looking for the easiest way to allow users of the Candle Manager (which runs on the Raspberry Pi) to change the Simple Security password.

                As mentioned above, the easiest route would be to create an Arduino gateway node that is plugged into the Raspberry Pi.

                However, I'm still dreaming of keeping the whole device small and compact by directly plugging the NRF24 onto the Raspberry Pi's GPIO pins, and using the Ethernet Gateway option.

                As @Anticimex mentioned above, this would currently mean that whenever the users changes the password, the entire ethernet gateway software would have to be recompiled.

                I have two questions:

                1. I want to make this possible straight form the Candle Manager. However, after a bit or wrestling the exact .configure command to use the Simple Security option still eludes me. What would this command look like?

                2. Could there theoretically be a way to change the password without having to recompile the gateway software? Recompiling takes quite a while. It this would have to be built in, is that something worth creating a feature request for? Something like:

                mysgw -newSimplePassword="batmanRocks"
                
                AnticimexA Offline
                AnticimexA Offline
                Anticimex
                Contest Winner
                wrote on last edited by Anticimex
                #9

                @alowhum but please remember that although the pi might get the ability to replace keys in runtime, nodes will not be able to do that. And that is by design.

                Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                1 Reply Last reply
                1
                • alowhumA Offline
                  alowhumA Offline
                  alowhum
                  Plugin Developer
                  wrote on last edited by alowhum
                  #10

                  Right now, when a user changes the password through the interface they are indeed warned that this means they will have to re-upload code to all the nodes. All nodes would use the SIMPLE_SECURITY option.

                  But I was hoping that a later version might do that over the air somehow. Couldn't the nodes be updated Over The Air?

                  I haven't looked into that enough yet, I must admit.

                  • Is it true that OTA only works if you flash a new bootloader onto the Arduino Nano? - Can flashing a new bootloader only be done via the ICMP headers? Or can this be done via Serial? Or is it somehow possible to do OTA from 'userspace' with a library?

                  I want my users to only ever have to connect their Arduino via USB.

                  Thanks for that extra clarification by the way.

                  // I'm reading this: https://www.mysensors.org/about/fota

                  It says the beta version of the MYSbootloader can be loaded onto the Arduino via USB. @tekka That looks promising?

                  The MySensors master branch does not support upload through ftdi / serial (but the development branch does).
                  

                  .. Hmmm..or does that mean the normal version ONLY supports uploading user code via the air? And the development version also supports normal uploading via USB?

                  scalzS 1 Reply Last reply
                  0
                  • alowhumA alowhum

                    Right now, when a user changes the password through the interface they are indeed warned that this means they will have to re-upload code to all the nodes. All nodes would use the SIMPLE_SECURITY option.

                    But I was hoping that a later version might do that over the air somehow. Couldn't the nodes be updated Over The Air?

                    I haven't looked into that enough yet, I must admit.

                    • Is it true that OTA only works if you flash a new bootloader onto the Arduino Nano? - Can flashing a new bootloader only be done via the ICMP headers? Or can this be done via Serial? Or is it somehow possible to do OTA from 'userspace' with a library?

                    I want my users to only ever have to connect their Arduino via USB.

                    Thanks for that extra clarification by the way.

                    // I'm reading this: https://www.mysensors.org/about/fota

                    It says the beta version of the MYSbootloader can be loaded onto the Arduino via USB. @tekka That looks promising?

                    The MySensors master branch does not support upload through ftdi / serial (but the development branch does).
                    

                    .. Hmmm..or does that mean the normal version ONLY supports uploading user code via the air? And the development version also supports normal uploading via USB?

                    scalzS Offline
                    scalzS Offline
                    scalz
                    Hardware Contributor
                    wrote on last edited by scalz
                    #11

                    Hello,

                    • yes on the Arduino Nano, OTA will work only if you flash the mcu with a special bootloader (MYSBootloader, DualOptiboot for example).
                      The stock bootloader only handles serial upload.
                    • yes on the Aduino Nano, flashing bootloader needs ICSP pins. (and for a ARM mcu, it would need a jlink for example)
                    • it means MYSBootloader can upload a sketch via OTA or ftdi because if I remember well, in first version, only OTA was available. It's about sketch upload, not bootloader upload.
                    1 Reply Last reply
                    0
                    • alowhumA Offline
                      alowhumA Offline
                      alowhum
                      Plugin Developer
                      wrote on last edited by
                      #12

                      @scalz Thank you for the clarification.

                      Is there a way to enable OTA that would be 'n00b friendly'? Perhaps by attaching a small device that can then itself be programmed via the Nano's USB port?

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      15

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular