Single handler for multiple command subscribe issue

If I as an example subscribe to all commands starting with AT$ and AT+, using the same handler function for both subscription calls, the module crashes upon receiving a AT$ command.

Ex:
adl_atCmdSubscribe(“AT$”,handler,ADL_CMD_TYPE_ROOT);
adl_atCmdSubscribe(“AT+”,handler,ADL_CMD_TYPE_ROOT);

On incoming AT$… command, the module crashes.

Has anyone seen the same issue?

(Tested on multiple versions on Q2687 and SL6087, using ARM ADS compiler)

If I instead have the subscriptions as:
adl_atCmdSubscribe(“AT$”,handler1,ADL_CMD_TYPE_ROOT);
adl_atCmdSubscribe(“AT+”,handler2,ADL_CMD_TYPE_ROOT);
handler1 is properly called on reception of AT$ command.
handler1 and handler2 are in this case identical to handler but implemented as two functions instead of one.

Hi,

Have you tried compiling it with ARM ELF GCC compiler and testing it ??

I haven’t tried any other toolchain such as ARM ELF GCC yet.

Can you say which versions?

Going by what I can remember:
R7.45 - SL6087
R7.44 - Q2687
R7.2a - Q2687

Do you get the same if you don’t use ADL_CMD_TYPE_ROOT ?

ie, does it seem to be an issue with ADL_CMD_TYPE_ROOT, or an issue with multiple subscriptions sharing a handler, or … :question:

I haven’t yet had time to do any extensive testing for this that would include using different options to the subscription.

Closing issue as culprit has been found.
The real issue turned out to be outside the module.

Intrigued - can you say more…?

It’s somewhat embarrasing really.
In the “error” case, output to an external application caused the external application to reset the module.
The output to the external application was slightly different in the “ok” case.

I realized this after I failed to make a standalone repro case, and took time to investigate further in the project where I had the “issue”…

:blush: :blush: :blush: