Dealing with LoRa max packet sizes

Home Forums General Dealing with LoRa max packet sizes

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12218
    Chris Friedel
    Participant

    Hi All,

    I apologize up front for placing in “general” but I’m not sure exactly where else this question best fits.

    In our setup, we have an Arduino connected to a LoRa mDot. The Arduino is using AT+SENDB to send sensor data back to our AEP conduit. On the conduit, node-red consumes the LoRa network messages.

    Things were going great until we moved the Arduino and mDot to the other side of the building. Its spreading factor went to 9, and we stopped receiving data as the payload was 60 some bytes.

    Based on all of this, we have a few questions. If anyone has answers to these, or even can point us to the correct documents to find answers, that would really be appreciated.

    Question 1) We observed that when using AT+SENDB (or AT+SEND) with too much payload, the node-red LoRa node simply did nothing. Is there any way to automatically have the mDot break the payload into multiple packets with simple AT+SENDB, or would we need to start dealing with embed and write our own logic to the mDot ARM micro?

    Question 1a) If its possible to send messages across multiple packets, is there a best practice way to have node-red receive these messages? The best I’ve come up with so far is to create local buffer files for each EUI to capture complete messages – but this seems inefficient.

    Question 2) If the Arduino needs to manage the max message size sent to AT+SENDB, and dynamic data rate is enabled, is it best practice to check the dynamic data rate (well, spreading factor) via AT+RXDR? just before communication? Is there a risk that the radio will change its spreading factor in the period of time between AT+RXDR? and AT+SENDB?

    Question 3) Just a quick clarification. In the AT command reference, max payloads are defined by data rate (for US, DR0 is 11 bytes, up to DR4 is the full 242 bytes. Of course, everything on the radios reference Spreading Factor, not data rate.

    As mentioned, DR and SF are directly related. Is this the correct relationship for the LoRa mDot?
    DR0 = SF8 = 11 max bytes
    DR1 = SF9 = 53 max bytes
    DR2 = SF10 = 129 max bytes
    DR3 = SF11 = 242 max bytes
    DR4 = SF12 = 242 max bytes

    Thank you so much everyone, and apologies for the mammoth post 🙂

    #12220
    Jason Reiss
    Keymaster

    Q1) There is currently no support for multipart messages
    a) Could you keep buffers in nodejs global context?

    Q2) Use AT+SDR to get the current datarate used by the LoRaMAC layer

    Q3) US915 Datarates
    —————————
    DR0 = SF10BW125 = 11 max bytes
    DR1 = SF9BW125 = 53 max bytes
    DR2 = SF8BW125 = 129 max bytes
    DR3 = SF7BW125 = 242 max bytes
    DR4 = SF8BW500 = 242 max bytes

    #12224
    Chris Friedel
    Participant

    Thanks Jason

    Total brain fart on the spreading factor… my understand was what you’ve indicated. I’m not sure why my fingers typed the numbers I did! lol

    As for a way to maintain state, (1a) I had tried node globals, but was getting undefined exceptions on the global object. I assumed that it wasn’t implemented on your the conduits instance of node. I will investigate that again, thank you!

    Cheers,
    Chris

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.