Best way to send many data to DDBB via GPRS??

Status
Not open for further replies.

oldman85

Newbie level 1
Joined
Jul 14, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
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.
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…