Hi everyone, this is something that I couldn´t find out… maybe you can help me out:
I´m working on “Socket Sample” of Wavecom Wismo Q2501.
I want to start the TCP connection automatically, instead of trying “at+SOCKETSTART=1” on a external program such as Hyper Terminal.
And also I want it to Close the socket after a defined response from the server and Open the Socket Once again after a certain time specified on the Timer Subscribe. This is something I´ll test after the problem above.
The thing is: On Socket_Init(); function I started a Timer after que “ma_Application” definitions, such as Start and Stop commands.
the idea behind the user created AT commands is to use those from a terminal or other serial connection to interact with the internal application from the outside.
You don’t need to create a command (by using adl_atCmdCreate() function) from the internal application to call a user defined AT command since you can just call the function(s) that are called when the AT command handler for that function is executed. And if you don’t want to be able to call the function through a terminal program, you don’t even need to subscribe for the AT command (e.g AT+SOCKETSTART) at all…
Or in other words, you can’t create a call with adl_atCmdCreate() to a user defined command (a command subscribed by the Open AT application).
The callback routine for the subscribed command in the Open AT application will never be called. The command created with adl_atCmdCreate() will only be handled by the standard GSM core software AT-command parser which will not recognise it and return ERROR.
Hi Jan! You know how much I appreciate your help and the others don´t you!? You really are Open AT expert!
Can you give me another little hand here?
As you already know I want to post Coordinates to a webserver, right?
I want to post the coordinates every 10s so I´m trying to make TCP “connections” and “disconnections” using a timer.
The thing is: after the first connection and disconnection I can´t connect anymore.
I´m following the “Socket Sample” and it´s functions Socket_start and Socket_stop.
I start the application with a Timer Subscribe and a Flag set.
So… for the first time Socket_start will be called.
Everything works fine and when the application receives an specific answer from the Remote, it calls the Socket_stop function. And set the Flag once again.
But… when the timer ticks once again… Socket_start is called but it doens´t do what it have to.
I’m not sure what the problem is, but I think you don’t need to stop the socket at all… The web server will close the connection once it has sent the response, so you don’t need to do an explicit stop.
Also, I think “ed_SocketLTCPStop()” is used only for listening sockets, which it was in the original example but now isn’t anymore…
Probably your program works OK when you remove the call to the stop function…