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. Feature Requests
  3. Ability to change channel & or base radio ID

Ability to change channel & or base radio ID

Scheduled Pinned Locked Moved Feature Requests
10 Posts 5 Posters 1.6k Views 6 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.
  • phil2020P Offline
    phil2020P Offline
    phil2020
    wrote on last edited by
    #1

    Hi,

    It's my understanding that you can change the channel and/or base radio ID via defines at the top of the sketch, but this means you can't change anything dynamically or via the program at run-time?

    Could the MySensors system be enhanced to enable selection of channel number and/or base radio ID, for example in before(), so that a switch value could be read and so the radio could be configured to be set at different channel or base radio ID?

    This would be a way to enable devices to be set to non-interfering channel or radio ID without a re-program? This sort of approach is used for things like wireless door-bell systems, so if the neighbour has the same setup it doesn't trigger your bell or interfere?

    Thanks, Philip

    YveauxY electrikE 2 Replies Last reply
    1
    • phil2020P phil2020

      Hi,

      It's my understanding that you can change the channel and/or base radio ID via defines at the top of the sketch, but this means you can't change anything dynamically or via the program at run-time?

      Could the MySensors system be enhanced to enable selection of channel number and/or base radio ID, for example in before(), so that a switch value could be read and so the radio could be configured to be set at different channel or base radio ID?

      This would be a way to enable devices to be set to non-interfering channel or radio ID without a re-program? This sort of approach is used for things like wireless door-bell systems, so if the neighbour has the same setup it doesn't trigger your bell or interfere?

      Thanks, Philip

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @phil2020 said in Ability to change channel & or base radio ID:

      you can't change anything dynamically or via the program at run-time?

      Correct

      Could the MySensors system be enhanced to enable selection of channel number and/or base radio ID, for example in before(), so that a switch value could be read and so the radio could be configured to be set at different channel or base radio ID?

      Yes, it probably could. You can enter a new issue here and describe your ideas.

      This would be a way to enable devices to be set to non-interfering channel or radio ID without a re-program?

      The normal way to go (as channel and base-ID are globally set for your complete mysensors network) is to select an available channel/base-ID combination and program this in all nodes and the gateway.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • phil2020P phil2020

        Hi,

        It's my understanding that you can change the channel and/or base radio ID via defines at the top of the sketch, but this means you can't change anything dynamically or via the program at run-time?

        Could the MySensors system be enhanced to enable selection of channel number and/or base radio ID, for example in before(), so that a switch value could be read and so the radio could be configured to be set at different channel or base radio ID?

        This would be a way to enable devices to be set to non-interfering channel or radio ID without a re-program? This sort of approach is used for things like wireless door-bell systems, so if the neighbour has the same setup it doesn't trigger your bell or interfere?

        Thanks, Philip

        electrikE Offline
        electrikE Offline
        electrik
        wrote on last edited by
        #3

        @phil2020 Perhaps you can get some inspiration from this project https://forum.mysensors.org/topic/9178/nrf24doctor/4
        Here these are done dynamically.

        1 Reply Last reply
        0
        • mfalkviddM Online
          mfalkviddM Online
          mfalkvidd
          Mod
          wrote on last edited by mfalkvidd
          #4

          There have been some earlier discussions on this topic, that might help find a solution. One example:
          https://forum.mysensors.org/topic/7760/change-the-channel-number-for-the-entire-network-find-the-channel-for-the-new-node

          The solution described in https://github.com/mysensors/MySensors/issues/701 should work.

          1 Reply Last reply
          0
          • phil2020P Offline
            phil2020P Offline
            phil2020
            wrote on last edited by
            #5

            Thanks for the replies. From looking through those links, it appears that instead of just using a fixed #define value, you can instead reference a variable and assign the variable's value programmatically in the before() section. For example you could load in the value required for channel or base radio ID from EEPROM memory.

            So you can, in a sense, dynamically change the values through store of updated parameters into EEPROM and effect that change via a software reset process that you can call from your program.

            1 Reply Last reply
            1
            • G Offline
              G Offline
              Guillermo Schimmel
              wrote on last edited by
              #6

              I would definitely welcome that improvement.

              I think that a desired method would be a default via #defines, and some way to overide that programatically.

              To what channel we move? I think that some kind of physical input, even taking some pins, would be great. We could "encode" 2^n inputs in order to change the channel from default. Or for more advanced use cases we could change it via a sensor variable for OTA frecuency setting.

              Thanks to you all

              mfalkviddM 1 Reply Last reply
              0
              • G Guillermo Schimmel

                I would definitely welcome that improvement.

                I think that a desired method would be a default via #defines, and some way to overide that programatically.

                To what channel we move? I think that some kind of physical input, even taking some pins, would be great. We could "encode" 2^n inputs in order to change the channel from default. Or for more advanced use cases we could change it via a sensor variable for OTA frecuency setting.

                Thanks to you all

                mfalkviddM Online
                mfalkviddM Online
                mfalkvidd
                Mod
                wrote on last edited by
                #7

                @guillermo-schimmel could you clarify what you refer to by "that improvement"?

                Do you mean the define described in https://forum.mysensors.org/topic/5410/changing-node-id-at-run-time/5 ? If so, that's already possible. If you mean something else, it would be nice if you could describe it so people can consider implementing it.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  Guillermo Schimmel
                  wrote on last edited by
                  #8

                  Hi @mfalkvidd, and thanks for you time.

                  I see that there is already a mechanism for altering the node id on runtime.

                  What I would like to know is if there is something similar to change the RF Channel (and/or) RF Power, also on runtime.

                  Something in the likes of transportAssignNodeID(), perhaps transportAssignRFChannel().

                  regards

                  mfalkviddM 1 Reply Last reply
                  0
                  • G Guillermo Schimmel

                    Hi @mfalkvidd, and thanks for you time.

                    I see that there is already a mechanism for altering the node id on runtime.

                    What I would like to know is if there is something similar to change the RF Channel (and/or) RF Power, also on runtime.

                    Something in the likes of transportAssignNodeID(), perhaps transportAssignRFChannel().

                    regards

                    mfalkviddM Online
                    mfalkviddM Online
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #9

                    @guillermo-schimmel from what I understand, you should be able to do this:

                    int8_t myChannel;
                    
                    #define MY_RF24_CHANNEL myChannel
                    #define CHANNEL_PIN 4
                    
                    void before () {
                      // read I/O pins to determine which channel to use.
                      // This simple example lets you switch between 42 and 100 by holding down a button at boot
                      if (digitalRead(CHANNEL_PIN)) {
                        myChannel = 42;
                      } else {
                        myChannel = 100;
                      }
                    }
                    
                    G 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @guillermo-schimmel from what I understand, you should be able to do this:

                      int8_t myChannel;
                      
                      #define MY_RF24_CHANNEL myChannel
                      #define CHANNEL_PIN 4
                      
                      void before () {
                        // read I/O pins to determine which channel to use.
                        // This simple example lets you switch between 42 and 100 by holding down a button at boot
                        if (digitalRead(CHANNEL_PIN)) {
                          myChannel = 42;
                        } else {
                          myChannel = 100;
                        }
                      }
                      
                      G Offline
                      G Offline
                      Guillermo Schimmel
                      wrote on last edited by
                      #10

                      @mfalkvidd that's really great. I'll try. Thank you very much.

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


                      17

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 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