There’s been a number of questions asked on the forum about how to access custom AT commands from within an application. The common response is along the lines of ‘why would you want to do that? Just call your functions directly’. I believe I have finally found a valid reason to want to access my user-defined custom AT commands via the internal adl_atCmdCreate() function.
I’ve built a small application to run on a Fastrack Supreme. This application toggles the GPIO lines at user defined intervals, and I’ve written a simple AT command to set up the parameters for the GPIO. This works fine when accessing the Fastrack over UART1 or the USB port, but now the client wants to be able to change the parameters remotely.
I looked at the ‘Remote Terminal’ sample provided with Open AT, and it does exactly what I want - answers an inbound GSM CSD call, reads the data from the GSM flow and then passes it over to the module using the adl_atCmdCreate() function call. All works fine - when calling the built-in AT commands. Trying to access my custom command returns ERROR (as is sort of documented in the API).
Now I have to write a ‘pre-parser’ to strip out calls to my own AT command(s) from the GSM input, parse the data from the string and then pass these calls off to my own functions (and capture the response), instead of relying on the internal AT command parser (which works well) to do it for me. All making sure that I don’t break the existing custom AT command functions…
Has anyone else had this issue, or have any thoughts about how to access custom AT commands using OpenAT provided API?