SWL2001 icon indicating copy to clipboard operation
SWL2001 copied to clipboard

ERROR: PAYLOAD SIZE TOO HIGH when retransmitting packets using relay (STM32L4 + SX1262)

Open JulioFerreiraDev opened this issue 9 months ago • 1 comments

Hello, I hope you are all well.

I am using LoRa Basics Modem firmware v4.8.0 with relay functionality enabled, in a configuration with:

Relay: STM32L476RG + SX1262 End-device: STM32L073RZ + SX1262

In the firmware, I only modified the file lbm_examples/main_examples/example_options.h to configure the keys and region (SMTC_MODEM_REGION_AU_915), and downloaded the .elf files to the corresponding boards.

During testing, the relay successfully performs the JOIN and receives MAC commands such as ADD_TRUSTED_ED. However, when trying to relay messages (including possibly JOIN ACCEPTs to the end-device), the relay repeatedly displays the following error:

Invalid size (data:29 + FOpts:0) > 11 for dr: 2
ERROR: PAYLOAD SIZE TOO HIGH

This seems to indicate that the payload exceeds the maximum allowed limit for DR2 (SF10BW125), which is 11 bytes. The practical consequence is that the end-device never manages to complete the JOIN process, despite the join being accepted by the TTN.

I would like to know if there is any way to configure the DR used for retransmission or to dynamically adapt the DR according to the size of the payload.

Thank you in advance for your attention and congratulations on the excellent work with the firmware. I am available to provide more details, logs or perform additional tests.

JulioFerreiraDev avatar Mar 21 '25 19:03 JulioFerreiraDev

Hi, Thank you very much for your feedback. To configure the datarate to Join and for the application, you can use below API:

smtc_modem_return_code_t smtc_modem_adr_set_join_distribution(
    uint8_t stack_id, const uint8_t dr_custom_distribution_data[SMTC_MODEM_CUSTOM_ADR_DATA_LENGTH] );
 
smtc_modem_return_code_t smtc_modem_adr_set_profile(
    uint8_t stack_id, smtc_modem_adr_profile_t adr_profile,
    const uint8_t dr_custom_distribution_data[SMTC_MODEM_CUSTOM_ADR_DATA_LENGTH] );

Could you please try and let us know the status ? Many thanks,

opeyrard avatar May 20 '25 13:05 opeyrard