Lora E22 stops sending after some time

Home Forums The libraries hosted on the site EByte LoRa e22 UART devices sx1262/sx1268 Lora E22 stops sending after some time

Tagged: ,

Viewing 4 reply threads
  • Author
    Posts
    • #20991
      Lucas0411
      Participant

        Hello, I have been testing communication between two LoRa e22 devices, using “LoRa_E22.h” library, and I have noticed that after a certain number of packets the sender module stops working. I have tried all kinds of software solution, but nothing seems to work, not even reset the arduino makes it send again. The only thing that works is to disconnect and connect the 5v on the LoRa module (hard reset). I found interesting the fact that when I’m sending a packet with 15 characters the module works for 42 times (fixed transmission), but if I send a packet with 7 characters, the module works for 80 times. Which makes me think that the problem starts to occur when the buffer gets full (1000 bytes). I wonder though, wasn’t the module supposed to clean its buffer after a packet is sent? Is there a alternative way to clean the buffer without having to hard reset the LoRa?
        The codes are extremely simple, just a standard fixed communication, just like in the examples.

      • #20993
        Renzo Mischianti
        Keymaster

          Hi Lucas,
          It’s very strange, can you attach your code.
          It seems a memory leak.
          Bye Renzo

        • #21054
          Lucas0411
          Participant

            Hi Renzo, thanks for your reply.

            This is the receiver code:

            
            #include "LoRa_E22.h"
            
            LoRa_E22 e22ttl(&Serial2, 13, 2, 4);
            int count = 0;
            void setup() {
            	Serial.begin(9600);
            	e22ttl.begin();
            	Serial.println("Rx Iniciado");
            	delay(300);
            }
            
            void loop() {
            	if (e22ttl.available() > 1) {
            		ResponseContainer rs = e22ttl.receiveMessage();
            		String message = rs.data;
            
            		Serial.println(rs.status.getResponseDescription());
            		Serial.println(message);
            		count++;
            		Serial.print("Count: ");
            		Serial.println(count);
            	}
            }
            

            And this is the sender one:

            
            #include "LoRa_E22.h"
            
            LoRa_E22 e22ttl(6, 5, 3, A4, 10, 9600);
            
            void setup() {
            	Serial.begin(9600);
            	e22ttl.begin();
            	delay(300);
            }
            
            void loop() {
            //delay(1000);
            	for (int i = 0; i < 1; i++) {
            		ResponseStatus
            		rs = e22ttl.sendFixedMessage(15, 11, 65, "&4;70.15;15;15@");
            		Serial.println(rs.getResponseDescription());
            		delay(2000);
            	}
            }
            
            

            I have also attached a image containing the configuration used on both LoRas. I will now try to change all the hardware used, to see if that makes any difference.

          • #21058
            Renzo Mischianti
            Keymaster

              I must do some tests, which kind of microcontroller do you use?

              • #21060
                Lucas0411
                Participant

                  I used Esp32 for the receiver and an Arduino Uno (imbedded) for the sender. I tried changing the LoRa/Arduino but it doesn’t seem to do much. There’s something else I would like to ask you, which is about the RSSI Ambient noise. I didn’t find any examples regarding that. Do you have any idea how can I retrieve this information? Is it just like the packet RSSI, or there’s a special way to get this one? Thanks in advance.

              • #21097
                Renzo Mischianti
                Keymaster

                  Hi Lucas,
                  When enabled send the current ambient noise RSSI;
                  When disabled send the RSSI when the data was received last
                  time.

                  When I have some time I’m going also to do the test you proposed.

                  Bye Renzo

              Viewing 4 reply threads
              • You must be logged in to reply to this topic.
              Exit mobile version