New RFM69 driver error

  • While attempting to compile for an Uno using a W5100 Ethernet gateway setup I get the following error(s):

    Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
    In file included from D:\Documents\Arduino\libraries\MySensors/MySensors.h:343:0,
                     from D:\OneDrive\Home Automation Project\GatewayW5100.ino\GatewayW5100.ino.ino:120:
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp: In function 'void RFM69_prepareSPITransaction()':
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:73:2: error: '_SREG' was not declared in this scope
      _SREG = SREG;
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:78:2: error: '_SPCR' was not declared in this scope
      _SPCR = SPCR;
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:79:2: error: '_SPSR' was not declared in this scope
      _SPSR = SPSR;
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp: In function 'void RFM69_concludeSPITransaction()':
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:99:9: error: '_SPCR' was not declared in this scope
      SPCR = _SPCR;
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:100:9: error: '_SPSR' was not declared in this scope
      SPSR = _SPSR;
    D:\Documents\Arduino\libraries\MySensors/drivers/RFM69/new/RFM69_new.cpp:104:9: error: '_SREG' was not declared in this scope
      SREG = _SREG;
    exit status 1
    Error compiling for board Arduino/Genuino Uno.
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    Anyone have any ideas what's going on?

    Thanks in advance.

  • Mod

    Never seen that error. Did you try to compile for a different arduino? Are you using mysensors 2.2?

  • @gohan said in New RFM69 driver error:

    Did you try to compile for a different arduino?

    It seems to work fine for the Adafruit Feather Wings when selected.
    The error only comes up when I switch the board to the Uno for the ethernet gateway.

    @gohan said in New RFM69 driver error:

    Are you using mysensors 2.2?


  • Mod

    What arduino ide version do you have? What Arduino Boards Definitions are you using? Did you try compiling for pro mini?

  • Hardware Contributor

    hmm, I think there is maybe a little bug.

    I don't remember how exactly works uno/nano ethernet gw in softspi mode. When I tested it, I used hw spi for both.

    Just to be sure, have you modified the gw sketch? (it's good habit, for helping, to post the problematic sketch so we can check defines).

    If that's the case, that

    could you try to change two lines in the following file:

    • path is your Mydocuments\Arduino\libraries\Mysensors\drivers\rfm69\new\RFM69_new.cpp

    It's quick&dirty (not digged for a cleaner solution), but you just need to hack 2lines, for a simple test.

    Line 46, change:

    #if defined (SREG) && !defined(SPI_HAS_TRANSACTION)


    #if defined (SREG)	&& (!defined(SPI_HAS_TRANSACTION) || defined(MY_SOFTSPI))

    And finally, line 50, change:

    #if defined (SPCR) && defined (SPSR) && !defined(SPI_HAS_TRANSACTION)


    #if defined (SPCR) && defined (SPSR) && (!defined(SPI_HAS_TRANSACTION) || defined(MY_SOFTSPI))

    This should compile, I have no idea if it will run ok as I have no time to prepare a test setup for the moment.

    Please tell if it's ok or not. I hope this will help

  • @gohan

    @gohan said in New RFM69 driver error:

    What arduino ide version do you have?

    Arduino: 1.8.5

    @gohan said in New RFM69 driver error:

    What Arduino Boards Definitions are you using?
    Arduino AVR Boards 1.6.20 (for my Uno with W5100 Ethernet shield)
    Adafruit AVR Boards 1.4.12 (for the Feather boards 32u4)

    @gohan said in New RFM69 driver error:

    Did you try compiling for pro mini?
    No as i don't have or use Pro Minis

    It does compile for my Nano sensor just fine.
    So far the error's only occurred when trying to compile for the Uno.

  • Hardware Contributor

    I think it happens because of the softspi define, in the w5100 ethernet gw sketch.

    could you try my test above please ?

  • @scalz
    Your modifications seemed to have resolved the issue.

    Also I've made this modification to MyTransport.cpp so it resets the radio on init:

    void stInitTransition(void)
    	#if defined(ADAFRUIT_RFM69)
    	pinMode(9, OUTPUT);
    	digitalWrite(9, HIGH);
    	digitalWrite(9, LOW);

    Sketch for reference:

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    // Enable Adafruit RFM69 breakout fix
    #define ADAFRUIT_RFM69
    // Enable and select radio type attached
    #define MY_RADIO_RFM69
    #define MY_RFM69_NEW_DRIVER // ATC on RFM69 works only with the new driver
    #define MY_RFM69_ATC_TARGET_RSSI_DBM (-70)  // target RSSI -70dBm
    #define MY_RFM69_MAX_POWER_LEVEL_DBM (10) // amx. TX power 10dBm = 10mW
    #define MY_IS_RFM69HW  // Mandatory if you radio module is the high power version (RFM69HW and RFM69HCW), Comment it if it's not the case
    #define MY_RF69_FREQUENCY RFM69_915MHZ  // Define for frequency setting. Needed if you're radio module isn't 868Mhz (868Mhz is default in lib)
    #define MY_RF69_SPI_CS 4
    #define MY_RF69_IRQ_PIN 2
    //#define MY_RF69_IRQ_NUM 0
    //#define W5100SPIPATCH
    #define SKETCH_NAME "MySensors Ethernet Gateway"
    #define SKETCH_MAJOR "0"
    #define SKETCH_MINOR "5"
    // How many clients should be able to connect to this gateway (default 1)
    // Enable gateway ethernet module type
    #define MY_GATEWAY_W5100
    // Enable Soft SPI for NRF radio (note different radio wiring is required)
    // The W5100 ethernet module seems to have a hard time co-operate with 
    // radio on the same spi bus.
    #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
      #define MY_SOFTSPI
      #define MY_SOFT_SPI_SCK_PIN 14
      #define MY_SOFT_SPI_MISO_PIN 15
      #define MY_SOFT_SPI_MOSI_PIN 16
    // Enable to UDP
    //#define MY_USE_UDP
    #define MY_IP_ADDRESS 192,168,1,204   // If this is disabled, DHCP is used to retrieve address
    // Renewal period if using DHCP
    //#define MY_IP_RENEWAL_INTERVAL 60000
    // The port to keep open on node server mode / or port to contact in client mode
    #define MY_PORT 5003
    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
    #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
    // Enable inclusion mode
    // Enable Inclusion mode button on gateway
    // Set inclusion mode duration (in seconds)
    // Digital pin used for inclusion mode button
    // Set blinking period
    // Flash leds on rx/tx/err
    // Uncomment to override default HW configurations
    //#define MY_DEFAULT_ERR_LED_PIN 5  // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  7  // Transmit led pin
    #if defined(MY_USE_UDP)
    #include <EthernetUdp.h>
    #include <Ethernet.h>
    #include <MySensors.h>
    void presentation()  
      // Send the sketch version information to the gateway
    void setup()
    void loop()

  • Hardware Contributor

    reset is already implemented in rf69 driver (see here )
    in your sketch you just need to define it like this

    #define MY_RFM69_RST_PIN  your_reset_pin

  • @scalz
    I've updated my sketch to include that for the new driver. Thank you.
    I had to use that mod for the older driver.

  • @scalz Trying to update all my nodes to the new driver, getting this on the gateway now:

    3 TSM:INIT
    4 TSF:WUR:MS=0
    5 RFM69:INIT
    11 RFM69:INIT:PIN,CS=4,IQP=2,IQN=0,RST=9
    116 RFM69:PTX:LEVEL=5 dBm
    122 TSM:FAIL:CNT=1
    124 TSM:FAIL:DIS
    126 TSF:TDI:TSL
    128 RFM69:RSL

    Same sketch as previously posted (with RFM69 verbose defined for more info). Any ideas?

  • Jumped the gun on a "fixed" post 😞

  • I have the same error as @firstof9. I have tried all the combinations of arduino (uno, nano) and rfm69, rfm69hw and node, gw sketch and nodemanager... but always got this SANCHK FAIL error...

    I solder all rfm69s to nrf2rfm69 converter by @tbowmo

  • Hardware Contributor

    If i understand it well, i think firstof9 issue is solved.
    Regarding yours, please post more infos else we can't help much.. : hw used, sketch so we can check your defines&code, logs..

    Note: it is not recommanded (explained in mysensors docs) to use rfm69 which is not 5V tolerant (3.6v max), with uno/nano which are 5v signal levels boards (SPI is running 5v). For this you would need level shifting board.
    Maybe your modules are not dead because of these tests but better be careful.
    To be sure, about your modules&sketch, you could try with arduino mini pro 3v/8mhz boards.

    SANCHK FAIL means you need to check wiring or change module

  • @scalz thanks for advice... I connect modules like sheme on mysensors and watch only for Vcc to be 3V. I try with NodeMCU for gateway and pro mini for node and modules are OK. I use NodeManager for sketches.

    But I have another problem. If I use on both (GW and node) rfm69 the range of connection is about 10 -15m trough the wall. So I try to extend range with use of rfm69hw. If I use both hw modules there is no connection even nodes are one by another. If I use one ordinary and one hw module, the range is max. about 1m.

    Node is connected through FDTI and NodeMCU is on USB.

    node log:

    43 MCO:BGN:BFR
    NodeManager v1.7
    LIB V=2.2.0 R=P E=- T=N A=A S=- B=-
    BATTERY I=201 P=30 T=38
    SIGNAL I=202 P=33 T=37
    RADIO...108 TSM:INIT
    188 TSF:WUR:MS=0
    206 RFM69:INIT
    223 RFM69:INIT:PIN,CS=10,IQP=2,IQN=0
    262 RFM69:PTX:LEVEL=5 dBm
    311 TSM:INIT:STATID=101
    335 TSF:SID:OK,ID=101
    358 TSM:FPAR
    372 RFM69:SWR:SEND,TO=255,RETRY=0
    411 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1572 RFM69:SAC:SEND ACK,TO=0,RSSI=-31
    1615 TSF:MSG:READ,0-0-101,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    1675 TSF:MSG:FPAR OK,ID=0,D=1
    2490 TSM:FPAR:OK
    2506 TSM:ID
    2521 TSM:ID:OK
    2535 TSM:UPL
    2549 RFM69:SWR:SEND,TO=0,RETRY=0
    2633 RFM69:SWR:ACK,FROM=0,SEQ=3,RSSI=-73
    2676 RFM69:ATC:ADJ TXL,cR=-73,tR=-80,TXL=4
    2721 RFM69:PTX:LEVEL=4 dBm
    2750 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2824 RFM69:SAC:SEND ACK,TO=0,RSSI=-31
    2867 TSF:MSG:READ,0-0-101,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2957 TSM:UPL:OK
    2973 TSM:READY:ID=101,PAR=0,DIS=1
    3010 RFM69:SWR:SEND,TO=0,RETRY=0
    3092 RFM69:SWR:ACK,FROM=0,SEQ=5,RSSI=-72
    3135 RFM69:ATC:ADJ TXL,cR=-72,tR=-80,TXL=3
    3180 RFM69:PTX:LEVEL=3 dBm
    3209 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    3289 RFM69:SAC:SEND ACK,TO=0,RSSI=-31
    3330 TSF:MSG:READ,0-0-101,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    3393 RFM69:SWR:SEND,TO=0,RETRY=0
    3497 RFM69:SWR:ACK,FROM=0,SEQ=7,RSSI=-74
    3540 RFM69:ATC:ADJ TXL,cR=-74,tR=-80,TXL=2
    3586 RFM69:PTX:LEVEL=2 dBm
    3614 TSF:MSG:SEND,101-101-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0
    3694 RFM69:SWR:SEND,TO=0,RETRY=0
    3778 RFM69:SWR:ACK,FROM=0,SEQ=8,RSSI=-73
    3821 RFM69:ATC:ADJ TXL,cR=-73,tR=-80,TXL=1
    3866 RFM69:PTX:LEVEL=1 dBm
    3895 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    5969 RFM69:SWR:SEND,TO=0,RETRY=0
    6057 RFM69:SWR:ACK,FROM=0,SEQ=9,RSSI=-72
    6100 RFM69:ATC:ADJ TXL,cR=-72,tR=-80,TXL=0
    6146 RFM69:PTX:LEVEL=0 dBm
    6174 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=11,pt=0,l=17,sg=0,ft=0,st=OK:NodeManagerSENSOR
    6268 RFM69:SWR:SEND,TO=0,RETRY=0
    6350 RFM69:SWR:ACK,FROM=0,SEQ=10,RSSI=-73
    6395 RFM69:ATC:ADJ TXL,cR=-73,tR=-80,TXL=-1
    6440 RFM69:PTX:LEVEL=-1 dBm
    6471 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
    PRES I=201 T=30 D=BATTERY
    6549 RFM69:SWR:SEND,TO=0,RETRY=0
    6660 RFM69:SWR:ACK,FROM=0,SEQ=11,RSSI=-72
    6705 RFM69:ATC:ADJ TXL,cR=-72,tR=-80,TXL=-2
    6750 RFM69:PTX:LEVEL=-2 dBm
    6780 TSF:MSG:SEND,101-101-0-0,s=201,c=0,t=30,pt=0,l=7,sg=0,ft=0,st=OK:BATTERY
    PRES I=202 T=33 D=SIGNAL
    6862 RFM69:SWR:SEND,TO=0,RETRY=0
    6973 RFM69:SWR:ACK,FROM=0,SEQ=12,RSSI=-73
    7016 TSF:MSG:SEND,101-101-0-0,s=202,c=0,t=33,pt=0,l=6,sg=0,ft=0,st=OK:SIGNAL
    7096 MCO:REG:REQ
    7124 RFM69:SWR:SEND,TO=0,RETRY=0
    7206 RFM69:SWR:ACK,FROM=0,SEQ=13,RSSI=-72
    7251 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    7327 RFM69:SAC:SEND ACK,TO=0,RSSI=-30
    7368 TSF:MSG:READ,0-0-101,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    7430 MCO:PIM:NODE REG=1
    7454 MCO:BGN:STP
    MY I=101 M=1
    INT P=3 M=255
    INT P=2 M=255
    7475 MCO:BGN:INIT OK,TSP=1
    BATTERY V=3.26 %=94
    7616 RFM69:SWR:SEND,TO=0,RETRY=0
    7720 RFM69:SWR:ACK,FROM=0,SEQ=15,RSSI=-73
    7763 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:94
    SEND D=0 I=201 C=0 T=38 S= I=0 F=3.26
    7841 RFM69:SWR:SEND,TO=0,RETRY=0
    7964 RFM69:SWR:ACK,FROM=0,SEQ=16,RSSI=-71
    8007 TSF:MSG:SEND,101-101-0-0,s=201,c=1,t=38,pt=7,l=5,sg=0,ft=0,st=OK:3.26
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    8089 RFM69:SWR:SEND,TO=0,RETRY=0
    8224 RFM69:SWR:ACK,FROM=0,SEQ=17,RSSI=-74
    8269 TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    13357 RFM69:SWR:SEND,TO=0,RETRY=0
    13494 RFM69:SWR:ACK,FROM=0,SEQ=18,RSSI=-70
    13541 TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    18628 RFM69:SWR:SEND,TO=0,RETRY=0
    18765 RFM69:SWR:ACK,FROM=0,SEQ=19,RSSI=-71
    18812 TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    23898 RFM69:SWR:SEND,TO=0,RETRY=0
    24035 RFM69:SWR:ACK,FROM=0,SEQ=20,RSSI=-69
    24082 TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=OK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    29169 RFM69:SWR:SEND,TO=0,RETRY=0
    29462 !RFM69:SWR:NACK
    29485 RFM69:PTX:LEVEL=-1 dBm
    29523 RFM69:SWR:SEND,TO=0,RETRY=1
    29763 !RFM69:SWR:NACK
    29786 RFM69:PTX:LEVEL=0 dBm
    29855 RFM69:SWR:SEND,TO=0,RETRY=2
    30095 !RFM69:SWR:NACK
    30117 RFM69:PTX:LEVEL=1 dBm
    30146 RFM69:SWR:SEND,TO=0,RETRY=3
    30388 !RFM69:SWR:NACK
    30410 RFM69:PTX:LEVEL=2 dBm
    30480 RFM69:SWR:SEND,TO=0,RETRY=4
    30720 !RFM69:SWR:NACK
    30742 RFM69:PTX:LEVEL=3 dBm
    30803 RFM69:SWR:SEND,TO=0,RETRY=5
    31043 !RFM69:SWR:NACK
    31066 RFM69:PTX:LEVEL=4 dBm
    31135 !TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=0,st=NACK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    36227 RFM69:SWR:SEND,TO=0,RETRY=0
    36519 !RFM69:SWR:NACK
    36542 RFM69:PTX:LEVEL=5 dBm
    36579 RFM69:SWR:SEND,TO=0,RETRY=1
    36818 !RFM69:SWR:NACK
    36841 RFM69:PTX:LEVEL=6 dBm
    36878 RFM69:SWR:SEND,TO=0,RETRY=2
    37117 !RFM69:SWR:NACK
    37140 RFM69:PTX:LEVEL=7 dBm
    37201 RFM69:SWR:SEND,TO=0,RETRY=3
    37441 !RFM69:SWR:NACK
    37464 RFM69:PTX:LEVEL=8 dBm
    37533 RFM69:SWR:SEND,TO=0,RETRY=4
    37773 !RFM69:SWR:NACK
    37795 RFM69:PTX:LEVEL=9 dBm
    37824 RFM69:SWR:SEND,TO=0,RETRY=5
    38066 !RFM69:SWR:NACK
    38088 RFM69:PTX:LEVEL=10 dBm
    38160 !TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=1,st=NACK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    43251 RFM69:SWR:SEND,TO=0,RETRY=0
    43544 !RFM69:SWR:NACK
    43567 RFM69:PTX:LEVEL=11 dBm
    43606 RFM69:SWR:SEND,TO=0,RETRY=1
    43845 !RFM69:SWR:NACK
    43868 RFM69:PTX:LEVEL=12 dBm
    43939 RFM69:SWR:SEND,TO=0,RETRY=2
    44179 !RFM69:SWR:NACK
    44201 RFM69:PTX:LEVEL=13 dBm
    44240 RFM69:SWR:SEND,TO=0,RETRY=3
    44480 !RFM69:SWR:NACK
    44503 RFM69:PTX:LEVEL=14 dBm
    44566 RFM69:SWR:SEND,TO=0,RETRY=4
    44806 !RFM69:SWR:NACK
    44828 RFM69:PTX:LEVEL=15 dBm
    44900 RFM69:SWR:SEND,TO=0,RETRY=5
    45139 !RFM69:SWR:NACK
    45162 RFM69:PTX:LEVEL=16 dBm
    45201 !TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=2,st=NACK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    50292 RFM69:SWR:SEND,TO=0,RETRY=0
    50585 !RFM69:SWR:NACK
    50608 RFM69:PTX:LEVEL=17 dBm
    50638 RFM69:SWR:SEND,TO=0,RETRY=1
    50878 !RFM69:SWR:NACK
    50900 RFM69:PTX:LEVEL=18 dBm
    50964 RFM69:SWR:SEND,TO=0,RETRY=2
    51204 !RFM69:SWR:NACK
    51226 RFM69:PTX:LEVEL=19 dBm
    51298 RFM69:SWR:SEND,TO=0,RETRY=3
    51537 !RFM69:SWR:NACK
    51560 RFM69:PTX:LEVEL=20 dBm
    51599 RFM69:SWR:SEND,TO=0,RETRY=4
    51838 !RFM69:SWR:NACK
    51861 RFM69:PTX:NO ADJ
    51918 RFM69:SWR:SEND,TO=0,RETRY=5
    52158 !RFM69:SWR:NACK
    52180 RFM69:PTX:NO ADJ
    52238 !TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=3,st=NACK:4294967270
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    57329 RFM69:SWR:SEND,TO=0,RETRY=0
    57622 !RFM69:SWR:NACK
    57645 RFM69:PTX:NO ADJ
    57677 RFM69:SWR:SEND,TO=0,RETRY=1
    57917 !RFM69:SWR:NACK
    57939 RFM69:PTX:NO ADJ
    57997 RFM69:SWR:SEND,TO=0,RETRY=2
    58236 !RFM69:SWR:NACK
    58259 RFM69:PTX:NO ADJ
    58316 RFM69:SWR:SEND,TO=0,RETRY=3
    58556 !RFM69:SWR:NACK
    58578 RFM69:PTX:NO ADJ
    58636 RFM69:SWR:SEND,TO=0,RETRY=4
    58875 !RFM69:SWR:NACK
    58898 RFM69:PTX:NO ADJ
    58955 RFM69:SWR:SEND,TO=0,RETRY=5
    59195 !RFM69:SWR:NACK
    59217 RFM69:PTX:NO ADJ
    59275 !TSF:MSG:SEND,101-101-0-0,s=202,c=1,t=37,pt=5,l=4,sg=0,ft=4,st=NACK:4294967270
    BATTERY V=3.26 %=94
    60071 RFM69:SWR:SEND,TO=0,RETRY=0
    60332 !RFM69:SWR:NACK
    60354 RFM69:PTX:NO ADJ
    60411 RFM69:SWR:SEND,TO=0,RETRY=1
    60651 !RFM69:SWR:NACK
    60674 RFM69:PTX:NO ADJ
    60731 RFM69:SWR:SEND,TO=0,RETRY=2
    60971 !RFM69:SWR:NACK
    60993 RFM69:PTX:NO ADJ
    61050 RFM69:SWR:SEND,TO=0,RETRY=3
    61290 !RFM69:SWR:NACK
    61313 RFM69:PTX:NO ADJ
    61370 RFM69:SWR:SEND,TO=0,RETRY=4
    61609 !RFM69:SWR:NACK
    61632 RFM69:PTX:NO ADJ
    61689 RFM69:SWR:SEND,TO=0,RETRY=5
    61929 !RFM69:SWR:NACK
    61952 RFM69:PTX:NO ADJ
    62009 !TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=5,st=NACK:94
    SEND D=0 I=201 C=0 T=38 S= I=0 F=3.26
    62089 RFM69:SWR:SEND,TO=0,RETRY=0
    62369 !RFM69:SWR:NACK
    62392 RFM69:PTX:NO ADJ
    62425 RFM69:SWR:SEND,TO=0,RETRY=1
    62664 !RFM69:SWR:NACK
    62687 RFM69:PTX:NO ADJ
    62711 RFM69:SWR:SEND,TO=0,RETRY=2
    62951 !RFM69:SWR:NACK
    62973 RFM69:PTX:NO ADJ
    63006 RFM69:SWR:SEND,TO=0,RETRY=3
    63246 !RFM69:SWR:NACK
    63268 RFM69:PTX:NO ADJ
    63293 RFM69:SWR:SEND,TO=0,RETRY=4
    63533 !RFM69:SWR:NACK
    63555 RFM69:PTX:NO ADJ
    63612 RFM69:SWR:SEND,TO=0,RETRY=5
    63852 !RFM69:SWR:NACK
    63875 RFM69:PTX:NO ADJ
    63932 !TSF:MSG:SEND,101-101-0-0,s=201,c=1,t=38,pt=7,l=5,sg=0,ft=6,st=NACK:3.26
    64045 TSM:FPAR
    64061 RFM69:SWR:SEND,TO=255,RETRY=0
    64104 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=7,st=OK:
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    64366 !TSF:SND:TNR
    66183 !TSM:FPAR:NO REPLY
    66209 TSM:FPAR
    66224 RFM69:SWR:SEND,TO=255,RETRY=0
    66267 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    68345 !TSM:FPAR:NO REPLY
    68370 TSM:FPAR
    68386 RFM69:SWR:SEND,TO=255,RETRY=0
    68429 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    69441 !TSF:SND:TNR
    70508 !TSM:FPAR:NO REPLY
    70533 TSM:FPAR
    70549 RFM69:SWR:SEND,TO=255,RETRY=0
    70592 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    72671 !TSM:FPAR:FAIL
    72691 TSM:FAIL:CNT=1
    72714 TSM:FAIL:DIS
    72734 TSF:TDI:TSL
    72755 RFM69:RSL
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    74516 !TSF:SND:TNR
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    79591 !TSF:SND:TNR
    82774 TSM:FAIL:RE-INIT
    82798 TSM:INIT
    82812 RFM69:INIT
    82831 RFM69:INIT:PIN,CS=10,IQP=2,IQN=0
    82874 RFM69:PTX:LEVEL=5 dBm
    82903 TSM:INIT:TSP OK
    82927 TSM:INIT:STATID=101
    82954 TSF:SID:OK,ID=101
    82980 TSM:FPAR
    82995 RFM69:SWR:SEND,TO=255,RETRY=0
    83038 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    84666 !TSF:SND:TNR
    85118 !TSM:FPAR:NO REPLY
    85143 TSM:FPAR
    85159 RFM69:SWR:SEND,TO=255,RETRY=0
    85202 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    87281 !TSM:FPAR:NO REPLY
    87306 TSM:FPAR
    87322 RFM69:SWR:SEND,TO=255,RETRY=0
    87365 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    89444 !TSM:FPAR:NO REPLY
    89468 TSM:FPAR
    89485 RFM69:SWR:SEND,TO=255,RETRY=0
    89536 TSF:MSG:SEND,101-101-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    89741 !TSF:SND:TNR
    91615 !TSM:FPAR:FAIL
    91637 TSM:FAIL:CNT=2
    91658 TSM:FAIL:DIS
    91678 TSF:TDI:TSL
    91699 RFM69:RSL
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    94814 !TSF:SND:TNR
    SIGNAL V=-26
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    99887 !TSF:SND:TNR

    On 29000 I move gateway far away on another side of laptop..

    An here is GW log:

    62 MCO:BGN:INIT GW,CP=RPNGE---,VER=2.2.0
    105 MCO:BGN:BFR
    NodeManager v1.7
    LIB V=2.2.0 R=P E=- T=G A=E S=- B=-
    SIGNAL I=202 P=33 T=37
    RADIO...122 TSF:LRT:OK
    228 TSM:INIT
    242 TSF:WUR:MS=0
    260 RFM69:INIT
    276 RFM69:INIT:PIN,CS=15,IQP=5,IQN=5
    315 RFM69:PTX:LEVEL=5 dBm
    385 TSM:READY:ID=0,PAR=0,DIS=0
    971 GWT:TIN:IP=
    1001 MCO:BGN:STP
    MY I=0 M=255
    INT P=3 M=255
    INT P=2 M=255
    1019 MCO:BGN:INIT OK,TSP=1
    SIGNAL V=0
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    1571 TSF:MSG:READ,101-101-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    1632 TSF:MSG:BC
    1649 TSF:MSG:FPAR REQ,ID=101
    1702 TSF:MSG:GWL OK
    2422 RFM69:SWR:SEND,TO=101,RETRY=0
    2662 !RFM69:SWR:NACK
    2692 RFM69:SWR:SEND,TO=101,RETRY=1
    2774 RFM69:SWR:ACK,FROM=101,SEQ=1,RSSI=-31
    2819 TSF:MSG:SEND,0-0-101-101,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    3747 RFM69:SAC:SEND ACK,TO=101,RSSI=-73
    3791 TSF:MSG:READ,101-101-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    3853 TSF:MSG:PINGED,ID=101,HP=1
    3891 RFM69:SWR:SEND,TO=101,RETRY=0
    4026 RFM69:SWR:ACK,FROM=101,SEQ=3,RSSI=-31
    4071 TSF:MSG:SEND,0-0-101-101,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    4206 RFM69:SAC:SEND ACK,TO=101,RSSI=-72
    4251 TSF:MSG:READ,101-101-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    4316 RFM69:SWR:SEND,TO=101,RETRY=0
    4489 RFM69:SWR:ACK,FROM=101,SEQ=5,RSSI=-31
    4534 TSF:MSG:SEND,0-0-101-101,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    4612 RFM69:SAC:SEND ACK,TO=101,RSSI=-74
    4656 TSF:MSG:READ,101-101-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.2.0
    RECV S=101 I=255 C=0 T=17 P=2.2.0
    4891 RFM69:SAC:SEND ACK,TO=101,RSSI=-73
    4936 TSF:MSG:READ,101-101-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    RECV S=101 I=255 C=3 T=6 P=
    7172 RFM69:SAC:SEND ACK,TO=101,RSSI=-72
    7216 TSF:MSG:READ,101-101-0,s=255,c=3,t=11,pt=0,l=17,sg=0:NodeManagerSENSOR
    RECV S=101 I=255 C=3 T=11 P=NodeManagerSENSOR
    7465 RFM69:SAC:SEND ACK,TO=101,RSSI=-73
    7509 TSF:MSG:READ,101-101-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    RECV S=101 I=255 C=3 T=12 P=1.0
    7774 RFM69:SAC:SEND ACK,TO=101,RSSI=-72
    7818 TSF:MSG:READ,101-101-0,s=201,c=0,t=30,pt=0,l=7,sg=0:BATTERY
    RECV S=101 I=201 C=0 T=30 P=BATTERY
    8086 RFM69:SAC:SEND ACK,TO=101,RSSI=-73
    8130 TSF:MSG:READ,101-101-0,s=202,c=0,t=33,pt=0,l=6,sg=0:SIGNAL
    RECV S=101 I=202 C=0 T=33 P=SIGNAL
    8321 RFM69:SAC:SEND ACK,TO=101,RSSI=-72
    8365 TSF:MSG:READ,101-101-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    8432 RFM69:SWR:SEND,TO=101,RETRY=0
    8528 RFM69:SWR:ACK,FROM=101,SEQ=13,RSSI=-30
    8574 TSF:MSG:SEND,0-0-101-101,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    8834 RFM69:SAC:SEND ACK,TO=101,RSSI=-73
    8878 TSF:MSG:READ,101-101-0,s=255,c=3,t=0,pt=1,l=1,sg=0:94
    RECV S=101 I=255 C=3 T=0 P=
    9077 RFM69:SAC:SEND ACK,TO=101,RSSI=-71
    9122 TSF:MSG:READ,101-101-0,s=201,c=1,t=38,pt=7,l=5,sg=0:3.26
    RECV S=101 I=201 C=1 T=38 P=
    9339 RFM69:SAC:SEND ACK,TO=101,RSSI=-74
    9383 TSF:MSG:READ,101-101-0,s=202,c=1,t=37,pt=5,l=4,sg=0:4294967270
    RECV S=101 I=202 C=1 T=37 P=
    14607 RFM69:SAC:SEND ACK,TO=101,RSSI=-70
    14653 TSF:MSG:READ,101-101-0,s=202,c=1,t=37,pt=5,l=4,sg=0:4294967270
    RECV S=101 I=202 C=1 T=37 P=
    19878 RFM69:SAC:SEND ACK,TO=101,RSSI=-71
    19924 TSF:MSG:READ,101-101-0,s=202,c=1,t=37,pt=5,l=4,sg=0:4294967270
    RECV S=101 I=202 C=1 T=37 P=
    25148 RFM69:SAC:SEND ACK,TO=101,RSSI=-69
    25193 TSF:MSG:READ,101-101-0,s=202,c=1,t=37,pt=5,l=4,sg=0:4294967270
    RECV S=101 I=202 C=1 T=37 P=
    SIGNAL V=-69
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    SIGNAL V=-69
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    SIGNAL V=-69
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    SIGNAL V=-69
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00
    SIGNAL V=-69
    SEND D=0 I=202 C=0 T=37 S= I=0 F=0.00

    For node I use :

    // RFM69 radio settings
    #define MY_RADIO_RFM69
    //#define MY_RFM69_FREQUENCY RFM69_868MHZ
    #define MY_IS_RFM69HW
    #define MY_RFM69_NEW_DRIVER
    //#define MY_RFM69_NETWORKID 100
    #define MY_DEBUG_VERBOSE_RFM69
    //#define MY_RF69_IRQ_PIN 2
    //#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
    //#define MY_RF69_SPI_CS 10
    //#define MY_RFM69_ATC_MODE_DISABLED

    And for GW same as this except without MY_IS_RFM69HW.

    Any sugestions?

  • Hardware Contributor


    It could also be

    • bad antennas: what's your antenna ? in case of "wire" antenna, what kind of wire do you use? It needs to be one solid core, 86mm for 868mhz.
    • power supply too. maybe not enough beefy ftdi on your node, when you increase distance and need more power to transmit.

    you could eliminate power supply point, by replacing it with 2xaa battery, or any other batt as long as you keep your vcc 3.3. it would provide a more clean power supply

    Maybe you could upload a pic of your gw and node assembly, in case we see something.

    If everything is ok, then i'll recheck hw&sw here, but i can't tell you when for the moment.

  • @scalz Negitive my issue persists using the new driver. I've had to revert back to the old driver to get around this SANCHK FAIL. Same wiring same radios using older driver work perfectly fine.

    I read some where that the issue is resolved in beta version of 2.2.1.

  • Hardware Contributor

    @firstof9 said in New RFM69 driver error:

    I've updated my sketch to include that for the new driver. Thank you.
    I had to use that mod for the older driver.

    Why did you say this 4months ago? Does it mean you got it working with new driver at a moment?
    Then 3months later, you said you got hw sanity check error. What has changed?
    Maybe, have you updated lib and get again your initial problem??

    On other side, (if i get things right), nightbodom has no more sanity chech error but range issue now..

    Inconsistent details with hard to follow debug 🔮 , unfortunately no time actually. I'll take a look later.

  • @scalz Sorry, your changes fixed my OP problem with the compile errors. I forgot to follow up noting the TSP INIT fails and switching back to the old driver 😞

Log in to reply

Suggested Topics

  • 3
  • 1
  • 3
  • 2
  • 2
  • 2