I was just wondering, is it possible to send/receive AT commands over GPRS connection just like you do through UART1?
I’ve been trying to use adl_fcmSubscribe to subscribe to GPRS and ADL_FCM_EVENT_V24_AT_MODE but when I do, GPRS connection does not seem to respond at all.
You’ll have to devise your own protocol for transporting the commands & responses over GPRS, but once you’ve done that, adl_atCmdCreate can be used to issue the command and subscribe to the repsonses…
adl_atCmdCreate can only be used with standard commands - it cannot be used with custom commands that you have created yourself.
To call custom commands that you have created yourself, you will have to implement your own scheme to recognise the command and initiate the appropriate action.
But when my modem connected to my station, when i type MILOS in hyperterminal he comunnicated automatic with station…
I just want to write a function that allows commands directly as if through HyperTerminal … And then wanted to record the results of this command in a variable…
Ok. Do what you want. Enter these commands, download the data etc. Just do not use AT commands for it and it will be an easy task.
For example if your station with GSM module listens for incoming data over GPRS, choose some sequence (it can be “123” or “start” or “AT+MILO”) and listen for it. If you’ve found it - start FTP connection or anything you want.
Of course you can - that is the whole point of creating your own custom AT commands!
But, what I keep telling you is: you cannot issued these custom AT commands using adl_adCommandCreate!
So you need to write you own function that looks at the incoming data and recognises your commands;
When it sees one of your commands, it calls the same “action” function that the custom AT Command would have called
Yes, but I just want to make a direct command, because the station can interpret the command Milos, so I think I just need to know how to send commands directly by modem, anyone know how?
When you receive the command from server, just simply send it using adl_atSendResponse if you don’t have subscribtion to FCM, or adl_fcmSendData if you are using FCM.
If in your application WIP library is managing connection with server you can receive data in TCPClientHandler in case WIP_CEV_READ. You can then simply find if data from server is command that you want send to device ( wm_strncmp( receivedData, “MILO”, 4 ) ) and if yes pass it to this device.
You don’t have to use any subscription to AT commands.
If you want to receive answer you have to subscribe to UART1 (I assume that you are using serial port to communicate with device). And then in its data handler your application is receiving answers.
For more informations read Flow Control Manager section.
Aha! so you’re not talking about ATCommands at all, then?!
ATCommands are the commands that you issue tothe modem in order to instruct the modemto do stuff; eg
ATD instructs the modemto dial a number;
AT+CSQ instructs the modemto give its signal strength reading;
etc, etc,…
You are talking about issuing commands from the Modem to some external device that is wired to the modem’s serial port (you call this external device your “station”) - is that right?
eg,
MILOS instructs the “station” to do something;
OPEN instructs the “station” to do something else;
SHOW CLIMA10 instructs the “station” to do another thing.
And you want your program to send these commands to the “station” - is that it
awneil yes i want my program send these commands to the station its possible?
My station comunicated with modem with port serial, and i for open comunication i need type this commands in hyperterminal:
MILOS [enter]
OPEN [enter]
SHOW CLIMA10 [enter] - i want get result of this command and put this result in buffer of my data.txt for send to webserver.
my question is how send automatic direct command in my modem? what is the function that I use to send commands directly to my station?