Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah



  • Hello, i'm trying to setup a gateaway on ESP8266 like explained in https://www.mysensors.org/build/esp8266_gateway but i don't have a NodeMCU or Wemos D1 Mini.

    I have an Adafruit Huzzah Feather and i can't figure out what pins to use for connecting to DIO0 and NSS on the RFM69 even though my sketch compiles and uploads correctly .

    Anyone can help, or have a working GatewayESP8266.ino for the Huzzah ?

    Many thanks !



  • Here is what i have tried:
    I try using GPIO 2 and 15 to pilot the RFM69

    here an extract of my GatewayESP8266.ino

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
    #define MY_BAUD_RATE 9600
    
    // Enables and select radio type (if attached)
    //#define MY_RADIO_RF24
    #define MY_RADIO_RFM69
    
    #define MY_IS_RFM69HW // Omit if your RFM is not "H"
    #define MY_RFM69_IRQ_PIN 2
    #define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN
    #define MY_RFM69_CS_PIN 15 // NSS. Use MY_RFM69_SPI_CS for older versions (before 2.2.0)
    
    ../..
    
    void setup()
    {
       pinMode(MY_RFM69_IRQ_PIN, OUTPUT);
       pinMode(MY_RFM69_CS_PIN, OUTPUT);
    
    	// Setup locally attached sensors
    }
    
    ../..
    
    void loop()
    {
    	// Send locally attached sensors data here
      digitalWrite(MY_RFM69_IRQ_PIN, HIGH);
    delay(1000);
    digitalWrite(MY_RFM69_IRQ_PIN, LOW);
    delay(1000);
    }
    

    What's going wrong is i need to unplug the wire to GPIO2 at boot time unless it won't boot
    then if i do that and replug the wire after boot, TFM is not initialized properly and
    i get this log:

    MCO:BGN:INIT GW,CP=RRNGE---,FQ=80,REL=255,VER=2.3.2
    114 TSF:LRT:OK
    130 TSM:INIT
    143 TSF:WUR:MS=0
    163 TSM:INIT:TSP OK
    184 TSM:INIT:GW MODE
    206 TSM:READY:ID=0,PAR=0,DIS=0
    238 MCO:REG:NOT NEEDED
    scandone
    1311 GWT:TIN:CONNECTING...
    2339 GWT:TIN:CONNECTING...
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 2
    
    connected with TPLINK_BUREAU, channel 1
    dhcp client start...
    cnt 
    3168 GWT:TIN:CONNECTING...
    ip:192.168.1.50,mask:255.255.255.0,gw:192.168.1.1
    4329 GWT:TIN:CONNECTING...
    4357 GWT:TIN:IP: 192.168.1.50
    4389 MCO:BGN:STP
    pm open,type:2 0
    14407 MCO:BGN:INIT OK,TSP=1
    14436 TSM:READY:NWD REQ
    15462 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    
    

    My knowlegde in electronics is level zero unfortunalty
    The adafruit Huzzah documentation states that
    GPIO #2, is also used to detect boot-mode. It also is connected to the blue LED that is near the WiFi antenna. It has a pullup resistor connected to it, and you can use it as any output (like #0) and blink the blue LED.

    So i thought i could wire directly GPIO2 to DIO0 on the RFM69 like explained https://www.mysensors.org/build/connect_radio but obviously i do something wrong

    Please Help 🙂



  • I guess this means i finally managed to get it working:

    4131 MCO:BGN:STP
    4133 MCO:BGN:INIT OK,TSP=1
    4135 TSM:READY:NWD REQ
    4139 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    pm open,type:2 0
    30149 TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    30155 TSF:MSG:BC
    30157 TSF:MSG:FPAR REQ,ID=5
    30159 TSF:PNG:SEND,TO=0
    30161 TSF:CKU:OK
    30163 TSF:MSG:GWL OK
    30641 TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    32650 TSF:MSG:READ,5-5-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    32655 TSF:MSG:PINGED,ID=5,HP=1
    
    

  • Mod

    Nice work @hlehoux
    Is there any information we could add to the radio connection page to help other Feather users?



  • @mfalkvidd

    Hello, certainly yes; anyhow, my setup is quite experimental yet:

    • my antenna setup is quite bad, i loose radio messages or don't receive Ack from the gateway (my bad, i have 868 MHz RFM69 and ordered antennas for 433 MHz)
    • i can confirm it works with NSS on pin GPIO#15 and IRQ_PIN on GPIO#0 orGPIO#2
    • i have not resolved yet the problem of GPIO#0 and GPIO#2 being used by ESP8266 to detect boot-mode so you have to connect the pin after booting which is very annoying
      There are articles like this one https://www.instructables.com/id/ESP8266-Using-GPIO0-GPIO2-as-inputs/ but i'm quite newbie in electronics...

    I will post more details when my config is better.


  • Mod

    @hlehoux is there a reason you can't use gpio5 for irq? That's what I used on a different esp board when verifying the instructions on https://www.mysensors.org/build/connect_radio



  • @mfalkvidd Well i'm not sure, on [huzzah pinout](link url) GPIO#4 and GPIO#5 are described about I2C SDA & SCL and GPIO #12/13/14 are the same as SCK/MOSI/MISO so i thought would be better not to use them.

    I will try and report back.

    Seems to me (first try) that GPIO#2 works well, provided you connect it both to VCC (it has a pullup resistor ) to avoid boot-mode and to IRQ



  • @mfalkvidd thank you for pointing this to me. I confirm gpio5 works well for IRQ. I read too many articles about how to use gpio0 or gpio2 !

    Anyway i still get very bad transmission ratio, even with very close distance and after buying antennas the good size for my 868 MHz RFM69s

    Can some of you guys point me to help on how to troubleshoot transmissions and/or bad antenna setup for the RFM69, for a newbie like me ?

    Thank you



  • Can you switch on MY_DEBUG_VERBOSE_RFM69 in your node and post the output?
    Also post the sketch please.



  • Thank you for offering help!

    Here is the output of my node "AT Startup" with MY_DEBUG_VERBOSE_RFM69

     
     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    30 RFM69:INIT
    32 RFM69:INIT:PIN,CS=10,IQP=2,IQN=0
    36 RFM69:PTX:LEVEL=5 dBm
    38 TSM:INIT:TSP OK
    40 TSF:SID:OK,ID=1
    43 TSM:FPAR
    45 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
    51 RFM69:CSMA:RSSI=-108
    55 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2064 !TSM:FPAR:NO REPLY
    2066 TSM:FPAR
    2068 RFM69:SWR:SEND,TO=255,SEQ=1,RETRY=0
    2072 RFM69:CSMA:RSSI=-109
    2078 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2838 RFM69:SAC:SEND ACK,TO=0,RSSI=-30
    2842 RFM69:CSMA:RSSI=-111
    2848 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    2854 TSF:MSG:FPAR OK,ID=0,D=1
    4087 TSM:FPAR:OK
    4087 TSM:ID
    4089 TSM:ID:OK
    4091 TSM:UPL
    4093 RFM69:SWR:SEND,TO=0,SEQ=3,RETRY=0
    4098 RFM69:CSMA:RSSI=-108
    4304 !RFM69:SWR:NACK
    4306 RFM69:SWR:SEND,TO=0,SEQ=4,RETRY=1
    4311 RFM69:CSMA:RSSI=-107
    4517 !RFM69:SWR:NACK
    4519 RFM69:SWR:SEND,TO=0,SEQ=4,RETRY=2
    4524 RFM69:CSMA:RSSI=-108
    4730 !RFM69:SWR:NACK
    4732 RFM69:SWR:SEND,TO=0,SEQ=4,RETRY=3
    4737 RFM69:CSMA:RSSI=-107
    4923 RFM69:SWR:ACK,FROM=0,SEQ=4,RSSI=-74
    4927 RFM69:ATC:ADJ TXL,cR=-74,tR=-78..-82,TXL=5
    4931 RFM69:PTX:LEVEL=4 dBm
    4935 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    5156 RFM69:SAC:SEND ACK,TO=0,RSSI=-29
    5160 RFM69:CSMA:RSSI=-108
    5167 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    5173 TSF:MSG:PONG RECV,HP=1
    5175 TSM:UPL:OK
    5177 TSM:READY:ID=1,PAR=0,DIS=1
    5181 RFM69:SWR:SEND,TO=0,SEQ=5,RETRY=0
    5185 RFM69:CSMA:RSSI=-109
    5392 !RFM69:SWR:NACK
    5394 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=1
    5398 RFM69:CSMA:RSSI=-106
    5605 !RFM69:SWR:NACK
    5607 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=2
    5611 RFM69:CSMA:RSSI=-107
    5818 !RFM69:SWR:NACK
    5820 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=3
    5824 RFM69:CSMA:RSSI=-111
    6031 !RFM69:SWR:NACK
    6033 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=4
    6037 RFM69:CSMA:RSSI=-109
    6244 !RFM69:SWR:NACK
    6246 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    7464 RFM69:SAC:SEND ACK,TO=0,RSSI=-29
    7471 RFM69:CSMA:RSSI=-107
    7475 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    7481 RFM69:SWR:SEND,TO=0,SEQ=7,RETRY=0
    7487 RFM69:CSMA:RSSI=-108
    7694 !RFM69:SWR:NACK
    7696 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=1
    7700 RFM69:CSMA:RSSI=-105
    7907 !RFM69:SWR:NACK
    7909 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=2
    7913 RFM69:CSMA:RSSI=-107
    8120 !RFM69:SWR:NACK
    8122 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=3
    8126 RFM69:CSMA:RSSI=-108
    8333 !RFM69:SWR:NACK
    8335 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=4
    8339 RFM69:CSMA:RSSI=-106
    8546 !RFM69:SWR:NACK
    8548 !TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=NACK:2.3.2
    8556 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=0
    8560 RFM69:CSMA:RSSI=-106
    8767 !RFM69:SWR:NACK
    8769 RFM69:SWR:SEND,TO=0,SEQ=9,RETRY=1
    8773 RFM69:CSMA:RSSI=-108
    8980 !RFM69:SWR:NACK
    8982 RFM69:SWR:SEND,TO=0,SEQ=9,RETRY=2
    8986 RFM69:CSMA:RSSI=-108
    9193 !RFM69:SWR:NACK
    9195 RFM69:SWR:SEND,TO=0,SEQ=9,RETRY=3
    9199 RFM69:CSMA:RSSI=-107
    9406 !RFM69:SWR:NACK
    9408 RFM69:SWR:SEND,TO=0,SEQ=9,RETRY=4
    9412 RFM69:CSMA:RSSI=-106
    9619 !RFM69:SWR:NACK
    9621 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=NACK:0
    Presentation
    11628 RFM69:SWR:SEND,TO=0,SEQ=9,RETRY=0
    11634 RFM69:CSMA:RSSI=-110
    11841 !RFM69:SWR:NACK
    11843 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=1
    11847 RFM69:CSMA:RSSI=-108
    12056 !RFM69:SWR:NACK
    12058 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=2
    12062 RFM69:CSMA:RSSI=-108
    12271 !RFM69:SWR:NACK
    12273 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=3
    12277 RFM69:CSMA:RSSI=-110
    12486 !RFM69:SWR:NACK
    12488 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=4
    12492 RFM69:CSMA:RSSI=-106
    12701 !RFM69:SWR:NACK
    12703 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=13,sg=0,ft=3,st=NACK:RFM69 Sensor 
    12711 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=0
    12718 RFM69:CSMA:RSSI=-108
    12924 !RFM69:SWR:NACK
    12926 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=1
    12931 RFM69:CSMA:RSSI=-106
    13139 !RFM69:SWR:NACK
    13142 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=2
    13146 RFM69:CSMA:RSSI=-107
    13355 !RFM69:SWR:NACK
    13357 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=3
    13361 RFM69:CSMA:RSSI=-106
    13570 !RFM69:SWR:NACK
    13572 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=4
    13576 RFM69:CSMA:RSSI=-109
    13785 !RFM69:SWR:NACK
    13787 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=4,st=NACK:1.0
    13795 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=0
    13799 RFM69:CSMA:RSSI=-111
    14006 !RFM69:SWR:NACK
    14008 RFM69:SWR:SEND,TO=0,SEQ=12,RETRY=1
    14012 RFM69:CSMA:RSSI=-105
    14219 !RFM69:SWR:NACK
    14221 RFM69:SWR:SEND,TO=0,SEQ=12,RETRY=2
    14225 RFM69:CSMA:RSSI=-106
    14432 !RFM69:SWR:NACK
    14434 RFM69:SWR:SEND,TO=0,SEQ=12,RETRY=3
    14438 RFM69:CSMA:RSSI=-107
    14645 !RFM69:SWR:NACK
    14647 RFM69:SWR:SEND,TO=0,SEQ=12,RETRY=4
    14651 RFM69:CSMA:RSSI=-107
    14858 !RFM69:SWR:NACK
    14860 !TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=23,pt=0,l=0,sg=0,ft=5,st=NACK:
    14866 RFM69:SWR:SEND,TO=0,SEQ=12,RETRY=0
    14872 RFM69:CSMA:RSSI=-109
    15079 !RFM69:SWR:NACK
    15081 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=1
    15085 RFM69:CSMA:RSSI=-105
    15292 !RFM69:SWR:NACK
    15294 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=2
    15298 RFM69:CSMA:RSSI=-107
    15505 !RFM69:SWR:NACK
    15507 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=3
    15511 RFM69:CSMA:RSSI=-106
    15718 !RFM69:SWR:NACK
    15720 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=4
    15724 RFM69:CSMA:RSSI=-109
    15931 !RFM69:SWR:NACK
    15933 !TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=0,pt=0,l=0,sg=0,ft=6,st=NACK:
    15939 MCO:REG:REQ
    15941 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=0
    15947 RFM69:CSMA:RSSI=-105
    16154 !RFM69:SWR:NACK
    16156 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=1
    16160 RFM69:CSMA:RSSI=-109
    16367 !RFM69:SWR:NACK
    16369 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=2
    16373 RFM69:CSMA:RSSI=-108
    16580 !RFM69:SWR:NACK
    16582 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=3
    16586 RFM69:CSMA:RSSI=-107
    16793 !RFM69:SWR:NACK
    16795 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=4
    16799 RFM69:CSMA:RSSI=-105
    17006 !RFM69:SWR:NACK
    17008 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=7,st=NACK:2
    17016 !TSM:READY:UPL FAIL,SNP
    

    And while executing loop() every 2 seconds:

    Loop
    478496 RFM69:SWR:SEND,TO=0,SEQ=80,RETRY=0
    478502 RFM69:CSMA:RSSI=-107
    478707 !RFM69:SWR:NACK
    478709 RFM69:SWR:SEND,TO=0,SEQ=81,RETRY=1
    478715 RFM69:CSMA:RSSI=-108
    478922 !RFM69:SWR:NACK
    478924 RFM69:SWR:SEND,TO=0,SEQ=81,RETRY=2
    478930 RFM69:CSMA:RSSI=-108
    479137 !RFM69:SWR:NACK
    479139 RFM69:SWR:SEND,TO=0,SEQ=81,RETRY=3
    479145 RFM69:CSMA:RSSI=-105
    479352 !RFM69:SWR:NACK
    479354 RFM69:SWR:SEND,TO=0,SEQ=81,RETRY=4
    479361 RFM69:CSMA:RSSI=-104
    479526 RFM69:SWR:ACK,FROM=0,SEQ=81,RSSI=-90
    479533 RFM69:ATC:ADJ TXL,cR=-90,tR=-78..-82,TXL=11
    479537 RFM69:PTX:LEVEL=12 dBm
    479541 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:1
    Loop
    481548 RFM69:SWR:SEND,TO=0,SEQ=81,RETRY=0
    481554 RFM69:CSMA:RSSI=-109
    481761 !RFM69:SWR:NACK
    481763 RFM69:SWR:SEND,TO=0,SEQ=82,RETRY=1
    481769 RFM69:CSMA:RSSI=-109
    481976 !RFM69:SWR:NACK
    481978 RFM69:SWR:SEND,TO=0,SEQ=82,RETRY=2
    481984 RFM69:CSMA:RSSI=-106
    482191 !RFM69:SWR:NACK
    482193 RFM69:SWR:SEND,TO=0,SEQ=82,RETRY=3
    482199 RFM69:CSMA:RSSI=-105
    482406 !RFM69:SWR:NACK
    482408 RFM69:SWR:SEND,TO=0,SEQ=82,RETRY=4
    482414 RFM69:CSMA:RSSI=-108
    482621 !RFM69:SWR:NACK
    482623 !TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=NACK:1
    Loop
    484630 RFM69:SWR:SEND,TO=0,SEQ=82,RETRY=0
    484636 RFM69:CSMA:RSSI=-109
    484841 !RFM69:SWR:NACK
    484843 RFM69:SWR:SEND,TO=0,SEQ=83,RETRY=1
    484849 RFM69:CSMA:RSSI=-107
    485056 !RFM69:SWR:NACK
    485058 RFM69:SWR:SEND,TO=0,SEQ=83,RETRY=2
    485064 RFM69:CSMA:RSSI=-108
    485271 !RFM69:SWR:NACK
    485273 RFM69:SWR:SEND,TO=0,SEQ=83,RETRY=3
    485279 RFM69:CSMA:RSSI=-105
    485486 !RFM69:SWR:NACK
    485488 RFM69:SWR:SEND,TO=0,SEQ=83,RETRY=4
    485494 RFM69:CSMA:RSSI=-107
    485662 RFM69:SWR:ACK,FROM=0,SEQ=83,RSSI=-88
    485666 RFM69:ATC:ADJ TXL,cR=-88,tR=-78..-82,TXL=12
    485672 RFM69:PTX:LEVEL=13 dBm
    485675 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:1
    
    

    And my Sketch :

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_RFM69
    #define MY_IS_RFM69HW
    #define MY_DEBUG_VERBOSE
    #define MY_DEBUG_VERBOSE_RFM69
    //#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
    #define MY_RFM69_NEW_DRIVER
    //#define MY_RFM69_ATC_MODE_DISABLED
    //#define MY_RFM69_TX_POWER_DBM 20
    
    // Enabled repeater feature for this node
    //#define MY_REPEATER_FEATURE
    
    //#define MY_NODE_ID 5
    
    #include <MySensors.h>
    
    #define OPEN 1
    // Initialize motion message
    MyMessage msg(1, V_TRIPPED);
    
    uint8_t value = OPEN;
    
    void setup()
    {
      Serial.begin(115200);
      pinMode(LED_BUILTIN, OUTPUT);
    }
    
    void presentation()
    {
      Serial.println("Presentation");
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("RFM69 Sensor ", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
        present(0, S_CUSTOM);
        present(1, S_DOOR);
    }
    
    void loop()
    {
      Serial.println("Loop");
      digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
      delay(1000);                       // wait for a second
      digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
      delay(1000);                       // wait for a second
      //sendHeartbeat(); 
      send(msg.set(OPEN));
    
      
    }
    


  • I'm also reading a few posts like this one trying to understand a bit more ....



  • Are you sure about ask your hardware versions? I bought rfm69 modules and I thought they were the HW version but they turned out to be the normal ones.
    So important is

    • module version
    • frequency

    It looks like even with a high rssi your reception is not good. But maybe I interpret this the wrong way. Can I've of the developers or more experienced help with the analysis?



  • Thank you @electrik
    My intent is to use RFM69HW 868Mhz
    I compared with photos on the internet like here

    mine is:
    IMG_0359.jpg

    as far as i understand my reading my RSSI values seem to tell my signal is very weak and noisy ?
    I tried to provide the pwr to the rfm69 with an external source instead of the esp8266 but i was not better.



  • @hlehoux Hi!
    I had quite alot of trouble with NRF24 modules with shaky connections despite doing everything that has been discussed in forum with power supply etc and have ordered a bunch of RFM69's to hopefully improve this according to others in forum claiming better stability with RFM''s. Haven't tested yet but reading this is a bit dissapointing.
    One thing though. Readings in log shows very high RSSI values and if it is measured in dBm this is very bad. The lower value the better I believe. Antenna issue ?



  • @hlehoux can you take a photo from the back also? There should be a table telling which one it is exactly.

    @hakha4 said in Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah:

    Antenna issue ?

    You could be right.

    What antenna do you have?



  • Hello, here are 2 photos

    one from the back:
    IMG_0360.jpg

    I'm not sure what the "W" means, i read chinese copy don't have it ?

    one from the antenna:
    IMG_0361.jpg
    It should be the good size for 868 MHz

    I don't use "ground plane" or sort of, would this explain so bad RSSI ?

    Thank you again for your help and patience



  • @hakha4 i also have several NRF24 nodes and gateaway
    After trying several antenna/tranceiver, i recommend using
    "E01-ML01DP5 Long Range SPI nRF24L01P 2.4Ghz 100mW SMA Antenna IoT Wireless Transceiver Transmitter Receiver nRF24L01P RF Module"

    as a repeater
    It gives far better range results

    Anyway i wanted to try RFM69 to avoid having many repeaters



  • The modules correspond to what it should be.
    It looks like your ground is connected to the ANT pin on the picture, on the bottom side of the PCB?



  • @hlehoux Hi!
    I'm not sure what the "W" means, i read chinese copy don't have it ?

    W means the low power output variant (+13dBm). There is another version named 'HW' which give a higher transmission output (+20 dBM). As elektik pointed out, check out the solder of the antenna. Did the antenna come presoldered or you did it yourself?
    Another option for the coiled antenna is a straight copper wire (8,6 cm long) that gives better transmission according to many sources. Google! theres's alot information about this



  • @hakha4 said in Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah:

    There is another version named 'HW' which give a higher transmission output (+20 dBM).

    There is a black spot on the PCB after "69H" and after the "W" so this is the RFM69HW


  • Hardware Contributor

    @hlehoux
    unfortunately, lot of devboards have non-optimized gnd plane for RF, especially for subghz (small or splitted gnd plane by routes..).
    Moreover, devboard+dupont cable+external rf module is not ideal.
    With rfm69, you should get a nice range.
    Though, why on one of your picture, antenna seems shorted to gnd??
    Imho I would have chosen something else than esp8266 (esp32??) in your case, but your choice 🙂

    To check if this is related to your gnd plane and your build is ok, you could also try to hook two straight wires as a dipole antenna to your radio (one to ANA, the other to GND in opposite direction will replace a ground plane). Google for examples, it's simple to try



  • @scalz
    Could you explain how to read these rssi reports, and how to adjust the configuration of the nodes so the reliability goes up?
    I know there is a setting RFM69_TARGET_RSSI_DBM but it is not clear for me how to use this exactly.



  • @electrik Thank you! What you see is the "head" of the pliers i used to hold the RFM69. I will check again my soldering but definitly ANT and ground should not be connected



  • @scalz Thank you very much!
    Unfortunatly, the antenna seems shorted to ground only because this is the "head" of the pliers i used to take the photo.

    i use esp8266 because i received for free a lot of many adafruit huzzah feathers 🙂

    i will try your suggestion to hook two straight wires as a dipole antenna and report if this is better.

    For sure my "development" setup is devboard+dupont cable+external rf and this should not be the final version ; anyway loosing 50% of messages with distance of 1 meter is disappointing.





  • try adding :

    #define MY_RFM69_FREQUENCY   RFM69_868MHZ
    

    just in case....

    My first prototype using dupont cables and piece of wire as antenna gave me 500m range with 3 or 4 houses between me and gateway.
    Try old driver, no RSSI reporting, but my whole network runs on old driver.

    @hlehoux 1m range is usually caused by radio type misconfiguration, like running HW radio as low power or other way round. Another possibility is faulty radio.



  • Strangely, i also have another bunch of RFM69s that are marked as H but not W. What does it mean ?



  • @hlehoux no idea, i have mix of HW, W and H marked, all play together nicely.


  • Hardware Contributor

    @electrik
    in logs, RFM69:CSMA:RSSI=-104 is the noise floor
    and RFM69_TARGET_RSSI_DBM define the rssi you want to have for your node.

    so if you have a noise floor of -100, you could adjust your target to -85 or less. But maybe you could get a few retries with -90 target.

    rfm69 power level can be adjusted from -18 to +13db. 13db=100% power= 45mA power consumption.

    for example, let's say your target is -70, and your power level has been autoadjusted to +5.
    then if you set, the target to -80 or less, power level will decrease to maybe -8 or even less, it depends on your environment and your build.
    And vice versa, if you set target to -50, ATC will set a higher power level.

    ATC is used to auto-adjust radio power level consumption for battery nodes, so they use only energy they need. This also make your rf environment "greener". No nodes sending loud messages if not needed.

    Another example, I recently designed a new node. Noise floor here is around -98db.
    With a target of -70 if I remember, power level was autoadjusted to +5db.
    After adjusting target to -87db, power level has decreased to -11db, which equals to 20% power.
    And there are no NACK nor retries.
    So this node now requires less energy for sending messages and that will save battery.
    This is for an indoor node, 10m distance with 2 brick walls obstacles.

    old driver doesn't have ATC management. I've no problem so far with new driver.

    I guess H would mean High power version. But to be sure, yuo just have to google for rfm69 pics and you'll see which version you have. Existing versions are : RFM69HW, RFM69W, RFM69HCW, RFM69CW



  • @scalz great explanation of new driver functionality.
    Some cheapest Aliexpress boards are not marked at all or marked with Frequency only. H versions have additional sot23-6 chip near antenna pin.

    Wonder why the new driver wasn't stable enough to do 12kB OTA firmware update even once, regardless of settings 🤔 . Same GW and node works flawlessly on old driver over 10-100 meters.


  • Hardware Contributor

    @Sasquatch
    yes rfm modules are nice for long range.
    ok. we will re-test OTA+new driver on my new board soon, and will keep you updated

    I agree seems OP has setup problem, could be

    • H vs non-H define
    • IRQ is not triggering for receiving msg
    • weak GND counterpoise for antenna,
    • power supply. For power I usually use 100uf+0.1uf close to the module. 100uf when it's batt powered (for coincell, I like to have two big capa+0.1uf), else it's possible to use a smaller value like 33-47uf


  • @scalz I do agree,
    I found that even USB powered NodeMCU gateway needed at least 10uf ceramic or 47uF electrolytic capacitor on radio supply, without it heavy traffic was causing gateway freezes and reboots. There is 100nF capacotor on rfm69 and 220nf on RFM69H modules(at least my Aliexpress cheap clones have them) right next to the VCC pin, so i skip the external one.


  • Hardware Contributor

    @Sasquatch
    I admit I never checked that, but thought the capa would probably be there.
    well, I usually am careful so I add more footprints than needed for flexibilty, just in case 🙂

    @hlehoux perhaps do you have some arduino mini pro (8mhz 3v) that you could use as a test node and check if you still have same problem (in case this is an IRQ issue..) ?



  • @scalz @Sasquatch Thank you for suggestions, i will test next week-end
    My gateaway is an esp8266 adafruit huzzah feather and my node arduino mini pro (8mhz 3v) using the psb of @sundberg84 ([here])(https://www.openhardware.io/view/389/EasyNewbie-PCB-RFM69-HWW-edition-for-MySensors)

    I did not place any capacitor on the gateway, which is usb powered in my tests.
    I will try to connect a decoupling capacitor like explained here like 47uF



  • Hello, i don't see progress when connecting a 10uF decoupling capacitor.

    On my node i get

    4452 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    4673 RFM69:SAC:SEND ACK,TO=0,RSSI=-19
    4677 RFM69:CSMA:RSSI=-110
    4683 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    4689 TSF:MSG:PONG RECV,HP=1
    4691 TSM:UPL:OK
    4694 TSM:READY:ID=1,PAR=0,DIS=1
    4698 RFM69:SWR:SEND,TO=0,SEQ=5,RETRY=0
    4704 RFM69:CSMA:RSSI=-107
    4911 !RFM69:SWR:NACK
    4913 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=1
    4917 RFM69:CSMA:RSSI=-105
    5124 !RFM69:SWR:NACK
    5126 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=2
    5130 RFM69:CSMA:RSSI=-107
    5337 !RFM69:SWR:NACK
    5339 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=3
    5343 RFM69:CSMA:RSSI=-109
    5550 !RFM69:SWR:NACK
    5552 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=4
    5556 RFM69:CSMA:RSSI=-108
    5763 !RFM69:SWR:NACK
    5765 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    

    and on the gateaway

    5919 TSM:READY:NWD REQ
    5921 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
    5926 RFM69:CSMA:RSSI=-108
    
    63949 TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    63954 TSF:MSG:BC
    63956 TSF:MSG:FPAR REQ,ID=1
    63958 TSF:PNG:SEND,TO=0
    63960 TSF:CKU:OK
    63962 TSF:MSG:GWL OK
    64440 RFM69:SWR:SEND,TO=1,SEQ=1,RETRY=0
    64445 RFM69:CSMA:RSSI=-95
    64447 RFM69:CSMA:RSSI=-96
    64463 RFM69:SWR:ACK,FROM=1,SEQ=2,RSSI=-34
    64467 TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    Loop 0
    66524 RFM69:SAC:SEND ACK,TO=1,RSSI=-70
    66528 RFM69:CSMA:RSSI=-105
    66533 TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    66538 TSF:MSG:PINGED,ID=1,HP=1
    66546 RFM69:SWR:SEND,TO=1,SEQ=3,RETRY=0
    66551 RFM69:CSMA:RSSI=-106
    66754 !RFM69:SWR:NACK
    66756 RFM69:SWR:SEND,TO=1,SEQ=4,RETRY=1
    66760 RFM69:CSMA:RSSI=-97
    66777 RFM69:SWR:ACK,FROM=1,SEQ=4,RSSI=-35
    66781 TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    Loop 0
    68837 RFM69:SAC:SEND ACK,TO=1,RSSI=-69
    68842 RFM69:CSMA:RSSI=-95
    68844 RFM69:CSMA:RSSI=-96
    68849 TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    68855 RFM69:SWR:SEND,TO=1,SEQ=5,RETRY=0
    68859 RFM69:CSMA:RSSI=-109
    69062 !RFM69:SWR:NACK
    69064 RFM69:SWR:SEND,TO=1,SEQ=6,RETRY=1
    69069 RFM69:CSMA:RSSI=-101
    69085 RFM69:SWR:ACK,FROM=1,SEQ=6,RSSI=-35
    69089 TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    Loop 0
    71146 RFM69:SAC:SEND ACK,TO=1,RSSI=-70
    71151 RFM69:CSMA:RSSI=-106
    71156 TSF:MSG:READ,1-1-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.3.2
    Loop 0
    Loop 0
    75212 RFM69:SAC:SEND ACK,TO=1,RSSI=-88
    75217 RFM69:CSMA:RSSI=-108
    75222 TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=13,sg=0:RFM69 Sensor 
    Loop 0
    77279 RFM69:SAC:SEND ACK,TO=1,RSSI=-85
    77283 RFM69:CSMA:RSSI=-107
    
    

    Could you explain the difference between
    RFM69:SAC:SEND ACK,TO=0,RSSI=-19
    RFM69:CSMA:RSSI=-110

    When RSSI=-19 then RSSI=-110 ; which one is bad and is it on the node or on the gateaway ?

    Thank you again 🙂


Log in to reply
 

Suggested Topics

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts