i'm working at project related to IoT.Actually, i tried to collect data from my sensor devices using GPRS network (arduino + SM5100B-D gsm/gprs shield).I spend last 4 days ago searching in the internet about how to make GET or POST request to dweet using GPRS (TCP/IP) of this shield but with out any results
this shield has very poor documentations and examples >:(
so, im looking to your help ..... 8) 8)
i got this attached arduino Sketch and calibrates it to communicate with dweet.io but without any results.When this code runs, it starts to conf. shield and then makes tcp connection to dweet.io. but it stills looking for Acknowledgment signal coming back from the server as it illustrated in the following attached picture.
PaulS , what you want me to explain ? i need to make GET and POST HTTPS request from this shield in order to deal with Dweet.io. this his all the story. im looking to your support>
You need to determine what the problem is. It is obviously here:
int packetLength = 26+host.length()+request.length()+useragent.length();
if (checkSocketString(s) == packetLength) // checks that packetLength bytes have been acknowledged by server
break; // we're good!
else {
Serial.println("Sent data not yet acknowledged by server, waiting 1 second and checking again.");
delay(1000);
}
Maybe you miscalculated the expected packet length? Try this instead.
int thisLen = checkSocketString(s);
if (thisLen == packetLength) // checks that packetLength bytes have been acknowledged by server
break; // we're good!
else {
// add this
Serial.print("Packet length = ");
Serial.println(thisLen);
Serial.print("Expected = ");
Serial.println(packetLength);
Serial.println("Sent data not yet acknowledged by server, waiting 1 second and checking again.");
delay(1000);
}
Good suggestion. i did it and i got same results. i seams that dweet.io did not answer me neither AKN. nor data . this is clear according to Socket status which i recieved.
Instead of posting a screenshot of your debugging output, copy and paste it into a post. That way everyone can see it without needing to download an image file.
Don't use abbreviations like "it starts to conf. shield ..." - that just confuses people. You could have saved a lot of time by taking the extra seconds to type "configure the". That would have saved half the replies in this thread.