E220 LoRa device: how to make 3 devices communicate together

Home Forums The libraries hosted on the site EByte LoRa e22 UART devices sx1262/sx1268 E220 LoRa device: how to make 3 devices communicate together

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #21185
      Guyome41
      Participant

        Hello, I bought 2 E220-900T30D modules and after two days I can’t just display a message! I use the tutorial on this page with the code from the library. When a module sends a message the led of the other arduino nano flashes
        As the two LEDs of the two modules flash together I imagine that a transmission is well done.
        but no message on the terminal! I just want to communicate 3 modules together and it looks way too complicated with your library! But I can’t find anything else…

        Ebyte LoRa E22 device for Arduino, esp32 or esp8266: specs and basic use – 1

        /*
         * LoRa E22
         * Write on serial to transfer a message to other device
         * http://mischianti.org
         *
         * E22        ----- Arduino UNO
         * M0         ----- GND
         * M1         ----- GND
         * TX         ----- PIN 2 (PullUP)
         * RX         ----- PIN 3 (PullUP & Voltage divider)
         * AUX        ----- Not connected
         * VCC        ----- 3.3v/5v
         * GND        ----- GND
         *
         */
        #include "Arduino.h"
        #include "LoRa_E22.h"
         
        LoRa_E22 e22ttl(3, 2); // Arduino RX --> e22 TX - Arduino TX --> e22 RX
         
        void setup() {
          Serial.begin(9600);
          delay(500);
         
          Serial.println("Hi, I'm going to send message!");
         
          // Startup all pins and UART
          e22ttl.begin();
        
         
          // Send message
          ResponseStatus rs = e22ttl.sendMessage("Hello, world?");
          // Check If there is some problem of successfully send
          Serial.println(rs.getResponseDescription());
        }
         
        void loop() {
            // If something available
          if (e22ttl.available()>1) {
              // read the String message
            ResponseContainer rc = e22ttl.receiveMessage();
            // Is something goes wrong print error
            if (rc.status.code!=1){
                rc.status.getResponseDescription();
            }else{
                // Print the data received
                Serial.println(rc.data);
            }
          }
          if (Serial.available()) {
              String input = Serial.readString();
              e22ttl.sendMessage(input);
          }
        }
        

        TERMINAL MESSAGE :
        18:11:56.347 -> Hi, I’m going to send message!
        18:11:56.648 -> Success
        18:12:36.746 -> Hi, I’m going to send message!
        18:12:37.047 -> Success
        18:12:58.972 -> Hi, I’m going to send message!
        18:12:59.273 -> Success

        The code without your library on the first tutorial is very understandable but does not display any message either. Can I use this module without your library and thus modify and read the parameters: power, speed, channel, frequency with simply UART commands?

      • #21190
        Renzo Mischianti
        Keymaster

          Hi Guyome,
          the code is correct, if you don’t receive the messages probably It’s a wiring problem or a configuration problem.

          Connect the AUX pin also, to have the feedback.

          And yes you can do all without my library directly with UART commands.

          Bye Renzo

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.
      Exit mobile version