How to send more than 58bytes of data via the Ebyte E32

Home Forums The libraries hosted on the site EByte LoRa e32 UART devices sx1262/sx1268 How to send more than 58bytes of data via the Ebyte E32

Viewing 8 reply threads
  • Author
    Posts
    • #22503
      moonman
      Participant

        Hi, is there a way to send more than 58bytes of data through an Ebyte LoRa E32 1W module?

      • #22505
        Renzo Mischianti
        Keymaster

          Hi moonman,
          you can’t send more than 58byte in a single call, but if you use a structure with some packet instruction, you can manage It via software.

          
          struct Packet {
          	byte deviceId;
          	byte msgId;
                  byte[54] rawBinary;
                  bool end;
          };
          

          with a similar structure, you can identify a sender device and the msgId, and you can rebuild the complete message in the server and use end == true to know if the stream was complete.

          Bye Renzo

        • #22508
          moonman
          Participant

            Thanks renzo, is there an actual arduino sketch with this example anywhere?

          • #22509
            Renzo Mischianti
            Keymaster

              Hi moonman,
              No sorry nothing of that.
              Bye Renzo

            • #22533
              moonman
              Participant

                Hi renzo, this is the code for both the reciever and transmitter can you tell me what exactly is wrong with it, I’m not sure I understood what you meant.

                Transimitter – everything is based off of the sendFixedTransmissionStruct

                void loop()
                {
                	delay(2500);
                	struct Message {
                	    char deviceId[5] = "TEMP";
                	    char msgId[8] = "Kitchen";
                	    char rawBinary[54] = "text text text text text text text text text text text";
                      bool end;
                	} message;
                
                	ResponseStatus rs = e32ttl.sendFixedMessage(0,3,4,&message, sizeof(Message));
                	Serial.println(rs.getResponseDescription());
                }

                Reciever

                // The loop function is called in an endless loop
                void loop()
                {
                	if (e32ttl.available()  > 1){
                
                		ResponseStructContainer rsc = e32ttl.receiveMessage(sizeof(Message));
                		struct Message message = *(Message*) rsc.data;
                    while (message.end != true){
                  
                      Serial.println(message.deviceId);
                      Serial.println(message.msgId);
                      Serial.println(message.rawBinary);
                      
                    }
                //		free(rsc.data);
                		rsc.close();
                	}
                }
                

                Thanks

              • #22842
                moonman
                Participant

                  Hi renzo, is there an example on how to send two different structs?

                • #22992
                  moonman
                  Participant

                    By that I mean two or more different 58byte structs.

                    Thanks moonman

                  • #23105
                    moonman
                    Participant

                      Hi Renzo, hope I’m not bothering you but can you provide an answer. Not a lot of great resources online.

                    • #24733
                      Dusan
                      Participant

                        With E32-900T30D module, it is not necessary to send messages with a maximum length of 58 bytes in individual packets. The module automatically splits packets when the length exceeds 58 bytes. Maximum possible lenght to send is up to 512 bytes. It is sufficient to change the #define MAX_SIZE_TX_PACKET in the library. Tested and working 🙂 Have a nice day!”

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