I think I understand a little bit of what you are telling me. A TGX machine is a ticket selling machine which has a modem (in this case wavecoms Q2687) inside it.This modem sends data (tickets sold) to another modem “Globesurfer” which is connected to the server.I don’t know why we use the modem on the server but the TGX upgrades its software upgrades via this server and reports for the different machines are obtained from this server.
The remote modem (globesurfer) was losing connectivity too many times that it was difficult for the TGX to download upgrades etc, they came up with the idea of power cycling to keep the remote modem connected always. This is done with external hardware of course but software monitors a particular pin on the RS232 port then the status of this pin determines the power cycling.
The Q2687 also loses connection at times, so I guess the power cycling option comes up.
After issuing the command AT+CFUN=1, the modem does respond to at commands like ATI3,AT which are general commands that the modem knows already and always has an answer for. In this application, I used adl_atCmdSubscribe, to create my own at command. When I issue this command, the modem attaches itself to the GPRS network and an APN. I then issue another command that connects the modem to an IP. Both commands are created by me.
After issuing AT+CFUN =1, the modem does not recognise these commands that I subscribed to only. It sends error for these only and not the ATi3s and all.
Since the response to these commands is an error, it means i have to restart the application all together. Also the error that is shown is already in the code signalling that i cannot connect to GPRS network when I am already connected to it.
How in my application can I make the modem reattach itself to the GPRS network automatically after removing power and replacing power to it?? Is this the part where I use the “last resort” which is the adl_api, or I can just add it to my code???
Again,what code must I put in my application for the modem to recognise that it power was removed and replaced on it.
I am really clueless in all this and the forum is my only hope to go forward.