Remote Terminal with Custom AT Commands

#1

Hi Guys,
I am trying to add my custom AT commands to the Remote terminal sample which comes with the Open AT SDK. At the moment I got SDK 2.10 installed. In this application built in AT commands works fine when I connect through CSD data call, but the custom commands doesn’t work and all commands works fine on UAR1.
Any suggestions where to check in the code?
I have noticed following note with in the adl_CommandHandler.h file
@note IN THIS CURRENT RELEASE #ADL_CMD_SUBSCRIPTION_ONLY_EXTERNAL_PORT IS THE ONLY VALID CHOICE “
Does it means that custom at commands works only on external UARTS ?
But I have tried creating the AT command coming as from UART1 but it didn’t work. I just got ERROR back and it sent the ERROR to UART one too. If I send the same command from UART1 instead of sending through remote terminal it works fine.
Thank you
Asiri

0 Likes

#2

I guess it is impossible to use custom at commands with remote terminal. But it is possible to parse incoming data from remote terminal by your own and process it manually. Well not a very good choice :slight_smile:
In my project I use remote terminal to execute standart at commands and for other functions I use GPRS and SMS messages.

0 Likes

#3

Unfortunately, the sample you mention probably sends AT commands to the “C virtual port”, i.e. a fake COM port which answers commands sent from C or Lua programs. This virtual port doesn’t understand user-defined commands, and there’s no option to change this AFAIK. If you really need to do it that way, you’ll have to re-do the custom AT commands parser, check the nature of each command received, and send them either to the virtual port or your custom parser.

In practice, using a Lua telnet shell is probably a much more realistic option.

0 Likes

#4

thanks for the replies.

Well I changed the code to send the command as it comes from the UART1

adl_atCmdCreate ( ATCommand, 
                                        ADL_AT_PORT_TYPE(ADL_PORT_UART1,FALSE),
                                        Res_Cmd_Handler,
                                        "*",
                                        NULL);

but still I am getting ERROR for the custom AT commands

also I spotted following note in the adl_CmdHandler.h header file,

are they (Wavecom) in the process of implimenting this for all ports in the future ? so we can define our custom commands are avaliable to all ports or only to external ports.

0 Likes

#5

Let me repeat: there is no workaround, no way for you to run custom AT commands from C programs, unless you rewrite your own AT commands parser from scratch. As far as I know, Wavecom doesn’t plan to change this.

0 Likes

#6

However, there’s nothing to stop your ‘C’ code from directly calling your command handler function, is there?! 8)

0 Likes

#7

Well I am going to check the comands before sending to the internal port and if they start with custom AT comands parse it in my program and call the functions from there. hopefully this way i can get this going

0 Likes

#8

Which is basically a different way of saying: 8)

0 Likes

#9

Not necessarily.

What I meant to say is that he may be able to do away with AT commands (and, therefore, any parser) completely - and just call functions programmatically…

0 Likes