Page 1 of 1

Modified AT commands

Posted: Sun Apr 13, 2025 1:03 am
by Anviori
Hello,

I'm using version 3.2.1.0 of ESP-AT: https://github.com/espressif/esp-at/tree/v3.2.1.0.
I see that the lib32_at_core is provided as a library, so I can't modify anything in there. Is there any way to modify the functionality of an existing AT command? Or override an existing command to perform a different action by creating a custom one with the same name?

Thank you

Re: Modified AT commands

Posted: Mon Apr 14, 2025 3:20 am
by esp-at
The AT command override feature was added after 2024.3, and you will need to use version 3.3.0.0 or later.

Re: Modified AT commands

Posted: Mon Apr 14, 2025 3:42 am
by Anviori
The AT command override feature was added after 2024.3, and you will need to use version 3.3.0.0 or later.
Hi, is there a specific example you can share of how that's done/works, if you don't mind.
Also, this is for ESP32 specifically.

Just to give an example, would it be possible to modify/override the AT+RESTORE command to “restore all parameters saved in flash to factory default settings of the module.”, but avoid having it restart the device automatically afterward?

https://espressif-docs.readthedocs-host ... md-restore

Thanks

Re: Modified AT commands

Posted: Mon Apr 14, 2025 9:24 pm
by Anviori
The AT command override feature was added after 2024.3, and you will need to use version 3.3.0.0 or later.
I'm having trouble find any mention of command overrides in versions >= 3.3.0.0. I can see an example of module overrides: https://github.com/espressif/esp-at/tre ... ule_config but that's not what I'm looking for.

Re: Modified AT commands

Posted: Thu Apr 17, 2025 3:28 am
by esp-at
you can see this example:
https://github.com/espressif/esp-at/blo ... stom_cmd.c

Just instead `+TEST` with `+RESTORE`, then AT will execute your AT+RESTORE command.

btw, if you don't restart the module, some configurations will not effect.
About how to reset the parameters, you can extern this API, and call it in `at_exe_cmd_test()`.

Code: Select all

void at_nvm_restore(void);

Re: Modified AT commands

Posted: Thu Apr 17, 2025 3:45 pm
by Anviori
you can see this example:
https://github.com/espressif/esp-at/blo ... stom_cmd.c

Just instead `+TEST` with `+RESTORE`, then AT will execute your AT+RESTORE command.

btw, if you don't restart the module, some configurations will not effect.
About how to reset the parameters, you can extern this API, and call it in `at_exe_cmd_test()`.

Code: Select all

void at_nvm_restore(void);
Well, I was just using `AT+RESTORE` as an example. Are you saying that I can create a custom command called `AT+RESTORE` (a core command) and it will use that instead of the standard implementation when I call it?

Re: Modified AT commands

Posted: Fri Apr 25, 2025 2:15 am
by esp-at
yes. you can give it a try.