Replies: 3 comments 6 replies
-
The limit, per LW specification, is 254 bytes subject to legal airtime restrictions. Much more than 50 bytes starts getting problematic in general. The notes.md has a link to a calculator that will show you what can be done. Without knowing anything about your device or the regional settings it's hard to comment in detail. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response @HeadBoffin. It looks like I don't know enough to ask the correct questions. I am using examples/LoRaWAN_ESP32 as a start for building my LoRaWAN sensor node. It is using a Version 2.0 TTGO LORA32 device that I have connected to a BME280. I modified the code to get my sensor data uploaded to TTN, but I may want another sensor or two connected so more data space would be required. I was able to simulate my issue with just the example code. I modified config.h with my newly registered device keys and the appropriate radio; When I increase the value in the line uint8_t uplinkPayload[10]; above 9, the uplink always fails. Is a solution around this to change some of the other parameters of the LoRa transmission? I do know there are other Data Rate values and Spreading Factor that can affect speed of transmission, but there are none of these variables listed in the example code so I am using what ever defaults the library has coded. When I look up the transmission on my gateway I see it is using: Any thought and ideas would be helpful. Mike. |
Beta Was this translation helpful? Give feedback.
-
Rather a lot of points arising, not least the plan to work around the limitations - you should be able to send packets as per the calculator subject to using LW as invented - sending data at 5 minute intervals is fine - "testing" by hammering away is doomed to failure. Hotwiring RL by changing the parameters may yield results like a potential visit from the radio authorities - long, frequent, far reaching transmissions on the shared ISM band is likely to disrupt other users. Masked by this activity is the possibility that the US915 band has become unglued so we need to check for any issues because out the box a device with ADR that is within a few tens of metres of a gateway should quickly drop to SF7 which would allow far greater payload sizes. The code can't control the radio by cutting the tx off after a certain time and it would result in a partial packet that would fail the CRC check and, in general, be dropped by the gateway. You should plan for being able to use the more usual SF's. You can split up payload types using the fPort (that's what it's for) so you can send different payload types. And you can send min, max & ave readings for a time period or even accumulate a reading a minute in to one payload. For testing there's no reason to bother the radio spectrum - once it's setup you can use serial debug for everything else to develop the rest of your software. |
Beta Was this translation helpful? Give feedback.
-
I am wondering what is limiting the uplinkPayload size in the example sketches I find in this library. I was able to increase it to a maximum of 9 before I get an error (-4) when it tries the uplink. Are there other variables I need to modify from the default to allow more than 9 bytes of data per uplink. IU am using the LoRaWAN_Starter sketch and it works so well except I would like to send a few more bytes of data.
Beta Was this translation helpful? Give feedback.
All reactions