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. RFM gateway and sensors node with range issue

RFM gateway and sensors node with range issue

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 6 Posters 144 Views 4 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.
  • W Offline
    W Offline
    wiredfrank
    wrote on last edited by
    #5

    i tried both radio types but can not get range more than 20m max in open air, tried coil type antenna, and all sorts things including capacitor from 10uf to 100uf, i m sure there is something missing in my setup i just dont know what it is, even nrf with pcb antenna perform better in open air, i wonder if any one even using rfm69 at all or it just me banging my head around.

    S 1 Reply Last reply
    0
    • electrikE Offline
      electrikE Offline
      electrik
      wrote on last edited by
      #6

      Like @mfalkvidd said, if you use the new driver, you have to use it on all of the nodes and the gateway, as it doesn't work together with the old one.
      You said your code is a mess, maybe it is better to step back and use examples for both the node and the gateway and start from there. If that is working you can add your code. Just to exclude something is overlooked.

      1 Reply Last reply
      1
      • W wiredfrank

        i tried both radio types but can not get range more than 20m max in open air, tried coil type antenna, and all sorts things including capacitor from 10uf to 100uf, i m sure there is something missing in my setup i just dont know what it is, even nrf with pcb antenna perform better in open air, i wonder if any one even using rfm69 at all or it just me banging my head around.

        S Offline
        S Offline
        Sasquatch
        wrote on last edited by Sasquatch
        #7

        @wiredfrank roll back to old driver, use 17cm(433Mhz)/8.5cm(868 MHz) piece of straight wire as antenna.
        Solder extra 100-470uf capacitor directly to supply pins of the radios too, especially HW versions. Transient current spikes can cause all sorts of problems.

        I'm using rfm69 mixed HW and non HW versions , and 500m meters is easily achieved, even on spider dupont wire connections and 2.4v supply(2x nimh aa cells).

        also, don't rely on controller for connection tests, use debug serial output on both ends to confirm link.

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wiredfrank
          wrote on last edited by
          #8

          Thank you for suggestion, is there any sketch for ping pong type communicate to do some testing?

          scalzS 1 Reply Last reply
          0
          • W wiredfrank

            Thank you for suggestion, is there any sketch for ping pong type communicate to do some testing?

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

            @wiredfrank
            in your gw sketch, your defines should be like this:

            #define MY_RADIO_RFM69
            #define MY_RFM69_NEW_DRIVER
            #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
            #define MY_IS_RFM69HW // Omit if your RFM is not "H"
            #define MY_RFM69_IRQ_PIN D1
            #define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN
            #define MY_RFM69_CS_PIN D8 // NSS. Use MY_RFM69_SPI_CS for older versions (before 2.2.0)
            

            and there is the RFM69_RFM95_ATC_SignalReport.ino sketch for your node, in mysensors examples

            /*
             * 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-2019 Sensnology AB
             * Full contributor list: https://github.com/mysensors/MySensors/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.
             *
             *******************************
             *
             * REVISION HISTORY
             * Version 1.0 - tekka
             *
             * DESCRIPTION
             * ATC mode settings and signal report functions, on RFM69 and RFM95 nodes
             *
             */
            
            // Enable debug prints
            #define MY_DEBUG
            
            // Enable and select radio type attached
            
            // RFM69
            #define MY_RADIO_RFM69
            #define MY_RFM69_NEW_DRIVER   // ATC on RFM69 works only with the new driver (not compatible with old=default driver)
            #define MY_RFM69_FREQUENCY RFM69_433MHZ
            //#define MY_RFM69_ATC_TARGET_RSSI_DBM (-70)  // target RSSI -70dBm
            //#define MY_RFM69_MAX_POWER_LEVEL_DBM (10)   // max. TX power 10dBm = 10mW
            
            // RFM95
            //#define MY_RADIO_RFM95
            //#define MY_RFM95_ATC_TARGET_RSSI_DBM (-70)  // target RSSI -70dBm
            //#define MY_RFM95_MAX_POWER_LEVEL_DBM (10)   // max. TX power 10dBm = 10mW
            
            #include <MySensors.h>
            
            // ID of the sensor child
            #define CHILD_ID_UPLINK_QUALITY (0)
            #define CHILD_ID_TX_LEVEL       (1)
            #define CHILD_ID_TX_PERCENT     (2)
            #define CHILD_ID_TX_RSSI        (3)
            #define CHILD_ID_RX_RSSI        (4)
            #define CHILD_ID_TX_SNR         (5)
            #define CHILD_ID_RX_SNR         (6)
            
            
            // Initialize general message
            MyMessage msgTxRSSI(CHILD_ID_TX_RSSI, V_CUSTOM);
            MyMessage msgRxRSSI(CHILD_ID_RX_RSSI, V_CUSTOM);
            MyMessage msgTxSNR(CHILD_ID_TX_SNR, V_CUSTOM);
            MyMessage msgRxSNR(CHILD_ID_RX_SNR, V_CUSTOM);
            MyMessage msgTxLevel(CHILD_ID_TX_LEVEL, V_CUSTOM);
            MyMessage msgTxPercent(CHILD_ID_TX_PERCENT, V_CUSTOM);
            MyMessage msgUplinkQuality(CHILD_ID_UPLINK_QUALITY, V_CUSTOM);
            
            void setup()
            {
            }
            
            
            void presentation()
            {
            	// Send the sketch version information to the gateway and controller
            	sendSketchInfo("ATC", "1.0");
            
            	// Register all sensors to gw (they will be created as child devices)
            	present(CHILD_ID_UPLINK_QUALITY, S_CUSTOM, "UPLINK QUALITY RSSI");
            	//present(CHILD_ID_TX_LEVEL, S_CUSTOM, "TX LEVEL DBM");
            	//present(CHILD_ID_TX_PERCENT, S_CUSTOM, "TX LEVEL PERCENT");
            	//present(CHILD_ID_TX_RSSI, S_CUSTOM, "TX RSSI");
            	//present(CHILD_ID_RX_RSSI, S_CUSTOM, "RX RSSI");
            	//present(CHILD_ID_TX_SNR, S_CUSTOM, "TX SNR");
            	//present(CHILD_ID_RX_SNR, S_CUSTOM, "RX SNR");
            }
            
            void loop()
            {
            	// send messages to GW
            	send(msgUplinkQuality.set(transportGetSignalReport(SR_UPLINK_QUALITY)));
            	//send(msgTxLevel.set(transportGetSignalReport(SR_TX_POWER_LEVEL)));
            	//send(msgTxPercent.set(transportGetSignalReport(SR_TX_POWER_PERCENT)));
            	// retrieve RSSI / SNR reports from incoming ACK
            	//send(msgTxRSSI.set(transportGetSignalReport(SR_TX_RSSI)));
            	//send(msgRxRSSI.set(transportGetSignalReport(SR_RX_RSSI)));
            	//send(msgTxSNR.set(transportGetSignalReport(SR_TX_SNR)));
            	//send(msgRxSNR.set(transportGetSignalReport(SR_RX_SNR)));
                Serial.print("UPLINK QUALITY RSSI=");
                Serial.println(transportInternalToRSSI(_transportSM.uplinkQualityRSSI)); // UPLINK QUALITY RSSI
            Serial.print("TX LEVEL DBM=");    
            Serial.println(transportGetTxPowerLevel());  //TX LEVEL DBM
            Serial.print("TX LEVEL PERCENT="); 
                Serial.println(transportGetTxPowerPercent());  // TX LEVEL PERCENT
            Serial.print("RX RSSI=");
                Serial.println(transportGetReceivingRSSI());  //RX RSSI
            Serial.print("TX RSSI=");
                Serial.println(transportGetSendingRSSI());    //TX RSSI
            
            	// wait a bit
            	wait(5000);
            }
            

            This is in case your modules are 433mhz. Try with a straight wire (one core), with the right length. You can also reduce some length by small bits and see if it improves.
            Good to know is 433mhz requires longer antenna, and bigger gnd plane for better results, compared to upper freq like 866mhz etc.
            A last solution if the gnd plane size would be the culprit could be to use a dipole antenna for test. by connecting two opposite wires. one to ant, the other to gnd close to ant

            You should be able to get more than nrf24 or some nrf52, easily :)
            I don't think you need rfm95 but that depends on the range you really need. that said some lora modules are maybe a bit more power efficient (more recent tech). but I think it's a detail for your usecase

            Can't help you on esp8266 pin mapping, I don't use it as gw (I've esp32, nrf52 and samd as gateways for prod and dev)

            Note: the new rfm driver has compatible communication for rfm69<->rfm95. Like others said, for using new driver, you need to enable it on both ends (gw+nodes) because it uses a different packet format than old driver.

            1 Reply Last reply
            0
            • W Offline
              W Offline
              wiredfrank
              wrote on last edited by
              #10

              Thank you everyone for reply, i been searching around for antenna and how to test them and came across this guy.
              https://www.youtube.com/watch?v=ZpKoLvqOWyc&t

              i m thinking to buy one of these VNA as i m shooting in dark with antenna right now and no way of knowing what is going on under the hood, i dont mind spending more to get miniVNA Tiny+ but what you experts think?

              zboblamontZ 1 Reply Last reply
              0
              • W wiredfrank

                Thank you everyone for reply, i been searching around for antenna and how to test them and came across this guy.
                https://www.youtube.com/watch?v=ZpKoLvqOWyc&t

                i m thinking to buy one of these VNA as i m shooting in dark with antenna right now and no way of knowing what is going on under the hood, i dont mind spending more to get miniVNA Tiny+ but what you experts think?

                zboblamontZ Offline
                zboblamontZ Offline
                zboblamont
                wrote on last edited by
                #11

                @wiredfrank It's a bit of overkill to be honest for hobby purposes, a quarter wave wire works fine when cut to the recommended dimension, or if concerned over the groundplane, a dipole as outlined by @scalz above.

                A VNA is typically used to determine the exact resonant frequency of an antenna, if it's out by a fraction it won't make much difference in performance.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  wiredfrank
                  wrote on last edited by
                  #12

                  @zboblamont thank you, i think part of my problem might be allowed frequency is 868MHz as compare with mine 433MHz :( (school boy error) i have ordered 898MHz module and i will give them try.

                  zboblamontZ 1 Reply Last reply
                  0
                  • W wiredfrank

                    @zboblamont thank you, i think part of my problem might be allowed frequency is 868MHz as compare with mine 433MHz :( (school boy error) i have ordered 898MHz module and i will give them try.

                    zboblamontZ Offline
                    zboblamontZ Offline
                    zboblamont
                    wrote on last edited by
                    #13

                    @wiredfrank Not sure what you meant by 433MHz not being allowed, so far as I recall that band is permitted worldwide but has transmit duration restrictions as it's a shared band.
                    I started off with the 433MHz RFMs and never had the slightest issue, penetrating walls and floors with plenty of range outside, even at one stage buried in snow.
                    The range and penetration of 868 v 433 will be slightly reduced, but performance should still be better than 2.4GHz.
                    The point about the recommended wire length being close enough remains valid

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      wiredfrank
                      wrote on last edited by
                      #14

                      sorry i wasn't clear in my reply, in my country 868MHz is listed allowed frequency.

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


                      31

                      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