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. Troubleshooting
  3. Initialize node with different radio channel

Initialize node with different radio channel

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 3.4k Views
  • 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.
  • ferpandoF Offline
    ferpandoF Offline
    ferpando
    Hero Member
    wrote on last edited by
    #1

    I'm trying to choose another channel to make a second network of sensors like this

    gw.begin(incomingMessage, 0, true, 0, RF24_PA_MAX, 80, RF24_250KBPS);
    

    but I'm getting an error

    EthernetGateway.ino: In function 'void setup()':
    EthernetGateway:154: error: no matching function for call to 'MySensor::begin(void (&)(const MyMessage&), int, bool, int, rf24_pa_dbm_e, int, rf24_datarate_e)'
    

    it seems the function does not accept the parameters stated in the API docs

    How can I achieve this then?

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      You'll have to change channel in MyConfig.h if you're using 1.5.

      Not sure which API doc you're referring to but you should look here:
      http://www.mysensors.org/download/sensor_api_15#the-full-api

      1 Reply Last reply
      0
      • ferpandoF Offline
        ferpandoF Offline
        ferpando
        Hero Member
        wrote on last edited by ferpando
        #3

        @hek said:

        http://www.mysensors.org/download/sensor_api_15#the-full-api

        That's what I was looking at.
        Take a look at the begin method described there:

        Starting up the library
        
        To initialize radio and start the library, you must call begin(). Begin initializes the sensor node but you can also configure the sensor node operating parameters manually. Call this before anything else in the library
        
        void begin(void (*_msgCallback)(const MyMessage &), uint8_t nodeId, boolean repeaterMode,
        		uint8_t parentNodeId, rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate);
        
        incomingMessageCallback - Callback function for incoming messages from other nodes or controller and request responses. Default is NULL.
        nodeId - The unique id (1-254) for this sensor. Default is AUTO(255) which means sensor tries to fetch an id from controller.
        
        repeaterMode - Activate repeater mode. This node will forward messages to other nodes in the radio network. Make sure to call process() regularly. Default in false
        
        parentNodeId - Use this to force node to always communicate with a certain parent node. Default is AUTO which means node automatically tries to find a parent.
        
        paLevel - Radio PA Level for this sensor. Default RF24_PA_MAX
        
        channel - Radio channel. Default is channel 76
        
        dataRate - Radio transmission speed. Default RF24_250KBPS
        

        This should be removed from the page if not possible any more in 1.5 because can cause confusion.

        Thank you for the pointer. I'll take a look at MyConfig.h

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          Yes, missed that one. Will remove it. Thanks for reporting.

          1 Reply Last reply
          0
          • ferpandoF Offline
            ferpandoF Offline
            ferpando
            Hero Member
            wrote on last edited by
            #5

            Why did you remove the possibility? if I may ask

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              When radio drivers setup was created in 1.5 the channel radio constructor argument was simply forgotten.

              I think there was a pull request fixing this but I will probably not do any more patches of 1.5.

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


              12

              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