How to send more than 7 bytes from Wisblock RAK4631?

I am testing with the example LoRaWAN_OTAA_ABP sketch version 0.1 and US915 frequency band.

I have discovered that if I attempt to send more than 7 bytes, the lmh_send() function throws an error.

NOTE that if I send exactly 8 bytes, the first send is successful, but subsequent attempts to send fail.
If I send more than 8 bytes, the first and all subsequent sends fail immediately.

Is this 7-byte limit a product of the LoRaWAN maximum payload size of 11 bytes for US915 at D0?

If this is the case, why isn’t this mentioned somewhere within the sketch? Instead, the m_lora_app_data.buffer variable is declared to be 64 bytes in size with no mention that it must be only 7 bytes or fail will occur.

Also, is this a fixed limitation? I.e. will the limit always be 7 bytes, or will this change based on some unknown property, header, or length of another value that is being sent?

Hi @thegpx ,

Yes, it is based on Duty Cycle and Dwell Time restrictions LoRaWAN.
I am not sure why you are getting failures in 8 bytes size but I think that is a different issue.
At DR0, you should be able to send successfuly up to 11 bytes.

@thegpx
Can you change the example code to

lmh_error_status error = lmh_send(&m_lora_app_data, g_CurrentConfirm);
switch (error)
{
case LMH_SUCCESS:
	Serial.println("Packet enqueued");
	count++;
	break;
case LMH_BUSY:
	Serial.println("LoRa transceiver is busy");
	count_fail++;
	break;
case LMH_ERROR:
	Serial.println("Packet error, too big to send with current DR");
	count_fail++;
	break;
}

This gives more information why the send failed.

Thank you @beegee and @carlrowan for your replies.

I have modified the code per your request and here are the results:

7 bytes: send OK (repeated sending is successful)
8 bytes to 11 bytes: first send OK, subsequent sends fail with error code “-1”
12+ bytes: error code “-1” on every attempt

To confirm, at no time does it report “Busy”. Always Error “-1”.

Thanks and I hope this clarifies the issue.