I tried with a RAK3172 firmware version 1.0.4 and RUI_4.2.1 and DataRate0.
When I send a 51 bytes payload to my LoraWAN server it does not receive the payload if there is MAC commands inside the frame.
The server only receive a frame with MAC commands and an empty payload.
I tried to reduce the payload size according to MAC command size and then it worked, my server sends 4 “NewChannelReq” in the same downlink so I removed 8 bytes from the next payload and it worked.
For firmware 1.0.4 it does not say any error, it send the empty payload with the MAC commands.
For RUI_4.2.1 it says “AT_PARAM_ERROR”, sends the empty payload with the MAC commands and says “+EVT:TX_DONE”.
Then when there is no MAC commands to send it says “OK” then “+EVT:TX_DONE”.
Is it possible to know how many MAC commands will be sent into the next frame to calculate max payload size or correct the documentation to know the maximum allowable payload, MAC commands exluded?