httpGET not returning numdata or savind output on results variable.
Closed this issue · 8 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. On Arduino 1.0.1, open the Library_Client example the is distributed with
the package.
2. Configure the service provider GPRS details.
3. Upload the sketch to Arduino Uno and watch the serial monitor.
What is the expected output? What do you see instead?
It is expected that,m when the "numdata=inet.httpGET("www.google.com", 80, "/",
msg, 50);" is executed, the variable "numdata" is filled with the number of
bytes transfered and the "msg" array with the output of the SIM900 module.
Instead, both variables are not being updated, but I can confirm that the
SIM900 is returning data if I watch the software serial output.
What version of the product are you using? On what operating system?
Library v304
Arduino 1.0.1
Arduino Uno
Ubuntu 12.10
Original issue reported on code.google.com by sergio.o...@gmail.com
on 20 Jan 2013 at 11:00
GoogleCodeExporter commented
I got the same problem.
Library v304
Arduino 1.0.2
Arduino Mega
Mac OS X
Any news about this issue?
Original comment by ori.re...@gmail.com
on 22 Feb 2013 at 9:32
GoogleCodeExporter commented
I got the sema problem too. In rare cases connects and gets an IP, many others
do not, but whether they connect or not, never gets numdata or msg.
suggestions?
Original comment by frithmat...@gmail.com
on 2 Mar 2013 at 12:37
GoogleCodeExporter commented
Try with new ver. It should be fixed
Original comment by martines...@gmail.com
on 8 Mar 2013 at 10:31
- Changed state: Fixed
GoogleCodeExporter commented
CODE:
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
InetGSM inet;
char msg[200];
int numdata;
char inSerial[50];
int i=0;
boolean started=false;
void setup()
{
Serial.begin(9600);
Serial.println("GSM Shield testing.");
if (gsm.begin(2400)){
Serial.println("\nstatus=READY");
started=true;
}
else Serial.println("\nstatus=IDLE");
if(started){
if (inet.attachGPRS("claro.com.br","claro", "claro"))
Serial.println("status=ATTACHED");
else Serial.println("status=ERROR");
delay(1000);
gsm.SimpleWriteln("AT+CIFSR");
delay(5000);
gsm.WhileSimpleRead();
numdata=inet.httpGET("it.wikipedia.org", 80, "/", msg, 200);
Serial.println("\nNumero di byte ricevuti:");
Serial.println(numdata);
Serial.println("\nData recived:");
Serial.println(msg);
}
};
void loop()
{
}
OUTPUT:
GSM Shield testing.
status=READY
status=ATTACHED
10.79.196.158
Numero di byte ricevuti:
200
Data recived:
Original comment by nelson.s...@lancefinal.com.br
on 15 Mar 2013 at 2:33
GoogleCodeExporter commented
There is no Data recived....
Original comment by nelson.s...@lancefinal.com.br
on 15 Mar 2013 at 2:35
GoogleCodeExporter commented
here i am getting the data received but no in variable msg. if i remove this
part still will write the data received:
Serial.println("\nNumero di byte ricevuti:");
Serial.println(numdata);
Serial.println("\nData recived:");
Serial.println(msg);
this is because in SimpleRead is writing this. anyway to get this in msg to be
able to get this in variable and do whatever i need to do with this?
Thanks
Original comment by carlosan...@gmail.com
on 19 Mar 2013 at 3:39
GoogleCodeExporter commented
This issue section is not longer supported.
Please check the support page www.gsmlib.org
Original comment by martines...@gmail.com
on 6 Jul 2013 at 11:27
GoogleCodeExporter commented
You need to modify the length for the internal communication buffer in the
GSM.h library!!
#define COMM_BUF_LEN 768
Original comment by rafabouf...@redes.ufsm.br
on 14 Feb 2014 at 6:14