Concatenated custom AT command


Hi everybody,

I subscribed to two custom at commands: at#cmd and at#othercmd
They work without problem

Now, I would like to concatenate them as for native commands, i.e.


The first command is executed, the second no.
Moreover, after that the parser is blocked so any command (including the simple AT command) returns ERROR.

Does anyone suggest what could be the problem?

I verify that a native command followed by a custom command works, for example


but the opposite doesn’t work.

That’s my settings:

“DWL”,“V08b13”,"",“Sierra Wireless”,55344,“111611 18:03”,“dda36757”,“00010000”
“FW”,“FW_SRC_747_8_F4_3.Q2687G”,“R7.47.4.201208311102.Q26CL702”,“Sierra Wireless”,2221264,“083112 11:02”,“6aa633a2”,“00020000”
“OAT”,“01.00.20130826143913”,“XXXXXX”,“YYYYY”,301488,“082613 14:39”,“60c60613”,“00260000”
-“Developer Studio”,“”
-“Open AT Application Framework package”,“”
-“Open AT OS Package”,“”
-“Firmware Package”,“”
-“ExtendedATApplication Library Package”,“”
-“Internet Library Package”,“”
-“Security Plug-in Package”,“”

Best Regards.



What’s the return of your custom command?

One suspect is that the first command is not exit properly so ADL consider an error thus 2nd command was not executed.

Please refer to ADL user guide, section 3.3.4 Incoming AT Commands, “Important note about incoming concatenated command”.

Hope it helps.


Dear lotam,

thanks for reply.

I read the section you specify but I didn’t understand how to answer with a single terminal response.

When I subscribe to a command using atCmdSubscribe, I define a cmdHandler which prototype is typedef void (*) adl_atCmdHandler_t (adl_atCmdPreParser_t *Params)
without any return parameter.
Inside the cmdHandler I don’t send any command to modem but I do other stuff.

So, how to answer with ADL_STR_OK?
Should I use adl_atSendStdResponse?

Thank you.

Best Regards.



I tried to put a adl_atSendStdResponse( ADL_AT_RSP, ADL_STR_OK )

command at the end of the cmdHandler and now I’m able to send two concatenated command

However, I receive an OK on the serial port which is not good for my application.

How to avoid this problem?

Thanks for support.



Hi Davide,

Not sure what kind of external application is in your design, but for OpenAT, exit with “OK” response is the right way especially for concatenated command. (not big deal when sending custom AT one by one without “OK” in non-concatenated mode)

Still, I think there are few ways to workaround that:

  1. combine both code in two custom AT command into one custom command
  2. if the sequence of concatenated command is always fixed (e.g. AT+abc;+def), we may add “OK” for first custom command but not the last custom command to avoid sending “OK” at the end of process.

In my test, 2nd option prevents the “OK”. e.g.







But please use with caution, the custom command without “OK” response must be the last command in the concatenated mode. Otherwise port may stay in concatenated mode and unable to handle new commands…

Hope it helps.


Hi lotam,

thank you very much for explanation and suggestion. I finally understand the principle
about concatenated custom command.

The second solution you propose could be fine.

Thank you again.