Feather M0 RFM60HCW (433Mhz) - can't connect to gw



  • Hi,

    I've used a setup of ESP32 + Adafruit RFM69HCW modules to do some sensor logging and it's been working fine.
    Now, I'm trying to replace one of my ESP32 nodes for a Feather M0 RFM69HCW but I can't get it working with my GW (the GW work fine with other nodes).
    I've tried 2 separate Feather nodes as well, to eliminate any HW problem.
    Any help appreciated 😐

    Here's the log output:

    14:44:06.822 -> 19157 TSM:FAIL:RE-INIT
    14:44:06.822 -> 19157 TSM:INIT
    14:44:07.095 -> 19458 RFM69:INIT
    14:44:07.129 -> 19463 RFM69:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
    14:44:07.129 -> 19464 RFM69:PTX:LEVEL=5 dBm
    14:44:07.163 -> 19516 TSM:INIT:TSP OK
    14:44:07.163 -> 19516 TSM:INIT:STATID=20
    14:44:07.369 -> 19720 TSF:SID:OK,ID=20
    14:44:07.369 -> 19720 TSM:FPAR
    14:44:07.369 -> 19720 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
    14:44:07.369 -> 19722 RFM69:CSMA:RSSI=-99
    14:44:07.369 -> 19726 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    14:44:09.385 -> 21727 !TSM:FPAR:NO REPLY
    14:44:09.385 -> 21727 TSM:FPAR
    14:44:09.385 -> 21727 RFM69:SWR:SEND,TO=255,SEQ=1,RETRY=0
    14:44:09.385 -> 21728 RFM69:CSMA:RSSI=-101
    14:44:09.385 -> 21732 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    14:44:11.394 -> 23734 !TSM:FPAR:NO REPLY
    14:44:11.394 -> 23734 TSM:FPAR
    14:44:11.394 -> 23734 RFM69:SWR:SEND,TO=255,SEQ=2,RETRY=0
    14:44:11.394 -> 23735 RFM69:CSMA:RSSI=-92
    14:44:11.394 -> 23735 RFM69:CSMA:RSSI=-96
    14:44:11.394 -> 23739 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    14:44:13.249 -> Battery Voltage: 4.31 V
    14:44:13.249 -> Battery percent: 100 %
    14:44:13.249 -> 25607 !MCO:SND:NODE NOT REG
    14:44:13.386 -> 25741 !TSM:FPAR:NO REPLY
    14:44:13.386 -> 25741 TSM:FPAR
    14:44:13.386 -> 25741 RFM69:SWR:SEND,TO=255,SEQ=3,RETRY=0
    14:44:13.386 -> 25742 RFM69:CSMA:RSSI=-95
    14:44:13.386 -> 25746 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    14:44:15.388 -> 27748 !TSM:FPAR:FAIL
    14:44:15.388 -> 27748 TSM:FAIL:CNT=2
    14:44:15.388 -> 27748 TSM:FAIL:DIS
    14:44:15.388 -> 27748 TSF:TDI:TSL
    14:44:15.388 -> 27748 RFM69:RSL
    14:44:23.232 -> Battery Voltage: 4.31 V
    14:44:23.232 -> Battery percent: 100 %
    14:44:23.232 -> 35607 !MCO:SND:NODE NOT REG
    14:44:25.386 -> 37749 TSM:FAIL:RE-INIT
    

    ...and loop.

    here's the code:

    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_RFM69
    #define MY_RADIO_RFM69
    #define MY_IS_RFM69HW
    #define MY_RFM69_FREQUENCY RFM69_433MHZ
    #define MY_RFM69_NEW_DRIVER
    #define MY_DEFAULT_ERR_LED_PIN 13
    #define MY_RFM69_RST_PIN 4
    #define MY_RFM69_IRQ_PIN 3
    #define MY_RFM69_IRQ_NUM 3
    #define MY_RFM69_CS_PIN 8
    #define MY_NODE_ID 20
    #define MY_SIGNAL_REPORT_ENABLED
    #define MY_RFM69_ENABLE_ENCRYPTION
    #define MY_AES_KEY 0X01,0X54,0X8D,0XFD,0XCF,0X82,0XE9,0XDF,0X33,0XE7,0X50,0XE,0X62,0X9D,0X9C,0X09
    #define MY_TRANSPORT_WAIT_READY_MS 15000 
    
    #include <MySensors.h>
    #include "Arduino.h"
    
    #define TIME_TO_SLEEP 60  
    #define BATTERY_SENSE_PIN A7 
    #define CHILD_ID_RSSILEVEL 1
    #define CHILD_ID_BATTPCT 50
    #define CHILD_ID_BATTVOLT 51
    #define CHILD_ID_MBXTRIP 52
    #define MAX_BATTERY_V 4.2 
    #define MIN_BATTERY_V 2.5 
    
    
    bool debug = true;
    
    MyMessage battPctMsg(CHILD_ID_BATTPCT, V_PERCENTAGE);
    MyMessage battVoltMsg(CHILD_ID_BATTVOLT, V_VOLTAGE);
    MyMessage RSSILevel(CHILD_ID_RSSILEVEL, V_LEVEL);
    MyMessage MbxTrip(CHILD_ID_MBXTRIP, V_TRIPPED);
    
    void setup() {
      while (!Serial);
    }
    
      
    void presentation() {
      Serial.println("Sending presentation...");
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Mbx", "1.2");
      present(CHILD_ID_BATTPCT, S_CUSTOM);
      present(CHILD_ID_BATTVOLT, S_MULTIMETER);
      present(CHILD_ID_RSSILEVEL, S_CUSTOM);
      present(CHILD_ID_MBXTRIP, S_DOOR);
    }
    
    void loop() {
      float batteryVoltage = analogRead(BATTERY_SENSE_PIN);
      batteryVoltage *= 2;    
      batteryVoltage *= 3.3;  
      batteryVoltage /= 1024;
      float range = MAX_BATTERY_V - MIN_BATTERY_V;
      int batteryPcnt = ((batteryVoltage - MIN_BATTERY_V) * 100) / range;
      if (batteryPcnt > 100) {
        batteryPcnt = 100;
      }
      if (debug) {
        Serial.print("Battery Voltage: ");
        Serial.print(batteryVoltage);
        Serial.println(" V");
        Serial.print("Battery percent: ");
        Serial.print(batteryPcnt);
        Serial.println(" %");
      }  
    
      send(battPctMsg.set(batteryPcnt,0));
      //send(battVoltMsg.set(batteryVoltage,2));
      float rssiReceive = RFM69_getReceivingRSSI();
      //send(RSSILevel.set(rssiReceive,0));
      wait(10000);
    }
    
    


  • Are you using the new driver on the gateway also?



  • @Alpoy said in Feather M0 RFM60HCW (433Mhz) - can't connect to gw:

    Feather M0 RFM69HCW

    I think you only need:
    #define MY_RFM69_IRQ_PIN 3
    #define MY_RFM69_CS_PIN 8
    for M0 this is not required
    #define MY_RFM69_IRQ_NUM 3



  • @electrik Yepp, using the new driver on the feather and GW
    @alexelite yeah I just tried it to see if it made any difference, and it didn't 😉





  • You can try with #define MY_DEBUG_VERBOSE_RFM69_REGISTERS to se if radio communication is ok and mysensors library is able to communicate with the radio. You should see registers dump at startup.

    If that is ok, on the gateway you should see a "find parent request" from this node.
    This should narrow the problem to "are you transmitting and not receiving", or "you are not transmitting".



  • @alexelite

    Seems the GW receives something, here's the logs:

    Feather:

    13:08:02.321 -> 2996 !TSM:FPAR:NO REPLY
    13:08:02.321 -> 2996 TSM:FPAR
    13:08:02.321 -> 2996 RFM69:SWR:SEND,TO=255,SEQ=1,RETRY=0
    13:08:02.321 -> 2997 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-86
    13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-89
    13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-84
    13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-85
    13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-84
    13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-88
    13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-87
    13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-86
    13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-85
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-86
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-93
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-90
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-93
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-90
    13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-91
    13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-91
    13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-90
    13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-91
    13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-93
    13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-96
    13:08:02.356 -> 3009 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    13:08:04.336 -> 5011 !TSM:FPAR:NO REPLY
    13:08:04.336 -> 5011 TSM:FPAR
    13:08:04.336 -> 5011 RFM69:SWR:SEND,TO=255,SEQ=2,RETRY=0
    13:08:04.336 -> 5012 RFM69:CSMA:RSSI=-99
    13:08:04.336 -> 5016 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    13:08:06.336 -> 7018 !TSM:FPAR:NO REPLY
    13:08:06.336 -> 7018 TSM:FPAR
    13:08:06.336 -> 7018 RFM69:SWR:SEND,TO=255,SEQ=3,RETRY=0
    13:08:06.336 -> 7019 RFM69:CSMA:RSSI=-96
    13:08:06.371 -> 7024 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    13:08:08.365 -> 9025 !TSM:FPAR:FAIL
    13:08:08.365 -> 9025 TSM:FAIL:CNT=1
    13:08:08.365 -> 9025 TSM:FAIL:DIS
    13:08:08.365 -> 9025 TSF:TDI:TSL
    13:08:08.365 -> 9025 RFM69:RSL
    13:08:14.946 -> 15616 MCO:BGN:STP
    13:08:14.946 -> Running setup...
    13:08:18.340 -> 19026 TSM:FAIL:RE-INIT
    13:08:18.340 -> 19026 TSM:INIT
    13:08:18.444 -> 19131 RFM69:INIT
    13:08:18.444 -> 19136 RFM69:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
    13:08:18.444 -> 19137 RFM69:PTX:LEVEL=5 dBm
    13:08:18.477 -> 19137 RFM69:DUMP:Registers Address | HEX value 
    13:08:18.477 -> 19138 RFM69:DUMP:REG=0x01 Value=0x04
    13:08:18.477 -> 19138 RFM69:DUMP:REG=0x02 Value=0x00
    13:08:18.477 -> 19138 RFM69:DUMP:REG=0x03 Value=0x02
    13:08:18.477 -> 19138 RFM69:DUMP:REG=0x04 Value=0x40
    13:08:18.477 -> 19138 RFM69:DUMP:REG=0x05 Value=0x03
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x06 Value=0x33
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x07 Value=0x6c
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x08 Value=0x7a
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x09 Value=0xe1
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x0a Value=0x41
    13:08:18.477 -> 19139 RFM69:DUMP:REG=0x0b Value=0x40
    13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0c Value=0x02
    13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0d Value=0x92
    13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0e Value=0xf5
    13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0f Value=0x20
    13:08:18.477 -> 19140 RFM69:DUMP:REG=0x10 Value=0x24
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x11 Value=0x57
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x12 Value=0x09
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x13 Value=0x1a
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x14 Value=0x40
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x15 Value=0xb0
    13:08:18.477 -> 19141 RFM69:DUMP:REG=0x16 Value=0x7b
    13:08:18.477 -> 19142 RFM69:DUMP:REG=0x17 Value=0x9b
    13:08:18.477 -> 19142 RFM69:DUMP:REG=0x18 Value=0x88
    13:08:18.477 -> 19142 RFM69:DUMP:REG=0x19 Value=0xe2
    13:08:18.477 -> 19142 RFM69:DUMP:REG=0x1a Value=0xe2
    13:08:18.477 -> 19142 RFM69:DUMP:REG=0x1b Value=0x40
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1c Value=0x80
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1d Value=0x06
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1e Value=0x10
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1f Value=0x00
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x20 Value=0x00
    13:08:18.477 -> 19143 RFM69:DUMP:REG=0x21 Value=0x00
    13:08:18.477 -> 19144 RFM69:DUMP:REG=0x22 Value=0x00
    13:08:18.477 -> 19144 RFM69:DUMP:REG=0x23 Value=0x02
    13:08:18.477 -> 19144 RFM69:DUMP:REG=0x24 Value=0xff
    13:08:18.477 -> 19144 RFM69:DUMP:REG=0x25 Value=0x00
    13:08:18.477 -> 19144 RFM69:DUMP:REG=0x26 Value=0x07
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x27 Value=0x80
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x28 Value=0x00
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x29 Value=0xe4
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2a Value=0x00
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2b Value=0x00
    13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2c Value=0x00
    13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2d Value=0x03
    13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2e Value=0x88
    13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2f Value=0x2d
    13:08:18.477 -> 19146 RFM69:DUMP:REG=0x30 Value=0x64
    13:08:18.477 -> 19146 RFM69:DUMP:REG=0x31 Value=0x00
    13:08:18.477 -> 19147 RFM69:DUMP:REG=0x32 Value=0x00
    13:08:18.477 -> 19147 RFM69:DUMP:REG=0x33 Value=0x00
    13:08:18.477 -> 19147 RFM69:DUMP:REG=0x34 Value=0x00
    13:08:18.477 -> 19147 RFM69:DUMP:REG=0x35 Value=0x00
    13:08:18.477 -> 19147 RFM69:DUMP:REG=0x36 Value=0x00
    13:08:18.477 -> 19148 RFM69:DUMP:REG=0x37 Value=0xd4
    13:08:18.477 -> 19148 RFM69:DUMP:REG=0x38 Value=0x40
    13:08:18.477 -> 19148 RFM69:DUMP:REG=0x39 Value=0xff
    13:08:18.477 -> 19148 RFM69:DUMP:REG=0x3a Value=0xff
    13:08:18.477 -> 19148 RFM69:DUMP:REG=0x3b Value=0x00
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3c Value=0x05
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3d Value=0x10
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3e Value=0x00
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3f Value=0x00
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x40 Value=0x00
    13:08:18.477 -> 19149 RFM69:DUMP:REG=0x41 Value=0x00
    13:08:18.477 -> 19150 RFM69:DUMP:REG=0x42 Value=0x00
    13:08:18.477 -> 19150 RFM69:DUMP:REG=0x43 Value=0x00
    13:08:18.477 -> 19150 RFM69:DUMP:REG=0x44 Value=0x00
    13:08:18.477 -> 19150 RFM69:DUMP:REG=0x45 Value=0x00
    13:08:18.477 -> 19150 RFM69:DUMP:REG=0x46 Value=0x00
    13:08:18.477 -> 19151 RFM69:DUMP:REG=0x47 Value=0x00
    13:08:18.477 -> 19151 RFM69:DUMP:REG=0x48 Value=0x00
    13:08:18.477 -> 19151 RFM69:DUMP:REG=0x49 Value=0x00
    13:08:18.477 -> 19151 RFM69:DUMP:REG=0x4a Value=0x00
    13:08:18.477 -> 19151 RFM69:DUMP:REG=0x4b Value=0x00
    13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4c Value=0x00
    13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4d Value=0x00
    13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4e Value=0x01
    13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4f Value=0x00
    13:08:18.545 -> 19205 TSM:INIT:TSP OK
    13:08:18.545 -> 19206 TSM:INIT:STATID=20
    13:08:18.745 -> 19418 TSF:SID:OK,ID=20
    13:08:18.745 -> 19418 TSM:FPAR
    13:08:18.745 -> 19418 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
    13:08:18.745 -> 19420 RFM69:CSMA:RSSI=-96
    13:08:18.745 -> 19424 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    13:08:19.991 -> done!
    13:08:19.991 -> 20676 MCO:BGN:INIT OK,TSP=0
    13:08:19.991 -> Running loop...
    13:08:19.991 -> Battery Voltage: 4.31 V
    13:08:19.991 -> Battery percent: 100 %
    13:08:19.991 -> 20677 !MCO:SND:NODE NOT REG
    13:08:20.736 -> 21425 !TSM:FPAR:NO REPLY
    

    Gateway:

    13238361 RFM69:SAC:SEND ACK,TO=5,RSSI=-19
    13238366 RFM69:CSMA:RSSI=-92
    13238369 RFM69:CSMA:RSSI=-92
    13238374 RFM69:CSMA:RSSI=-94
    13238379 RFM69:CSMA:RSSI=-94
    13238383 RFM69:CSMA:RSSI=-93
    13238388 RFM69:CSMA:RSSI=-99
    13242373 RFM69:SAC:SEND ACK,TO=63,RSSI=-20
    13242378 RFM69:CSMA:RSSI=-97
    13254767 RFM69:SAC:SEND ACK,TO=243,RSSI=-27
    13254772 RFM69:CSMA:RSSI=-99
    13256772 RFM69:SAC:SEND ACK,TO=138,RSSI=-27
    13256777 RFM69:CSMA:RSSI=-104
    

    NB: the GW and the feather are 20-30 cm apart so there shouldn't be any signal problem



  • I think I've narrowed it down to encryption, disabling it on the GW and the feather seems to make everything work ok. I've double checked that the key is identical but still won't work.
    Encryption works when I use the ESP32 as "client" instead of the Feather M0. I thought the AES encryption was done in the radio (rfm69) and not the microcontroller (ie. ESP32/Arduino etc.).

    Also, there's really no log message that indicates wrong encryption key or anything related to an encryption problem in the communication? 😐


Log in to reply
 

Suggested Topics

51
Online

11.4k
Users

11.1k
Topics

112.6k
Posts