Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: LoRa E220 and sending data with security #24860
    George
    Participant

      Hi Renzo

      I had a similar problem and I think I found the source of the bug.
      The bug occurs when using a String type variable for the message. The Sender does not send the last character of the String.
      Ex: When sending “101”, the Sender sends “10”, that is, it does not send the last character.
      Ex:

      static int msg = 100;
      msg++;
      String msg_sent = String(msg);
      Serial.print("Sent Message: ");
      Serial.println(msg_sent);
      ResponseStatus rs = e220ttl.sendMessage(sent_msg);

      I think the bug is on line 831:
      https://github.com/xreef/EByte_LoRa_E220_Series_Library/blob/7acecaede468559df9a2e8ccf7367059748df80c/LoRa_E220.cpp#L831

      At the moment:
      byte size = message.length(); // sizeof(message.c_str())+1;

      I changed it to:
      byte size = message.length() + 1; // sizeof(message.c_str())+1;

      Everything worked fine.

      There are other parts of the code that may need fixing. (I haven’t tested yet)
      Ex:
      https://github.com/xreef/EByte_LoRa_E220_Series_Library/blob/7acecaede468559df9a2e8ccf7367059748df80c/LoRa_E220.cpp#L850

      in reply to: Bug when sending number with LoRa_E220 sendMessage? #20548
      George
      Participant

        Hi Renzo

        I’m traveling now. Next Sunday (01/05), I will perform more tests and send the results.

        Thank you very much for your attention and for the development of the library.

        in reply to: Bug when sending number with LoRa_E220 sendMessage? #20181
        George
        Participant

          Thank you very much, Renzo

          I bought EBYTE 220 modules. I started testing with their fantastic library.

          If I identify something “strange”, I will open a post here on the forum.

          I’m not a professional programmer (I know R Language and I’m a beginner in C/C++). But I will try to test and send feedback.

          I sent an email to EBYTE with the suggestion that they finance/sponsor the development of their library.

          Thank you very much.

          in reply to: Bug when sending number with LoRa_E220 sendMessage? #20177
          George
          Participant

            If you do not activate “#define ENABLE_RSSI true” the modules do not communicate correctly. There is a lot of data loss in sending and receiving.
            When I activate “#define ENABLE_RSSI true”, the modules communicate correctly, but there are the bugs reported in the posts above.

            in reply to: Bug when sending number with LoRa_E220 sendMessage? #20171
            George
            Participant

              Update:
              The above mentioned strategy of using String msg_txt = String(msg_num) + String(" "); did not fix the RSSI bug. It just froze the RSSI number at a certain value.
              See attached image:

              Attachments:
              You must be logged in to view attached files.
              in reply to: Bug when sending number with LoRa_E220 sendMessage? #20170
              George
              Participant

                NOTE: When compiling the code in VSCode + Platformio, this warning appears:

                Building in release mode
                Compiling .pio\build\nodemcuv2\src\main.cpp.o
                Compiling .pio\build\nodemcuv2\lib14b\EByte_LoRa_E220\LoRa_E220.cpp.o
                .pio\libdeps\nodemcuv2\EByte_LoRa_E220\LoRa_E220.cpp: In member function 'void LoRa_E220::writeProgramCommand(PROGRAM_COMMAND, REGISTER_ADDRESS, PACKET_LENGHT)':
                .pio\libdeps\nodemcuv2\EByte_LoRa_E220\LoRa_E220.cpp:552:12: warning: unused variable 'size' [-Wunused-variable]
                  552 |    uint8_t size = this->serialDef.stream->write(CMD, 3);
                      |            ^~~~
                Archiving .pio\build\nodemcuv2\lib14b\libEByte_LoRa_E220.a
                Linking .pio\build\nodemcuv2\firmware.elf
                Retrieving maximum program size .pio\build\nodemcuv2\firmware.elf
                in reply to: Bug when sending number with LoRa_E220 sendMessage? #20169
                George
                Participant

                  Update: The bug is not worked around with the suggestion below. See the next posts.
                  I got around the “bug” by concatenating a space at the end of the message. There is no data loss and the receiver receives the complete numbers.

                  String msg_txt = String(msg_num) + String(" ");
                  ResponseStatus rs = e220ttl.sendMessage(msg_txt);

                  in reply to: E32 x E22 x E220 #18461
                  George
                  Participant

                    Hi Renzo

                    Thank you very much for your dedication and willingness to provide libraries for EBYTE’s E32, E22, and E220 modules.

                    About your observation:
                    “I think the E220 is a candidate for the best device, but 400b of the buffer can be dangerous if you want to use the max packet size and receive three messages simultaneously, you can lose one of them.”

                    I was wondering how critical this would be in a production environment.

                    First, do Semtech modules have a storage buffer (or is it just an EBYTE increment)?
                    In the case of the E220, considering that each “Message size bytes” is 200 bytes, and the “Buffer size bytes” is 400, I wanted to know how this can be something critical in the production environment.

                    Fictitious Example:
                    If in a period of 5 seconds, a gateway/ESP32/E200 receives 3 messages of 200 bytes, can one of them be lost?
                    How long does an E220 take to process a 200-byte message and transmit it to the microcontroller (eg: E220 -> ESP32)?

                    Sorry to bother you, but I’m trying to understand from an operational perspective how critical this is.

                    Thank you for your attention.

                    in reply to: How to select 868 or 915 mhz frequency of E220-900T22D? #17957
                    George
                    Participant

                      I just identified that it is possible to choose the frequency using #define.

                      I saw this on github: https://github.com/xreef/EByte_LoRa_E22_Series_Library

                      # define  FREQUENCY_433 
                      # define  FREQUENCY_170 
                      # define  FREQUENCY_470 
                      # define  FREQUENCY_868 
                      # define  FREQUENCY_915

                      Thank you Renzo

                    Viewing 9 posts - 1 through 9 (of 9 total)