in the first loop the about code works perfectly and it has response from the server, but in the second time, it failed with “No Carrier”. It seems to me that the socket connection I established could only allow me to send ONE request.
I tried to doMDM.getDCD(), I found the getDCD() turns to 0 soon after the first response from server.
You are doing it wrong. The least thing that I can tell you, is when sending data using the GET method, you need to put a variable name after the question mark ‘?’. But here you are not putting anything.
I will soon post an article on my blog to show how to connect the module to an internet page, and send/receiving data to/from any type of database
fsplash:
It seems to me that the socket connection I established could only allow me to send ONE request.
That is not true, sockets can handle more than one request. But here is what I call tell you. Are you putting any kind of delays in the code or not? Try to put a delay after each response from the server. So start the delay with 5 seconds. If you get the right response then decrease the delay. It basically depend on the network provider. For me, I added a 300mSec and it works fine
res = MDM.receive(200)
//ADD A DELAY Start with 5 Sec and decrease it.