Any success story on LoRa(RFM95) module and MySensors?


  • Plugin Developer

    I am trying to build LoRa setup as follows,

    • ESP8266 + RFM95 (MQTT gateway). Works perfectly
    • Arduino Uno(Atmega328P) + RFM95. Doesn't work.

    My Configurations (arduino UNO),

    // Enable and select radio type attached
    #define   MY_RADIO_RFM95
    
    #define   MY_DEBUG_VERBOSE_RFM95
    #define   MY_RFM95_MAX_POWER_LEVEL_DBM (20)   // max. TX power 10dBm = 10mW
    #define   MY_RFM95_FREQUENCY (RFM95_868MHZ)
    #define   MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW125CR48SF4096)
    
    // Enable repeater functionality for this node
    #define MY_REPEATER_FEATURE
    
    #define MY_DEBUG
    

    My ESP8266 Configurations,

    
    // Enable and select radio type attached
    #define   MY_RADIO_RFM95
    
    #define   MY_DEBUG_VERBOSE_RFM95
    #define   MY_RFM95_MAX_POWER_LEVEL_DBM (20)   // max. TX power 10dBm = 10mW
    #define   MY_RFM95_FREQUENCY (RFM95_868MHZ)
    #define   MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW125CR48SF4096)
    
    #define   MY_RFM95_IRQ_PIN 5
    #define   MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define   MY_RFM95_CS_PIN 15
    
    #define MY_GATEWAY_MQTT_CLIENT
    #define MY_GATEWAY_ESP8266
    

    Debug message atmega328p,

    17 MCO:BGN:INIT REPEATER,CP=RLNRA---,VER=2.2.0-rc.2
    26 TSM:INIT
    28 TSF:WUR:MS=0
    29 RFM95:INIT
    30 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    44 RFM95:PTX:LEVEL=13
    46 TSM:INIT:TSP OK
    48 TSM:FPAR
    49 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    2053 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4060 !TSM:FPAR:NO REPLY
    4062 TSM:FPAR
    4063 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    6068 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8075 !TSM:FPAR:NO REPLY
    8077 TSM:FPAR
    8078 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    10083 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    

    Log message from gateway,

    327 MCO:BGN:INIT GW,CP=RLNGE---,VER=2.2.0-rc.2
    331 TSF:LRT:OK
    333 TSM:INIT
    334 TSF:WUR:MS=0
    335 RFM95:INIT
    337 RFM95:INIT:PIN,CS=15,IQP=5,IQN=5
    350 RFM95:PTX:LEVEL=13
    352 TSM:INIT:TSP OK
    354 TSM:INIT:GW MODE
    356 TSM:READY:ID=0,PAR=0,DIS=0
    359 MCO:REG:NOT NEEDED
    scandone
    f 0, 861 .1361 .1861 .2361 .scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 8
    cnt 
    
    connected with jee, channel 6
    dhcp client start...
    2861 .3361 .3861 .4361 .4861 .5361 .5861 .6361 .6861 .7361 .7861 .8361 .8861 .9361 .9861 .10361 .ip:192.168.1.113,mask:255.255.255.0,gw:192.168.1.1
    10861 .10861 IP: 192.168.1.113
    10863 MCO:BGN:STP
    10867 MCO:BGN:INIT OK,TSP=1
    10869 IP: 192.168.1.113
    10871 Attempting MQTT connection...
    pm open,type:2 0
    26601 IP: 192.168.1.113
    26603 Attempting MQTT connection...
    27633 MQTT connected
    27635 Sending message on topic: out_rfm95/0/255/0/0/18
    28247 Sending message on topic: out_rfm95/0/255/3/0/11
    

  • Hardware Contributor

    @jkandasa
    I have no arduino uno, but I think it's like the nano, a 5v board, so signals are 5v.
    RFM95 is not 5v tolerant.
    You need to use level shifter, or a 3v pro mini


  • Plugin Developer

    @scalz Thank you! I tried with 3.3 volts (with pro mini). no luck 😞


  • Plugin Developer

    When I change the following settings modem configuration(MY_RFM95_MODEM_CONFIGRUATION), works nice,

    RFM95_BW125CR45SF128
    RFM95_BW500CR45SF128
    

    Doesn't work with the following modem configurations,

    RFM95_BW31_25CR48SF512
    RFM95_BW125CR48SF4096
    

  • Hero Member

    If you were to write-up your project so that others may follow it in detail, I'm sure many people would be interesting in following the trail you're blazing. 🙂


  • Plugin Developer

    @neverdie I do not have any specific project at this moment. Just checking the performance and range of LoRa (RFM95) with MySensors library.

    Gateway(ESP8266 + RFM95):

    // Application details
    #define APPLICATION_NAME    "Gateway RFM95"
    #define APPLICATION_VERSION "1.0.0.Beta"
    
    // 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 115200
    
    // Enable and select radio type attached
    #define   MY_RADIO_RFM95
    
    #define   MY_DEBUG_VERBOSE_RFM95
    //#define   MY_DEBUG_VERBOSE_RFM95_REGISTERS
    //#define MY_RFM95_ATC_TARGET_RSSI (-70)  // target RSSI -70dBm
    //#define   MY_RFM95_MAX_POWER_LEVEL_DBM (20)   // max. TX power 10dBm = 10mW
    #define   MY_RFM95_FREQUENCY (RFM95_868MHZ)
    //#define   MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW500CR45SF128)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    
    #define   MY_RFM95_IRQ_PIN 5
    #define   MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define   MY_RFM95_CS_PIN 15
    
    #define MY_GATEWAY_MQTT_CLIENT
    #define MY_GATEWAY_ESP8266
    
    // Set this node's subscribe and publish topic prefix
    #define MY_MQTT_PUBLISH_TOPIC_PREFIX "out_rfm95"
    #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "in_rfm95"
    
    // Set MQTT client id
    #define MY_MQTT_CLIENT_ID "mys_rfm95_1"
    
    // Enable these if your MQTT broker requires usenrame/password
    #define MY_MQTT_USER "mqtt"
    #define MY_MQTT_PASSWORD "mqtt"
    
    // Set WIFI SSID and password
    #define MY_ESP8266_SSID "jee"
    #define MY_ESP8266_PASSWORD "password12345678"
    
    // MQTT broker ip address.
    #define MY_CONTROLLER_IP_ADDRESS 192.168.1.209
    
    // The MQTT broker port to to open
    #define MY_PORT 1883
    
    #include <ESP8266WiFi.h>
    #include <MySensors.h>
    #include <SimpleTimer.h>
    #include <ArduinoOTA.h>
    
    
    SimpleTimer timer; // Create a Timer object called "timer"! 
    
    #define OTA_PASSWORD "mycontrollerrfm95"
    
    #define SEN_INTERNAL 10
      
    
    void setup() {
      ArduinoOTA.onStart([]() {
        Serial.println("ArduinoOTA start");
      });
      ArduinoOTA.onEnd([]() {
        Serial.println("\nArduinoOTA end");
      });
      ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
        Serial.printf("OTA Progress: %u%%\r", (progress / (total / 100)));
      });
      ArduinoOTA.onError([](ota_error_t error) {
        Serial.printf("Error[%u]: ", error);
        if (error == OTA_AUTH_ERROR) {
          Serial.println("Auth Failed");
        } else if (error == OTA_BEGIN_ERROR) {
          Serial.println("Begin Failed");
        } else if (error == OTA_CONNECT_ERROR) {
          Serial.println("Connect Failed");
        } else if (error == OTA_RECEIVE_ERROR) {
          Serial.println("Receive Failed");
        } else if (error == OTA_END_ERROR) {
          Serial.println("End Failed");
        }
      });
      ArduinoOTA.setPassword((const char *)OTA_PASSWORD);
      ArduinoOTA.begin();
      
      timer.setInterval(1000L * 60 * 15, sendInternals); //  Here you set interval and which function to call
    }
    
    void presentation() {
    	sendSketchInfo(APPLICATION_NAME, APPLICATION_VERSION);
      present(SEN_INTERNAL, S_CUSTOM, "Internal:rssi");
      request(SEN_INTERNAL, V_VAR1);
      sendInternals();
    }
    
    void receive(const MyMessage &message) {
      //Do not process messages from other nodes
      if(message.sender != GATEWAY_ADDRESS){
        return;
      }
    }
    
    
    void sendInternals(){
      MyMessage _internal(SEN_INTERNAL, V_VAR5);
      char _msg[26];
      //rssiQuality
      snprintf_P(_msg, 25, "p:rssiAsQty=%d", getRSSIasQuality(WiFi.RSSI()));
      send(_internal.set(_msg));
    
      //ip
      snprintf_P(_msg, 25, "p:ip=%s", WiFi.localIP().toString().c_str());
      send(_internal.set(_msg));
      
      //Free Heap
      snprintf_P(_msg, 25, "p:heap-f=%d", ESP.getFreeHeap());
      send(_internal.set(_msg));
      
      //HostName
      snprintf_P(_msg, 25, "p:host=%s", WiFi.hostname().c_str());
      send(_internal.set(_msg));
    
      //rssi
      snprintf_P(_msg, 25, "rssi:%d dBm", WiFi.RSSI());
      send(_internal.set(_msg));
    
      //RFM95-rssi
      snprintf_P(_msg, 25, "RFM95-rssi:%d dBm", transportGetReceivingRSSI());
      send(_internal.set(_msg));
    
      _internal.setType(V_VAR1);
      send(_internal.set(getRSSIasQuality(WiFi.RSSI())));
    }
    
    int getRSSIasQuality(int RSSI) {
      int quality = 0;
      if (RSSI <= -100) {
        quality = 0;
      } else if (RSSI >= -50) {
        quality = 100;
      } else {
        quality = 2 * (RSSI + 100);
      }
      return quality;
    }
    
    void loop() {
      ArduinoOTA.handle();
      timer.run(); // SimpleTimer is working
    }
    

    Node source code(Promini + RFM95):

    #define SKETCH_NAME "Signal Monitor"                // Change to a fancy name you like
    #define SKETCH_VERSION "1.0"                    // Your version
    
    
    // Enable and select radio type attached
    #define   MY_RADIO_RFM95
    
    #define   MY_DEBUG_VERBOSE_RFM95
    //#define   MY_DEBUG_VERBOSE_RFM95_REGISTERS
    //#define MY_RFM95_ATC_TARGET_RSSI (-70)  // target RSSI -70dBm
    #define   MY_RFM95_MAX_POWER_LEVEL_DBM (20)   // max. TX power 10dBm = 10mW
    #define   MY_RFM95_FREQUENCY (RFM95_868MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    
    
    // Enable repeater functionality for this node
    #define MY_REPEATER_FEATURE
    
    #define MY_DEBUG
    
    //This Node ID
    #define NODE_ID (int8_t) AUTO
    
    #include <MySensors.h>
    #include <SimpleTimer.h>
    SimpleTimer timer; // Create a Timer object called "timer"! 
    
    int Send_rssi, Rec_rssi;                     // RSSI RFM95 chip
    #define CHILD_ID_RSSI_HIGH  7                // RSSI received signal level
    #define CHILD_ID_RSSI_LOW   8                // RSSI background noise level
    MyMessage msgRSSI1(CHILD_ID_RSSI_HIGH, V_LEVEL);
    MyMessage msgRSSI2(CHILD_ID_RSSI_LOW, V_LEVEL);
    
    //Sensor
    #define SEN_DUMMY    (uint8_t) 1
    
    //Pin number
    #define PIN_TEST    (uint8_t) A1
    
    
    MyMessage msg(SEN_DUMMY, V_STATUS);
    
    void setup() {
        pinMode(PIN_TEST, OUTPUT);
        timer.setInterval(1000L * 5, sendInternals); //  Here you set interval and which function to call
    }
    
    void sendInternals(){
      Send_rssi = transportGetSendingRSSI();  // read RSSI in RFM95. Measure reception signal from gw
      send(msgRSSI1.set(Send_rssi));          // send RSSI level
      wait(1000);                             // wait to get idle
    
      Rec_rssi = transportGetReceivingRSSI(); // read RSSI in RFM95. Wait and measure background noise
      send(msgRSSI2.set(Rec_rssi));           // send RSSI level
      wait(1000);                             // wait for next send
    }
    
    
    void presentation() {
      // Send the Sketch Version Information to the Gateway
      sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      
      present(SEN_DUMMY, S_BINARY);
      request(SEN_DUMMY, V_STATUS);
    
      present(CHILD_ID_RSSI_HIGH, S_SOUND, "Tx-dBm");
      present(CHILD_ID_RSSI_LOW, S_SOUND, "Rx-dBm");
     
    }
    
    
    void loop() {
        timer.run(); // SimpleTimer is working
    }
    
    void receive(const MyMessage &message) {
        if (message.sensor == SEN_DUMMY && message.type == V_STATUS) {
            Serial.print("*** SWITCH: ");Serial.println(message.getInt());
            digitalWrite(PIN_TEST, message.getBool() ? HIGH : LOW);
        }
    }
    

  • Mod

    @jkandasa the default timeouts will not work with the slower LoRa modes. MySensors will timeout before the signal has been sent completely.

    My guess is this is the reason it doesn't work with 4096.


  • Plugin Developer

    @mfalkvidd Thank you! I tried with #define MY_TRANSPORT_STATE_TIMEOUT_MS (20*1000ul) and #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096, Now it is working 50% pass and 50% failed. I do not know how to make it 100% perfect.

    Node log messages:

     
     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-rc.2
    
    17 MCO:BGN:INIT REPEATER,CP=RLNRA---,VER=2.2.0-rc.2
    26 TSM:INIT
    28 TSF:WUR:MS=0
    29 RFM95:INIT
    30 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    44 RFM95:PTX:LEVEL=13
    46 TSM:INIT:TSP OK
    48 TSF:SID:OK,ID=1
    50 TSM:FPAR
    51 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    1565 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    3462 RFM95:SAC:SEND ACK,TO=0,SEQ=2,RSSI=-30,SNR=9
    3527 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    3532 TSF:MSG:FPAR OK,ID=0,D=1
    6810 RFM95:SAC:SEND ACK,TO=0,SEQ=2,RSSI=-30,SNR=10
    6876 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    21572 TSM:FPAR:OK
    21573 TSM:ID
    21575 TSM:ID:OK
    21576 TSM:UPL
    21577 RFM95:SWR:SEND,TO=0,SEQ=3,RETRY=0
    23592 !RFM95:SWR:NACK
    23631 RFM95:SWR:SEND,TO=0,SEQ=4,RETRY=1
    24195 !RFM95:SWR:NACK
    24201 RFM95:SWR:SEND,TO=0,SEQ=4,RETRY=2
    24764 !RFM95:SWR:NACK
    24830 RFM95:SWR:SEND,TO=0,SEQ=4,RETRY=3
    25394 !RFM95:SWR:NACK
    25432 RFM95:SWR:SEND,TO=0,SEQ=4,RETRY=4
    25995 !RFM95:SWR:NACK
    26001 RFM95:SWR:SEND,TO=0,SEQ=4,RETRY=5
    28014 !RFM95:SWR:NACK
    28112 RFM95:PTX:LEVEL=14
    28114 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    29158 RFM95:SAC:SEND ACK,TO=0,SEQ=4,RSSI=-31,SNR=10
    29223 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    29229 TSF:MSG:PONG RECV,HP=1
    29232 TSM:UPL:OK
    29233 TSM:READY:ID=1,PAR=0,DIS=1
    29236 RFM95:SWR:SEND,TO=0,SEQ=5,RETRY=0
    32423 !RFM95:SWR:NACK
    32457 RFM95:SWR:SEND,TO=0,SEQ=6,RETRY=1
    33021 !RFM95:SWR:NACK
    33024 RFM95:SWR:SEND,TO=0,SEQ=6,RETRY=2
    33587 !RFM95:SWR:NACK
    33625 RFM95:SWR:SEND,TO=0,SEQ=6,RETRY=3
    35639 !RFM95:SWR:NACK
    35705 RFM95:SWR:SEND,TO=0,SEQ=6,RETRY=4
    36269 !RFM95:SWR:NACK
    36303 RFM95:SWR:SEND,TO=0,SEQ=6,RETRY=5
    36867 !RFM95:SWR:NACK
    36873 RFM95:PTX:LEVEL=15
    36875 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    38870 RFM95:SAC:SEND ACK,TO=0,SEQ=6,RSSI=-30,SNR=9
    38935 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    38940 RFM95:SWR:SEND,TO=0,SEQ=7,RETRY=0
    42658 !RFM95:SWR:NACK
    42696 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    45234 !RFM95:SWR:NACK
    45272 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    45835 !RFM95:SWR:NACK
    45841 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    46404 !RFM95:SWR:NACK
    46470 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    49007 !RFM95:SWR:NACK
    49105 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    49669 !RFM95:SWR:NACK
    49671 RFM95:PTX:LEVEL=16
    49673 !TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=18,pt=0,l=10,sg=0,ft=1,st=NACK:2.2.0-rc.2
    49680 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    50244 !RFM95:SWR:NACK
    50310 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    52323 !RFM95:SWR:NACK
    52425 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    52989 !RFM95:SWR:NACK
    52992 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    53555 !RFM95:SWR:NACK
    53593 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    54156 !RFM95:SWR:NACK
    54158 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    54721 !RFM95:SWR:NACK
    54791 RFM95:PTX:LEVEL=17
    54793 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=NACK:0
    56799 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    57362 !RFM95:SWR:NACK
    57368 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    60168 !RFM95:SWR:NACK
    60174 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    62974 !RFM95:SWR:NACK
    62977 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    63540 !RFM95:SWR:NACK
    63606 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    64171 !RFM95:SWR:NACK
    64209 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    67009 !RFM95:SWR:NACK
    67079 RFM95:PTX:LEVEL=18
    67081 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=14,sg=0,ft=3,st=NACK:Signal Monitor
    67089 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    67652 !RFM95:SWR:NACK
    67718 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    68281 !RFM95:SWR:NACK
    68352 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    70627 !RFM95:SWR:NACK
    70729 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    71293 !RFM95:SWR:NACK
    71296 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    71859 !RFM95:SWR:NACK
    71897 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    74172 !RFM95:SWR:NACK
    74238 RFM95:PTX:LEVEL=19
    74241 !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
    74247 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    74811 !RFM95:SWR:NACK
    74881 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    75444 !RFM95:SWR:NACK
    75510 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    77524 !RFM95:SWR:NACK
    77623 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    78186 !RFM95:SWR:NACK
    78288 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    78852 !RFM95:SWR:NACK
    78854 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    80868 !RFM95:SWR:NACK
    80966 RFM95:PTX:LEVEL=20
    80968 !TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=5,st=NACK:
    80974 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    81539 !RFM95:SWR:NACK
    81545 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    82108 !RFM95:SWR:NACK
    82174 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    84188 !RFM95:SWR:NACK
    84286 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    84849 !RFM95:SWR:NACK
    84951 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    85514 !RFM95:SWR:NACK
    85520 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    86083 !RFM95:SWR:NACK
    86153 !TSF:MSG:SEND,1-1-0-0,s=1,c=2,t=2,pt=0,l=0,sg=0,ft=6,st=NACK:
    86159 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    86723 !RFM95:SWR:NACK
    86793 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    89068 !RFM95:SWR:NACK
    89166 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    89730 !RFM95:SWR:NACK
    89736 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    90299 !RFM95:SWR:NACK
    90369 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    92644 !RFM95:SWR:NACK
    92742 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    95019 !RFM95:SWR:NACK
    95057 !TSF:MSG:SEND,1-1-0-0,s=7,c=0,t=33,pt=0,l=6,sg=0,ft=7,st=NACK:Tx-dBm
    95064 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    95628 !RFM95:SWR:NACK
    95630 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    96193 !RFM95:SWR:NACK
    96263 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    98538 !RFM95:SWR:NACK
    98640 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    99204 !RFM95:SWR:NACK
    99206 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    99769 !RFM95:SWR:NACK
    99840 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    102115 !RFM95:SWR:NACK
    102217 !TSF:MSG:SEND,1-1-0-0,s=8,c=0,t=33,pt=0,l=6,sg=0,ft=8,st=NACK:Rx-dBm
    102223 MCO:REG:REQ
    102225 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    102790 !RFM95:SWR:NACK
    102792 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    103356 !RFM95:SWR:NACK
    103422 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    105437 !RFM95:SWR:NACK
    105535 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    106100 !RFM95:SWR:NACK
    106102 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    106667 !RFM95:SWR:NACK
    106705 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    107270 !RFM95:SWR:NACK
    107272 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=9,st=NACK:2
    109278 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=0
    109842 !RFM95:SWR:NACK
    109848 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=1
    111863 !RFM95:SWR:NACK
    111865 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=2
    112430 !RFM95:SWR:NACK
    112464 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=3
    113029 !RFM95:SWR:NACK
    113031 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=4
    113595 !RFM95:SWR:NACK
    113665 RFM95:SWR:SEND,TO=0,SEQ=8,RETRY=5
    115679 !RFM95:SWR:NACK
    115777 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=10,st=NACK:2
    115783 !TSM:READY:UPL FAIL,SNP
    115786 TSM:FPAR
    115788 RFM95:SWR:SEND,TO=255,SEQ=8,RETRY=0
    115853 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=11,st=OK:
    117783 !TSF:SND:TNR
    117999 RFM95:SAC:SEND ACK,TO=0,SEQ=25,RSSI=-35,SNR=10
    118065 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    118070 MCO:PIM:NODE REG=1
    121344 RFM95:SAC:SEND ACK,TO=0,SEQ=25,RSSI=-37,SNR=9
    121409 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    121414 MCO:PIM:NODE REG=1
    138073 !TSM:FPAR:NO REPLY
    138075 TSM:FPAR
    138077 RFM95:SWR:SEND,TO=255,SEQ=10,RETRY=0
    139591 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    141298 RFM95:SAC:SEND ACK,TO=0,SEQ=26,RSSI=-39,SNR=10
    141364 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    141369 TSF:MSG:FPAR OK,ID=0,D=1
    144643 RFM95:SAC:SEND ACK,TO=0,SEQ=26,RSSI=-39,SNR=12
    144709 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    159598 TSM:FPAR:OK
    159599 TSM:ID
    159601 TSM:ID:OK
    159602 TSM:UPL
    159604 RFM95:SWR:SEND,TO=0,SEQ=13,RETRY=0
    161619 !RFM95:SWR:NACK
    161690 RFM95:SWR:SEND,TO=0,SEQ=14,RETRY=1
    162255 !RFM95:SWR:NACK
    162321 RFM95:SWR:SEND,TO=0,SEQ=14,RETRY=2
    162885 !RFM95:SWR:NACK
    162951 RFM95:SWR:SEND,TO=0,SEQ=14,RETRY=3
    163515 !RFM95:SWR:NACK
    163585 RFM95:SWR:SEND,TO=0,SEQ=14,RETRY=4
    164149 !RFM95:SWR:NACK
    164215 RFM95:SWR:SEND,TO=0,SEQ=14,RETRY=5
    166230 !RFM95:SWR:NACK
    166328 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    167288 RFM95:SAC:SEND ACK,TO=0,SEQ=28,RSSI=-35,SNR=9
    167354 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    167359 TSF:MSG:PONG RECV,HP=1
    167362 TSM:UPL:OK
    167364 TSM:READY:ID=1,PAR=0,DIS=1
    167367 MCO:BGN:STP
    167369 MCO:BGN:INIT OK,TSP=1
    182369 RFM95:SWR:SEND,TO=0,SEQ=15,RETRY=0
    184383 !RFM95:SWR:NACK
    184449 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=1
    185013 !RFM95:SWR:NACK
    185079 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=2
    185644 !RFM95:SWR:NACK
    185678 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=3
    187693 !RFM95:SWR:NACK
    187727 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=4
    188292 !RFM95:SWR:NACK
    188294 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=5
    188858 !RFM95:SWR:NACK
    188928 !TSF:MSG:SEND,1-1-0-0,s=7,c=1,t=37,pt=2,l=2,sg=0,ft=0,st=NACK:-256
    189934 RFM95:SWR:SEND,TO=0,SEQ=16,RETRY=0
    191949 !RFM95:SWR:NACK
    192015 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=1
    192579 !RFM95:SWR:NACK
    192649 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=2
    193213 !RFM95:SWR:NACK
    193280 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=3
    195294 !RFM95:SWR:NACK
    195392 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=4
    195957 !RFM95:SWR:NACK
    195959 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=5
    196524 !RFM95:SWR:NACK
    196558 !TSF:MSG:SEND,1-1-0-0,s=8,c=1,t=37,pt=2,l=2,sg=0,ft=1,st=NACK:-35
    197564 RFM95:SWR:SEND,TO=0,SEQ=17,RETRY=0
    199578 !RFM95:SWR:NACK
    199616 RFM95:SWR:SEND,TO=0,SEQ=18,RETRY=1
    200181 !RFM95:SWR:NACK
    200183 RFM95:SWR:SEND,TO=0,SEQ=18,RETRY=2
    200748 !RFM95:SWR:NACK
    200782 RFM95:SWR:SEND,TO=0,SEQ=18,RETRY=3
    

    Gateway Log messages:

    75051 TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    75056 TSF:MSG:BC
    75058 TSF:MSG:FPAR REQ,ID=1
    75060 TSF:PNG:SEND,TO=0
    75062 TSF:CKU:OK
    75064 TSF:MSG:GWL OK
    75379 RFM95:SWR:SEND,TO=1,SEQ=1,RETRY=0
    77393 !RFM95:SWR:NACK
    77462 RFM95:SWR:SEND,TO=1,SEQ=2,RETRY=1
    78026 !RFM95:SWR:NACK
    78095 RFM95:SWR:SEND,TO=1,SEQ=2,RETRY=2
    78659 !RFM95:SWR:NACK
    78728 RFM95:SWR:SEND,TO=1,SEQ=2,RETRY=3
    80742 !RFM95:SWR:NACK
    80839 RFM95:SWR:SEND,TO=1,SEQ=2,RETRY=4
    81403 !RFM95:SWR:NACK
    81408 RFM95:SWR:SEND,TO=1,SEQ=2,RETRY=5
    81972 !RFM95:SWR:NACK
    82037 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    96582 RFM95:SAC:SEND ACK,TO=1,SEQ=4,RSSI=-29,SNR=9
    96648 TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    96653 TSF:MSG:PINGED,ID=1,HP=1
    96660 RFM95:SWR:SEND,TO=1,SEQ=3,RETRY=0
    99847 !RFM95:SWR:NACK
    99848 RFM95:SWR:SEND,TO=1,SEQ=4,RETRY=1
    100413 !RFM95:SWR:NACK
    100478 RFM95:SWR:SEND,TO=1,SEQ=4,RETRY=2
    101042 !RFM95:SWR:NACK
    101079 RFM95:SWR:SEND,TO=1,SEQ=4,RETRY=3
    103093 !RFM95:SWR:NACK
    103158 RFM95:SWR:SEND,TO=1,SEQ=4,RETRY=4
    103722 !RFM95:SWR:NACK
    103759 RFM95:SWR:SEND,TO=1,SEQ=4,RETRY=5
    104323 !RFM95:SWR:NACK
    104328 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    105414 RFM95:SAC:SEND ACK,TO=1,SEQ=6,RSSI=-28,SNR=9
    105479 TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    105485 RFM95:SWR:SEND,TO=1,SEQ=5,RETRY=0
    108679 !RFM95:SWR:NACK
    108680 RFM95:SWR:SEND,TO=1,SEQ=6,RETRY=1
    110695 !RFM95:SWR:NACK
    110792 RFM95:SWR:SEND,TO=1,SEQ=6,RETRY=2
    112806 !RFM95:SWR:NACK
    112839 RFM95:SWR:SEND,TO=1,SEQ=6,RETRY=3
    113403 !RFM95:SWR:NACK
    113408 RFM95:SWR:SEND,TO=1,SEQ=6,RETRY=4
    113972 !RFM95:SWR:NACK
    114037 RFM95:SWR:SEND,TO=1,SEQ=6,RETRY=5
    114601 !RFM95:SWR:NACK
    114638 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    118228 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-27,SNR=10
    118293 TSF:MSG:READ,1-1-0,s=255,c=0,t=18,pt=0,l=10,sg=0:2.2.0-rc.2
    118299 Sending message on topic: out_rfm95/1/255/0/0/18
    122002 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-27,SNR=11
    122067 TSF:MSG:READ,1-1-0,s=255,c=0,t=18,pt=0,l=10,sg=0:2.2.0-rc.2
    122073 Sending message on topic: out_rfm95/1/255/0/0/18
    125318 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-28,SNR=10
    125384 TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    125389 Sending message on topic: out_rfm95/1/255/3/0/6
    125884 Message arrived on topic: in_rfm95/1/255/3/0/6
    125889 RFM95:SWR:SEND,TO=1,SEQ=9,RETRY=0
    128845 !RFM95:SWR:NACK
    128910 RFM95:SWR:SEND,TO=1,SEQ=10,RETRY=1
    131187 !RFM95:SWR:NACK
    131288 RFM95:SWR:SEND,TO=1,SEQ=10,RETRY=2
    131852 !RFM95:SWR:NACK
    131853 RFM95:SWR:SEND,TO=1,SEQ=10,RETRY=3
    132418 !RFM95:SWR:NACK
    132487 RFM95:SWR:SEND,TO=1,SEQ=10,RETRY=4
    133051 !RFM95:SWR:NACK
    133120 RFM95:SWR:SEND,TO=1,SEQ=10,RETRY=5
    133684 !RFM95:SWR:NACK
    133749 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=6,pt=0,l=6,sg=0,ft=0,st=NACK:Metric
    135970 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-26,SNR=11
    136036 TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=14,sg=0:Signal Monitor
    136042 Sending message on topic: out_rfm95/1/255/3/0/11
    140007 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-26,SNR=12
    140072 TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=14,sg=0:Signal Monitor
    140078 Sending message on topic: out_rfm95/1/255/3/0/11
    143625 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-25,SNR=11
    143690 TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    143696 Sending message on topic: out_rfm95/1/255/3/0/12
    147170 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-25,SNR=11
    147236 TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    147241 Sending message on topic: out_rfm95/1/255/3/0/12
    150523 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-26,SNR=9
    150588 TSF:MSG:READ,1-1-0,s=1,c=0,t=3,pt=0,l=0,sg=0:
    150593 Sending message on topic: out_rfm95/1/1/0/0/3
    153867 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-26,SNR=9
    153932 TSF:MSG:READ,1-1-0,s=1,c=0,t=3,pt=0,l=0,sg=0:
    153937 Sending message on topic: out_rfm95/1/1/0/0/3
    157188 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-25,SNR=10
    157254 TSF:MSG:READ,1-1-0,s=1,c=2,t=2,pt=0,l=0,sg=0:
    157258 Sending message on topic: out_rfm95/1/1/2/0/2
    157627 Message arrived on topic: in_rfm95/1/1/1/0/2
    157632 RFM95:SWR:SEND,TO=1,SEQ=17,RETRY=0
    160453 !RFM95:SWR:NACK
    160518 RFM95:SWR:SEND,TO=1,SEQ=18,RETRY=1
    161082 !RFM95:SWR:NACK
    161151 RFM95:SWR:SEND,TO=1,SEQ=18,RETRY=2
    161715 !RFM95:SWR:NACK
    161752 RFM95:SWR:SEND,TO=1,SEQ=18,RETRY=3
    162316 !RFM95:SWR:NACK
    162317 RFM95:SWR:SEND,TO=1,SEQ=18,RETRY=4
    164333 !RFM95:SWR:NACK
    164430 RFM95:SWR:SEND,TO=1,SEQ=18,RETRY=5
    164994 !RFM95:SWR:NACK
    164999 !TSF:MSG:SEND,0-0-1-1,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=NACK:0
    168020 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-25,SNR=9
    168085 TSF:MSG:READ,1-1-0,s=7,c=0,t=33,pt=0,l=6,sg=0:Tx-dBm
    168090 Sending message on topic: out_rfm95/1/7/0/0/33
    171541 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-25,SNR=10
    171606 TSF:MSG:READ,1-1-0,s=8,c=0,t=33,pt=0,l=6,sg=0:Rx-dBm
    171612 Sending message on topic: out_rfm95/1/8/0/0/33
    175118 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-30,SNR=11
    175184 TSF:MSG:READ,1-1-0,s=8,c=0,t=33,pt=0,l=6,sg=0:Rx-dBm
    175189 Sending message on topic: out_rfm95/1/8/0/0/33
    178439 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-34,SNR=9
    178505 TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    178515 RFM95:SWR:SEND,TO=1,SEQ=22,RETRY=0
    181704 !RFM95:SWR:NACK
    181773 RFM95:SWR:SEND,TO=1,SEQ=23,RETRY=1
    183787 !RFM95:SWR:NACK
    183888 RFM95:SWR:SEND,TO=1,SEQ=23,RETRY=2
    184452 !RFM95:SWR:NACK
    184453 RFM95:SWR:SEND,TO=1,SEQ=23,RETRY=3
    185018 !RFM95:SWR:NACK
    185087 RFM95:SWR:SEND,TO=1,SEQ=23,RETRY=4
    187101 !RFM95:SWR:NACK
    187198 RFM95:SWR:SEND,TO=1,SEQ=23,RETRY=5
    187762 !RFM95:SWR:NACK
    187863 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=NACK:1
    188683 RFM95:SAC:SEND ACK,TO=1,SEQ=8,RSSI=-29,SNR=9
    188749 TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    188759 RFM95:SWR:SEND,TO=1,SEQ=24,RETRY=0
    191948 !RFM95:SWR:NACK
    192013 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=1
    192577 !RFM95:SWR:NACK
    192646 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=2
    193210 !RFM95:SWR:NACK
    193279 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=3
    195293 !RFM95:SWR:NACK
    195390 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=4
    195954 !RFM95:SWR:NACK
    196055 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=5
    196619 !RFM95:SWR:NACK
    196624 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=NACK:1
    213099 TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    213104 TSF:MSG:BC
    213106 TSF:MSG:FPAR REQ,ID=1
    213108 TSF:PNG:SEND,TO=0
    213111 TSF:CKU:OK
    213112 TSF:MSG:GWL OK
    213236 RFM95:SWR:SEND,TO=1,SEQ=25,RETRY=0
    215251 !RFM95:SWR:NACK
    215320 RFM95:SWR:SEND,TO=1,SEQ=26,RETRY=1
    215884 !RFM95:SWR:NACK
    215949 RFM95:SWR:SEND,TO=1,SEQ=26,RETRY=2
    216513 !RFM95:SWR:NACK
    216582 RFM95:SWR:SEND,TO=1,SEQ=26,RETRY=3
    218597 !RFM95:SWR:NACK
    218694 RFM95:SWR:SEND,TO=1,SEQ=26,RETRY=4
    219258 !RFM95:SWR:NACK
    219263 RFM95:SWR:SEND,TO=1,SEQ=26,RETRY=5
    219827 !RFM95:SWR:NACK
    219864 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    234631 RFM95:SAC:SEND ACK,TO=1,SEQ=14,RSSI=-28,SNR=10
    234696 TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    234701 TSF:MSG:PINGED,ID=1,HP=1
    234709 RFM95:SWR:SEND,TO=1,SEQ=27,RETRY=0
    237896 !RFM95:SWR:NACK
    237965 RFM95:SWR:SEND,TO=1,SEQ=28,RETRY=1
    238529 !RFM95:SWR:NACK
    238598 RFM95:SWR:SEND,TO=1,SEQ=28,RETRY=2
    239162 !RFM95:SWR:NACK
    239231 RFM95:SWR:SEND,TO=1,SEQ=28,RETRY=3
    241245 !RFM95:SWR:NACK
    241342 RFM95:SWR:SEND,TO=1,SEQ=28,RETRY=4
    241906 !RFM95:SWR:NACK
    242007 RFM95:SWR:SEND,TO=1,SEQ=28,RETRY=5
    242571 !RFM95:SWR:NACK
    242576 !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    257398 RFM95:SAC:SEND ACK,TO=1,SEQ=16,RSSI=-29,SNR=10
    257464 TSF:MSG:READ,1-1-0,s=7,c=1,t=37,pt=2,l=2,sg=0:-256
    257469 Sending message on topic: out_rfm95/1/7/1/0/37
    260708 RFM95:SAC:SEND ACK,TO=1,SEQ=16,RSSI=-31,SNR=11
    260774 TSF:MSG:READ,1-1-0,s=7,c=1,t=37,pt=2,l=2,sg=0:-256
    260779 Sending message on topic: out_rfm95/1/7/1/0/37
    264965 RFM95:SAC:SEND ACK,TO=1,SEQ=17,RSSI=-33,SNR=10
    265031 TSF:MSG:READ,1-1-0,s=8,c=1,t=37,pt=2,l=2,sg=0:-35
    265036 Sending message on topic: out_rfm95/1/8/1/0/37
    

  • Mod

    @jkandasa try adding

    #define RFM95_RETRY_TIMEOUT_MS			(5000ul)			//!< Timeout for ACK, adjustments needed if modem configuration changed (air time different)
    

    found it here: https://forum.mysensors.org/topic/5681/rfm95w-modem_configruation/3

    Github: https://github.com/mysensors/MySensors/issues/742


  • Plugin Developer

    @mfalkvidd You are right! Seems these lines did the magic. Now I see 90% of success. But still, see few failures in starting when sending presentation message. I guess presentation message takes a long time than the normal message. As it is a bigger message. Let me find out the root cause.

    Thank you for your support!

    Configuration used at this stage,

    #define MY_RADIO_RFM95
    #define MY_TRANSPORT_STATE_TIMEOUT_MS  (3*1000ul)
    #define RFM95_RETRY_TIMEOUT_MS  (3000ul) 
    #define MY_RFM95_FREQUENCY  (RFM95_868MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION  RFM95_BW125CR48SF4096
    

  • Mod

    @jkandasa great! Hopefully we can add a documentation page summarizing what's needed for LoRa.

    https://www.thethingsnetwork.org/forum/t/spreadsheet-for-lora-airtime-calculation/1190 has a calculator for seeing how much time a message takes using different spreading factors.

    Seems like the longest allowed packet (51 bytes) on SF12 will need almost 2900ms. I don't know how acknowledgements are handled though.


  • Plugin Developer

    @ricorico94 here is the hardware connection details, that I followed.

    Gateway Sketch:

      ESP8266         RFM95
    -----------      ---------
    (GPIO15) CS    <--> NSS
    (GPIO13) MOSI  <--> MOSI
    (GPIO12) MISO  <--> MISO
    (GPIO14) CLK   <--> SCK
    (GPIO 5) IRQ   <--> DIO0
             GND   <--> GND
             3.3V  <--> +3.3V
    
    Add this line on ESP8266 sketch,
    #define   MY_RFM95_IRQ_PIN 5
    #define   MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define   MY_RFM95_CS_PIN 15
    

    Node Sketch:

      PRO-MINI       RFM95
    -----------     -------
    (10) SS    <--> NSS
    (11) MOSI  <--> MOSI
    (12) MISO  <--> MISO
    (13) CLK   <--> SCK
    (2)  IRQ   <--> DIO0
         GND   <--> GND
         3.3V  <--> +3.3V
    

  • Hero Member

    @jkandasa said in Any success story on LoRa(RFM95) module and MySensors?:

    Now I see 90% of success.

    Were you able to achieve 100%?


  • Plugin Developer

    @neverdie If I go with the default RFM95_BW125CR45SF128 settings I see the failure rarely. I ran the setup minimal time only. So do not know about stability.

    When I go with RFM95_BW31_25CR48SF512 or RFM95_BW125CR48SF4096, I see failure, when I request a payload from the gateway, because of gateway busy asking data from the controller, meantime node thinks message not received by the gateway and send a message once again, same time gateway sends ack to the node. Air/RF collision happens here, both side message not delivered.


  • Mod

    @jkandasa thanks for verifying the wiring. I compared with the instructions we had for RFM69 and the wiring is identical, so I just changed the headline on connecting the radio from RFM69 to RFM69/95 and added your defines. The same wiring probably works with 96, 97 and 98 as well but I am not sure so I have not added them.



  • Hello,

    I tried to build a Mysensors gateway based on LORA using the ideas above. I used a RA-O2 SX1278 connected with a wemos D1 mini as a LAN gateway and connected with a pro mini as a sensor.
    (the radio module I used is:
    aliexpress SX1278 RA-02
    As antennas, I used 2 like this:
    link to antenna
    and I also tried replacing the gateway antenna by this one:
    link to high gain antenna

    As wiring, I used the one from jkandasa above and I used the following settings:

    #define MY_DEBUG
    #define MY_BAUD_RATE 115200 // or 9600 ?
    #define   MY_RADIO_RFM95
    #define   MY_DEBUG_VERBOSE_RFM95
    #define   MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    #define   MY_RFM95_IRQ_PIN 5
    #define   MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define   MY_RFM95_CS_PIN 15
    #define MY_GATEWAY_ESP8266 
    

    and I used the default gateway sketch from website (I did not use the OTA version which I'm not familiar with).

    For the node, I used these settings:

    #define   MY_RADIO_RFM95
    #define   MY_DEBUG_VERBOSE_RFM95
    #define   MY_RFM95_MAX_POWER_LEVEL_DBM (20)   // max. TX power 10dBm = 10mW
    #define   MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
    #define MY_DEBUG
    
    #define NODE_ID (int8_t) AUTO
    #include <MySensors.h>
    
    int Send_rssi, Rec_rssi;                     // RSSI RFM95 chip
    #define CHILD_ID_RSSI_HIGH  7                // RSSI received signal level
    #define CHILD_ID_RSSI_LOW   8                // RSSI background noise level
    #define CHILD_ID_BATTERY 1
    MyMessage msgRSSI1(CHILD_ID_RSSI_HIGH, V_LEVEL);
    MyMessage msgRSSI2(CHILD_ID_RSSI_LOW, V_LEVEL);
    MyMessage voltage_msg(CHILD_ID_BATTERY, V_VOLTAGE);
    

    and I used a basic node sketch in which I send a simple counter and also send an indicator copied from sketches in above posts but which I don't fully understand..:

    Send_rssi = transportGetSendingRSSI();  // read RSSI in RFM95. Measure reception signal from gw
    

    In practice, the value sent for send_RSSI is about (-21) when antennas are in direct sight at approx 20-30cm distance. I tried to move the node to the lower floor (ie one concrete floor between gateway and node in a building) and it says -38 or -44. I tried to go to basement (10 floors below) and I receive nothing.. whereas that was my main motivation for trying long range LORA radio...
    I had selected the 433MHz version as I though the lower frequency would go further through walls than the 868MHz.

    So I have a few questions..

    1. are these -21 or -40 values common values? is it normal to have -21 even at a few cm distance ?
    2. do you think the antennas I used are best otions to try going far away through several fllors of concrete ?
    3. in terms of wiring, I simply connected the wemos D1 mini and the pro mini to the RA-02 without any capacitor. Is it like NRF24 where adding some capacitors could help ?
    4. in terms of settings, I did not try yet all the settings mentioned in previous posts. I'll try the modem config with slow setting, but I'm not sure about the other settings: I guess I would need maximum power, maximum sensitivity, etc. Maybe also using the timeout setting used by jkandasa. What could you advise me ?
    5. do you think I'd have better result with a LORA of another frequency ?

    In case it matters: I don't plan sending a lot of data through the sensor. Target would be to use it to detect opening of a door

    Thanks a lot for your help,
    Ricorico94


  • Mod

    @ricorico94 high gain antennas have high gain because they are focused. They usually have a blind spot above and below the antenna. If your basement is right below the gateway (which is where basements usually are located) the node will send strongest horizontally (because of the focused antenna) which means very litte rado energy will go towards the gateway. Also, the gateway will be much less sensitive in the direction the node is sending from.

    -21 to -40 are very strong signals.

    The antennas might be right if you mount them horizontally, but definitely not if they are mounted vertically, if your goal is to reach the basement.

    The rfm modules are usually much less sensitive to power fluctuations than nrf24, but adding a capacitor might help if your power supply is noisy or too weak.

    I would advice looking at the logs from the gateway and the node. Using SF12 for maximum range could work as well, but you'd need to adjust the timeouts.

    169MHz should be better (if it is allowed in your country) because it passes through obstacles better. 868 might be better because it bounces more than 433 - in case bouncing off a nearby building is better than traversing 10 floors.


  • Hardware Contributor

    Others ideas to check, in case:

    • rf matching quality of antennas you bought, especially when it's cheap.. (could be checked with a swr meter).
    • available gnd/ground on pcb has a direct impact on antenna gain etc. impact is even worse with lower freq.
      e.g. says, a 868Mhz antenna reach -3dB gain with a gnd area of 1100mm² (worse gain with less gnd, not linear effect..and vice versa). At 433Mhz, for same -3dB gain goal, gnd area would need to be 4400mm²..
      So depending on the device assembly, it's easy to waste gain of antenna. and the more power you use to offset this, the more battery will be eaten 😉

    These are just additional ideas in air (still important, and good to know points too). What said mfalkvidd might help you (orientation and bitrate)


  • Hero Member

    I've used RA-01 modules, and they work very well.



  • THanks a lot for your explanations. I should have thought about that indeed..
    I tried to play with antenna positonning to see impact on RSSI, but it was not obvious (a few dB maybe). Maybe it was because I made the test at very close distance (30 cms.. between antennas) and so strength is too high to get meaningfull readings.

    Do you know until which RSSI level, we can have reliable communication ? -80? -120 ?..

    Regarding the lower frequency band mentioned by mfalkvidd, does it exist in RFM95 compatible devices ?

    Ricorico94


  • Hardware Contributor

    @ricorico94
    I have no big xp with lora mode, but I think you can get decent comm even at -100-120dB

    afaik rfm95 is not for 169mhz. The rf ic on rfm95, which is sx1278 can handle 169mhz, but the radio module is already tuned for specific freq (not for 169mhz).
    Perhaps by using a rfm95 433mhz and hacking sw to 169mhz but then, rf would not be optimal (electronics not matched for this freq). So in that case 433mhz may work better than the hack.
    Hoperf have a 169mhz module, RFM98PW169
    https://www.tme.eu/fr/details/rfm98pw-169s2/modules-rf/hope-microelectronics/
    Just remember what I said in my previous post too, regarding power supply type, and your build assembly (gnd size), and antenna used.
    For example, for a batt powered device, the smaller the freq and pcb gnd size = lower gain antenna + degraded bandwidth. So you could think it like this:
    if you have a small board (and for 868mhz and 40x40mm gnd, you already loose gain, effciency), is it worth to use smaller freq??

    • I think if you want to get best range, for whatever freq, you need to consider this. you can even try by using bigger pcb ans see how it improves
    • and your antenna. Two options here: 1) you get a trusted brand antenna 2) you get a cheap antenna and you don't know if it's well tuned, and lot of cheap antennas are not well tuned (tunable using a swr meter)

    Below a good example of what I'm trying to explain, from silabs datasheet, notice the TX power and bitrate used for these results.. :
    0_1536409637664_2018-08-09_12-33-00.jpg
    Conclusion: when you use a small board/gnd and assembly, you will get less range. Period 🙂
    People would say, oki then I'm going to use 2.4ghz, as it can better fit small assembly. Yep, as you know 2.4ghz penetration is not great (can be half range after one concrete wall..there are excel sheets for calculating this).
    This can be a start for explaining why people can sometimes complain about zwave, zigbee range (with HA people are looking after smaller and smaller device..)


  • Mod

    High sensitivity: down to -148 dBm.

    From the datasheet. There probably needs to be some margin, but my experience with Sigfox shows that -130 is quite reliable. After that, packets start go missing. I would guess LoRa is similar.


Log in to reply
 

Suggested Topics

14
Online

11.4k
Users

11.1k
Topics

112.7k
Posts