The limit seems to be ~230 characters.
I tested multiple serial terminals and the parameter after the command itself is cut off at 230 characters, but the parameter length is reported as 260 bytes (that could be a bug in RUI3)
Test command with 25 char long command and 260 byte long parameter:
atc+testing_long_command=---------1---------2---------3---------4---------5---------6---------7---------8--------9---------100-------1----------2---------3---------4---------5---------6---------7---------8---------9---------200-------1---------2---------3---------4---------5---------6
Testing with the Serial Monitor of Visual Studio the parameter is cut off at 230 bytes:
The Serial Monitor of the ArduinoIDE has a similar behaviour, the parameter is cut off at 230 bytes.
If I split the parameter into two parameters of 200 characters each, all is good:
atc+test=---------1---------2---------3---------4---------5---------6---------7---------8--------9---------100-------1----------2---------3---------4---------5---------6---------7---------8---------9---------200:---------1---------2---------3---------4---------5---------6---------7---------8--------9---------300-------1----------2---------3---------4---------5---------6---------7---------8---------9---------400
Command = atc+test=
Parameter 1 = ---------1---------2---------3---------4---------5---------6---------7---------8--------9---------100-------1----------2---------3---------4---------5---------6---------7---------8---------9---------200
Parameter 2 = ---------1---------2---------3---------4---------5---------6---------7---------8--------9---------300-------1----------2---------3---------4---------5---------6---------7---------8---------9---------400
From VSC terminal app:
Test AT command used for this:
bool init_test2_at(void)
{
return api.system.atMode.add((char *)"TESTING_LONG_COMMAND",
(char *)"max input length for AT commands",
(char *)"TESTING_LONG_COMMAND", test_handler2,
RAK_ATCMD_PERM_WRITE | RAK_ATCMD_PERM_READ);
}
int test_handler2(SERIAL_PORT port, char *cmd, stParam *param)
{
AT_PRINTF("Received %d arguments", param->argc);
for (int idx = 0; idx < param->argc; idx++)
{
AT_PRINTF("Argument %d Length %d ==> %s", idx + 1, strlen(param->argv[idx]), param->argv[idx]);
}
return AT_OK;
}