I'm looking for a way to get lots of sensory data from my Arduino Micro to a PHP script. My current attempt is using the following AT-commands:
Sent: [AT+HTTPPARA=URL,www.example.com/newData.php?data=t0_20.75,l_0.00,m_584,h_42,td_22,d_21x44x54]
Res: [AT+HTTPPARA=URL,www.example.com/newData.php?data=t0_20.75,l_]
As you can see I send a long GET-parameter to my server with shortened parameter Names like t0 for temperature sensor number zero, l for light and so on.
In the response from my SIM800l I get back a string with exactly 63 characters, so I assume there's some lenght limitation there on the SIM-module.
After that command when it tries to finish the HTTP request I get a lot of errors as AT-command responses and no GET data arrives on my script.
I check wheter or not data has arrived with the following function on my server:
ob_start();
echo "Var_dump of GET\n";
var_dump($_GET);
echo "Var_dump of POST\n";
var_dump($_POST);
$vd_res = ob_get_clean();
file_put_contents('postdump.log', $vd_res."\n",FILE_APPEND);
When typing some data directly into the browser it saves my sent data in postdump.log so I'm pretty sure the SIM-module can't handle the given amount of data.
Do you have any idea how I can send bigger amounts of data all at once? For energy saving purposes I would prefer if it would be possible in only a single request.
I get back a string with exactly 63 characters,
- I guess you're using SoftwareSerial, and using the sillydelay(1000)
way of waiting for a response that I see all over the place...?