You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I trying to get it to join my sim provider network and send TCP request. My Operator is Telenor Danmark
here is the Serial Output
18:09:07.450 -> AT+CFUN=1
18:09:07.484 -> AT+CPIN?
18:09:12.023 -> Init Success, please call or send SMS message to me!
18:09:12.092 -> AT+CSTT="internet","",""
18:09:17.046 -> AT+CIICR
18:09:22.056 -> AT+CIFSR
18:09:27.043 -> Sim808 join network error
18:09:29.062 -> AT+CSTT="internet","",""
18:09:34.077 -> AT+CIICR
18:09:39.068 -> AT+CIFSR
18:09:44.084 -> Sim808 join network error
here is my code
`#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>
So I trying to get it to join my sim provider network and send TCP request. My Operator is Telenor Danmark
here is the Serial Output
18:09:07.450 -> AT+CFUN=1
18:09:07.484 -> AT+CPIN?
18:09:12.023 -> Init Success, please call or send SMS message to me!
18:09:12.092 -> AT+CSTT="internet","",""
18:09:17.046 -> AT+CIICR
18:09:22.056 -> AT+CIFSR
18:09:27.043 -> Sim808 join network error
18:09:29.062 -> AT+CSTT="internet","",""
18:09:34.077 -> AT+CIICR
18:09:39.068 -> AT+CIFSR
18:09:44.084 -> Sim808 join network error
here is my code
`#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>
//#define PIN_TX 10
//#define PIN_RX 11
//SoftwareSerial mySerial(PIN_TX,PIN_RX);
//DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,
//make sure that the baud rate of SIM900 is 9600!
//you can use the AT Command(AT+IPR=9600) to set it through SerialDebug
DFRobot_SIM808 sim808(&Serial);
char http_cmd[] = "GET /admin/Scripts/submit?x=8.869531&y=56.414029 HTTP/1.0\r\n\r\n";
char buffer[512];
void setup(){
//mySerial.begin(9600);
Serial.begin(9600);
//******** Initialize sim808 module *************
while(!sim808.init()) {
delay(1000);
Serial.print("Sim808 init error\r\n");
}
delay(3000);
Serial.println("Init Success, please call or send SMS message to me!");
//*********** Attempt DHCP *******************
while(!sim808.join(F("internet"),F(""),F(""))) {
Serial.println("Sim808 join network error");
delay(2000);
}
//************ Successful DHCP ****************
Serial.print("IP Address is ");
Serial.println(sim808.getIPAddress());
//*********** Establish a TCP connection ************
if(!sim808.connect(TCP,"My.website", 80)) {
Serial.println("Connect error");
}else{
Serial.println("Connect success");
}
//*********** Send a GET request *****************
Serial.println("waiting to fetch...");
sim808.send(http_cmd, sizeof(http_cmd)-1);
while (true) {
int ret = sim808.recv(buffer, sizeof(buffer)-1);
if (ret <= 0){
Serial.println("fetch over...");
break;
}
buffer[ret] = '\0';
Serial.print("Recv: ");
Serial.print(ret);
Serial.print(" bytes: ");
Serial.println(buffer);
break;
}
//************* Close TCP or UDP connections **********
sim808.close();
//*** Disconnect wireless connection, Close Moving Scene *******
sim808.disconnect();
}
void loop(){
}`
The text was updated successfully, but these errors were encountered: