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. RFM69 problems

RFM69 problems

Scheduled Pinned Locked Moved Troubleshooting
34 Posts 5 Posters 14.3k 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.
  • Cliff KarlssonC Cliff Karlsson

    Thanks but I can't say that I understand, do I have to add a second "true" at the end?

    hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #6

    @Cliff-Karlsson

    Sorry, missed the "true" argument you already had in your argument list.

    1 Reply Last reply
    0
    • Cliff KarlssonC Offline
      Cliff KarlssonC Offline
      Cliff Karlsson
      wrote on last edited by
      #7

      Ok, but do I still need to add some RFM info to the sensor sketches?

      I really think that there should be some tutorial of everything that needs to be modified in the gateway and sensor sketches to be able to use the RFM69 radio

      hekH 1 Reply Last reply
      0
      • Cliff KarlssonC Cliff Karlsson

        Ok, but do I still need to add some RFM info to the sensor sketches?

        I really think that there should be some tutorial of everything that needs to be modified in the gateway and sensor sketches to be able to use the RFM69 radio

        hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #8

        @Cliff-Karlsson said:

        Ok, but do I still need to add some RFM info to the sensor sketches?

        Yes, default is that NRF radio gets initialized.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BenCranston
          wrote on last edited by
          #9

          @Cliff-Karlsson
          Here is what I did to get my RFM69HW's working (the high power variant):

          from MyConfig.h:

          /**********************************
          *  RFM69 Driver Defaults
          ***********************************/
          // Default network id. Use the same for all nodes that will talk to each other
          #define RFM69_NETWORKID     100
          
          // Default frequency to use. This must match the hardware version of the RFM69 radio (uncomment one):
          #define RFM69_FREQUENCY     RF69_915MHZ
          
          // Enable this for encryption of packets
          #define RFM69_ENABLE_ENCRYPTION
          #define RFM69_ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
          #endif
          

          I had trouble with the #isRFM69HW define not working in the sketch for whatever reason, so I just went into MyTransportRFM69.h and modified the default of "false" to "true" like so:

          class MyTransportRFM69 : public MyTransport
          {
          public:
                  MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=true, uint8_t interruptNum=RF69_IRQ_NUM);
          

          Then in my sketch, something like this:

          // Enable and select radio type attached
          #define MY_RADIO_RFM69
          #include <SPI.h>
          #include <MySensor.h>
          MySensor gw;
          
          void setup()
          {
            gw.begin(incomingMessage, AUTO, true);
            // Send the sketch version information to the gateway and Controller
            gw.sendSketchInfo(SN, SV);
          
            // Register all sensors to gw (they will be created as child devices)
            gw.present(BUTTON1, S_LIGHT);  // Top Button
          }
          
          void loop()
          {
            gw.process(); // tickle the MySensors framework
          
            check_buttons();  // update logical state from button changes
          
            update_mote();  //  Apply any gathered state changes to the actual hardware
          }
          ... and bunch of other code not shown...
          

          There's likely a better way, but my brute force worked. I'd recommend that you start testing without the code signing turned on. It's easier to debug things not talking to the gateway with less features enabled as a start. Then add back in the message signing and you should be up and running. Once you've got your MyConfig.h all happy then it's really easy to use and replicate in your node sketches.

          1 Reply Last reply
          0
          • Cliff KarlssonC Offline
            Cliff KarlssonC Offline
            Cliff Karlsson
            wrote on last edited by
            #10

            Thank, will try asap. Just a question, in your gateway did you only add "MyTransportRFM69 transport;" or did you also add the stuff from your sketch example like: #define MY_RADIO_RFM69 ?

            B 2 Replies Last reply
            0
            • Cliff KarlssonC Cliff Karlsson

              Thank, will try asap. Just a question, in your gateway did you only add "MyTransportRFM69 transport;" or did you also add the stuff from your sketch example like: #define MY_RADIO_RFM69 ?

              B Offline
              B Offline
              BenCranston
              wrote on last edited by
              #11

              @Cliff-Karlsson The only things I really had to edit, was in MyConfig.h for the network ID, Frequency and encryption settings. In the sketch you just add the first line "#define MY_RADIO_RFM69" and the rest gets sorted out by the libraries. If you don't add the #define MY_RADIO_RFM69 it will default as @hek indicated to the NRF radio.

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

                @Cliff-Karlsson

                Note that @BenCranston is using the development branch.

                1 Reply Last reply
                0
                • Cliff KarlssonC Cliff Karlsson

                  Thank, will try asap. Just a question, in your gateway did you only add "MyTransportRFM69 transport;" or did you also add the stuff from your sketch example like: #define MY_RADIO_RFM69 ?

                  B Offline
                  B Offline
                  BenCranston
                  wrote on last edited by
                  #13

                  @Cliff-Karlsson I just posted to Git my Serial gateway and a node. The code is still in flux, but it might help your endeavors. Find it here: https://github.com/TheCranston/MY-Sensors.git Caveat emptor... :) (first time posting anything via Github, so please excuse any conventions that I might have ignored - I'm learning)

                  @hek, good point. I just checked my Version.h and it says "1.5" which i thought was the latest master... humm... gotta check it over closely now.

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

                    I will do a couple of adjustments of the RF69 stuff tonight here on dev-branch.

                    Add a mis-wired check like we do for the RF24 driver. I also currently you have to do a
                    #define MY_IS_RFM69HW true
                    to activate the HW-version... this will be changed to
                    #define MY_IS_RFM69HW

                    1 Reply Last reply
                    0
                    • Cliff KarlssonC Offline
                      Cliff KarlssonC Offline
                      Cliff Karlsson
                      wrote on last edited by
                      #15

                      Ok, one more stupid question. If I want to try the developer branch do I just install the regular 1.5 zip amd then just overwrite them with the files from the developer branch on git?

                      1 Reply Last reply
                      0
                      • Cliff KarlssonC Offline
                        Cliff KarlssonC Offline
                        Cliff Karlsson
                        wrote on last edited by
                        #16

                        Ok, I think I have figured it out. But I am trying this sketch:

                        /**
                         * The MySensors Arduino library handles the wireless radio link and protocol
                         * between your home built sensors/actuators and HA controller of choice.
                         * The sensors forms a self healing radio network with optional repeaters. Each
                         * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                         * network topology allowing messages to be routed to nodes.
                         *
                         * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                         * Copyright (C) 2013-2015 Sensnology AB
                         * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                         *
                         * Documentation: http://www.mysensors.org
                         * Support Forum: http://forum.mysensors.org
                         *
                         * This program is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License
                         * version 2 as published by the Free Software Foundation.
                         *
                         *******************************
                         *
                         * DESCRIPTION
                         * The ArduinoGateway prints data received from sensors on the serial link. 
                         * The gateway accepts input on seral which will be sent out on radio network.
                         *
                         * The GW code is designed for Arduino Nano 328p / 16MHz
                         *
                         * Wire connections (OPTIONAL):
                         * - Inclusion button should be connected between digital pin 3 and GND  
                         * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
                         *
                         * LEDs (OPTIONAL):
                         * - To use the feature, uncomment MY_LEDS_BLINKING_FEATURE in MyConfig.h
                         * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
                         * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
                         * - ERR (red) - fast blink on error during transmission error or recieve crc error 
                         * 
                         */
                        
                        // Enable debug prints to serial monitor
                        #define MY_DEBUG 
                        
                        
                        // Enable and select radio type attached
                        //#define MY_RADIO_NRF24
                        #define MY_RADIO_RFM69
                        #define MY_IS_RFM69HW
                        // Set LOW transmit power level as default, if you have an amplified NRF-module and
                        // power your radio separately with a good regulator you can turn up PA level. 
                        #define MY_RF24_PA_LEVEL RF24_PA_LOW
                        
                        // Enable serial gateway
                        #define MY_GATEWAY_SERIAL
                        
                        // Flash leds on rx/tx/err
                        #define MY_LEDS_BLINKING_FEATURE
                        // Set blinking period
                        #define MY_DEFAULT_LED_BLINK_PERIOD 300
                        
                        // Inverses the behavior of leds
                        //#define MY_WITH_LEDS_BLINKING_INVERSE
                        
                        // Enable inclusion mode
                        #define MY_INCLUSION_MODE_FEATURE
                        // Enable Inclusion mode button on gateway
                        #define MY_INCLUSION_BUTTON_FEATURE
                        
                        // Inverses behavior of inclusion button (if using external pullup)
                        //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
                        
                        // Set inclusion mode duration (in seconds)
                        #define MY_INCLUSION_MODE_DURATION 60 
                        // Digital pin used for inclusion mode button
                        #define MY_INCLUSION_MODE_BUTTON_PIN  3 
                        
                        #define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
                        #define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
                        #define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
                        
                        #include <SPI.h>
                        #include <MySensor.h>  
                        
                        void setup() { 
                          // Setup locally attached sensors
                        }
                        
                        void presentation() {
                         // Present locally attached sensors 
                        }
                        
                        void loop() { 
                          // Send locally attached sensor data here 
                        }
                        
                        
                        
                        
                        

                        But I am getting this error when trying to complie:

                        Arduino: 1.6.6 (Windows 7), Board: "Arduino Nano, ATmega328"
                        
                        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: platform.txt from core 'Mysensors SAMD (32-bits ARM Cortex-M0+) 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.
                        Library can't use both 'src' and 'utility' folders.
                        
                        Error compiling.
                        
                          This report would have more information with
                          "Show verbose output during compilation"
                          enabled in File > Preferences.
                        
                        1 Reply Last reply
                        0
                        • hekH Offline
                          hekH Offline
                          hek
                          Admin
                          wrote on last edited by hek
                          #17

                          Do like it says, turn on verbose output.

                          (you have to replace the old MySensors-folder under libraries with the new)

                          1 Reply Last reply
                          0
                          • Cliff KarlssonC Offline
                            Cliff KarlssonC Offline
                            Cliff Karlsson
                            wrote on last edited by
                            #18

                            Ok, I turned on the verbose output and this is what I got:

                            Arduino: 1.6.6 (Windows 7), Board: "Arduino Nano, ATmega328"
                            
                            C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Cliff\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10606 -build-path "C:\Users\Cliff\AppData\Local\Temp\build8a702dc9de8b52c506f71d8c8aabed09.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Cliff\AppData\Local\Temp\arduino_8a702dc9de8b52c506f71d8c8aabed09\GatewaySerial.ino"
                            
                            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: platform.txt from core 'Mysensors SAMD (32-bits ARM Cortex-M0+) 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.
                            Library can't use both 'src' and 'utility' folders.
                            
                            Error compiling.
                            

                            I have removed arduino IDE and all mysensor libraries, I reinstalled the arduino IDE added/replaced the librarys with the Arduino-master, then replaced again with Arduino-development.

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

                              You must have done something wrong setting it up (I'm also running 1.6.6).

                              You should get the following error using the sketch you posted above:

                              Users/hek/Documents/ArduinoGithub/libraries/MySensors/MySensor.h:195:3: error: #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
                                #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
                                 ^
                              
                              1 Reply Last reply
                              0
                              • Cliff KarlssonC Offline
                                Cliff KarlssonC Offline
                                Cliff Karlsson
                                wrote on last edited by
                                #20

                                Ok, after trying again I extracted Arduino-development to a separate folder in my sketchbook location witout replacing anything. I then got an error saying it could not find Mysensors.h so I copied it to the Gatewayserial folder and now it complies but gives me the error you specified hek. So how do I solve this? is not the gatewayserial sketch ready to complie as is?

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

                                  Oh, sorry I just copied part of the sketch above when I got the compile error.

                                  When compiling the whole file it works fine here.

                                  1 Reply Last reply
                                  0
                                  • Cliff KarlssonC Offline
                                    Cliff KarlssonC Offline
                                    Cliff Karlsson
                                    wrote on last edited by
                                    #22

                                    Ok so I should use the serialgateway sketch from the arduino master? I did not find any other serialgateway sketch in arduino development than the one I posten.

                                    hekH 1 Reply Last reply
                                    0
                                    • Cliff KarlssonC Cliff Karlsson

                                      Ok so I should use the serialgateway sketch from the arduino master? I did not find any other serialgateway sketch in arduino development than the one I posten.

                                      hekH Offline
                                      hekH Offline
                                      hek
                                      Admin
                                      wrote on last edited by
                                      #23

                                      @Cliff-Karlsson said:

                                      Ok so I should use the serialgateway sketch from the arduino master?

                                      No, you're using the right one.

                                      I extracted Arduino-development to a separate folder in my sketchbook location witout replacing anything. I then got an error saying it could not find Mysensors.h so I copied it to the Gatewayserial folder

                                      You must replace the WHOLE MySensors library folder. Not just copying the MySensors.h.

                                      1 Reply Last reply
                                      0
                                      • Cliff KarlssonC Offline
                                        Cliff KarlssonC Offline
                                        Cliff Karlsson
                                        wrote on last edited by
                                        #24

                                        Ok, tried again and I think I got it right this time as I got three tabs in the arduino IDE when opening the serialgateway-sketch, before I only got one tab.

                                        But now I have the same error as you shown hek, what does this mean:

                                        #if !defined(MY_GATEWAY_FEATURE) && !defined(MY_RADIO_FEATURE)
                                        	#error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
                                        #endif
                                        

                                        I already have this in the gateway sketch:

                                        #define MY_RADIO_RFM69
                                        
                                        #define MY_GATEWAY_SERIAL
                                        
                                        1 Reply Last reply
                                        0
                                        • Cliff KarlssonC Offline
                                          Cliff KarlssonC Offline
                                          Cliff Karlsson
                                          wrote on last edited by
                                          #25

                                          Ahh, finally. I used the sketchbook location for everything like it says in the info for 1.5. When I copied all the development libraries into the Arduino libraries folder it worked.

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


                                          21

                                          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