aabmets / SIM800

A comprehensive SIM800 Series library for simplified and in-depth chip access.
GNU Affero General Public License v3.0
38 stars 27 forks source link

If my URL is dynamic, how do I transmit the get variable? #8

Closed scz-u closed 5 years ago

scz-u commented 6 years ago

If my URL is dynamic, how do I transmit the get variable? SIM.ipBearer(SET, "3,1,\"Contype\",\"GPRS\""); // Configure profile 1 connection as "GPRS" SIM.ipBearer(SET, "3,1,\"APN\",\"internet\""); // Set profile 1 access point name to "internet" SIM.ipBearer(SET, "1,1"); // Open GPRS connection on profile 1 delay(1500); SIM.ipBearer(SET, "2,1"); // Display IP address of profile 1 delay(1500); SIM.httpInit(EXE); // Initialize HTTP functionality SIM.httpParams(SET, "\"CID\",1"); // Choose profile 1 as HTTP channel delay(1500); SIM.httpParams(SET,this is dynamic ); // Set URL to www.sim.com

scz-u commented 6 years ago

And I used the code test in my example to find that, although it shows OK, it doesn't really access my URL, because I will automatically write txt files to the server when I have access to URL.

scz-u commented 6 years ago

image

aabmets commented 6 years ago

I am unable to assist you, because 1) while this library works, I don't officially support it anymore and 2) while the new library is half complete, it will remain so due to lack of time and interest. I'm keeping this thread open so others have the opportunity to aid you.

scz-u commented 6 years ago

ok ,thanks

VinceKezel commented 5 years ago
  char str[80];
  strcpy(str, "\"URL\",\"http://example.com/logger.php?vars=");
  strcat(str, "U777000");
  strcat(str, ",I1234");
  strcat(str, ",B5984");
  strcat(str, "\"");
SIM.httpParams(SET, str);   // Set URL to www.sim.com

output on serial is:

AT+HTTPPARA="URL","http://example.com/logger.php?vars=U777000,I1234,B5984"   OK 
aabmets commented 5 years ago

Thanks, VinceKezel.

scz-u commented 5 years ago

Thanks, VinceKezel.+1