QuecOpen: When can I free memory command_name passed to qapi_QT_Apps_Send_AT()

I’m using QuecOpen on BG95 and BG96.

If I do this example code after I successfully call qapi_QT_Apps_AT_Port_Open()

void BWModemModule_ExampleFunction(void)
(VOID *)&commandString, BWMODEM_CMD_MAX_SIZE,
snprintf(commandString, BWMODEM_CMD_MAX_SIZE, … );
qapi_QT_Apps_Send_AT(streamId, commandString);

When can my BWModemModule class free the memory allocated by tx_byte_allocate?

  1. After qapi_QT_Apps_Send_AT returns?
  2. only after ATC pipe callback is called? I don’t t think #2 is right because one can get a callback showing an asynchronous urc message, before commandString is sent!!!

pls free mem when you do not need to use it ,

I attached one doc related bg95 DAM app RAM managerment for you reference

Quectel_BG95&BG77&BG600L_Series_QuecOpen_RAM_Memory_Management_V1.0.pdf (438.6 KB)