oldman85
Newbie level 1
Hello people,
I need to send the information of thousands of sensors to a MySql DDBB in a server via GPRS.
I usually use TCP, method POST and a input.PHP on server that load the data, register by register. But in the case of many data is a very slow system:
data= 1 register (20 fields)
Serial_GSM.println("AT+ CIPSEND");
Serial_GSM.println("POST /php/input.php HTTP/1.1");
Serial_GSM.println("Host: www.myweb.com");
Serial_GSM.println("Content-Type: application/x-www-form-urlencoded");
Serial_GSM.print("Content-Length: ");
Serial_GSM.println(strlen(data));
Serial_GSM.println();
Serial_GSM.print(data);
Serial_GSM.print("\x1A");
it works ok but.....it is very slow: connect-> send a register-> close->connect->send a register-> close-> etc...
I use an atmega1281 to collect, memorize on eeprom and send the data.
I was thinking to use UDP or send a file.txt to decode in the server.
Any advice?
Many thanks,
Pablo
EDIT:
POST (8Mb limit-> PHP.ini) + explode Goes OK.
I need to send the information of thousands of sensors to a MySql DDBB in a server via GPRS.
I usually use TCP, method POST and a input.PHP on server that load the data, register by register. But in the case of many data is a very slow system:
data= 1 register (20 fields)
Serial_GSM.println("AT+ CIPSEND");
Serial_GSM.println("POST /php/input.php HTTP/1.1");
Serial_GSM.println("Host: www.myweb.com");
Serial_GSM.println("Content-Type: application/x-www-form-urlencoded");
Serial_GSM.print("Content-Length: ");
Serial_GSM.println(strlen(data));
Serial_GSM.println();
Serial_GSM.print(data);
Serial_GSM.print("\x1A");
it works ok but.....it is very slow: connect-> send a register-> close->connect->send a register-> close-> etc...
I use an atmega1281 to collect, memorize on eeprom and send the data.
I was thinking to use UDP or send a file.txt to decode in the server.
Any advice?
Many thanks,
Pablo
EDIT:
POST (8Mb limit-> PHP.ini) + explode Goes OK.
Last edited: