Sending more than one messsage before sleep using ESP32_LORAWAN (heltec) library

Hello guys,

I have a challenge where my message is quite “big” for LoRaWAN, however with 2 packets in DR_2 =~ sending 200 bytes for each it could solve my problem.

The point is, when I send a message it always go to the :

 case DEVICE_STATE_SLEEP:
    {
      LoRa.DeviceSleep(CLASS,DebugLevel);
      break;
    }

Where the ESP32 goes to sleep and with that, I lose my data. I could write it in a RTC variable but is for me is not the best approach.

I have create a flag to make my device check if I have send the two messages already, and when I have sent just the first message it should go to the > DEVICE_STATE_INIT but is not working with this method.

Have someone experienced this kind of challenge with LoRaWAN ?

Aside from splitting the data into multiple packages, there may be no better way now. :frowning_face:

BTW. Can you please take some example of your payloads?

If your payload is float format (23.4567 etc.), you can send those data in hex.

They are in float however im using like a “dictionary” to reduze the size of the float to just one byte each one.

I need to send at least 256 bytes and the maximum that we achieved here was 242 bytes.

I accept already that I need to sendo more than one package, however the problem is How Can I do this?

The routine implemented by you guys make the device sleep after send the MSG losing the data acquired by my sensor, as I have explained:

I have create a flag to make my device check if I have send the two messages already, and when I have sent just the first message it should go to the > DEVICE_STATE_INIT but is not working with this method.

Can you think in a better approach to do the same thing? I mean, send more than one package before sleep.

just out of interest what data are you trying to send that is 256bytes big?

@rsmedia I’m measuring vibration, however I need more than just the global rms. I need to implement an FFT to check the frequency spectrum. = )
So to have one “accepted” resolution in my spectrum I need at least 256 bytes using a 1600 Hz of sampling rate I have 800Hz in the spectrum ( nyquist theorem) with that I ll have a step of 3,125 Hz in the spectrum.