Easy IoT General

Problem with DFRobot_SIMclient

userHead andries.arenek 2020-03-29 01:39:35 5751 Views4 Replies
Trying to compile project that references DFRobot_SIM7000, which in turn references DFRobot_SIM.

Getting compile time errors:
Code: Select all
DFRobot_SIMcore.cpp:7:17: error: invalid conversion from 'Stream*' to 'SoftwareSerial*' [-fpermissive]
Code used (using esp8266):
Code: Select all
#include <Wire.h>
#include <DFRobot_SIM7000.h>

#define PIN_TX     7
#define PIN_RX     8
SoftwareSerial     mySerial; 
DFRobot_SIM7000    sim7000;

void setup(){    
    Serial.begin(115200);
    mySerial.begin(115200, PIN_RX, PIN_TX, SWSERIAL_8N1, false); // Default SIM7000 shield baud rate

    while(!Serial);

    Serial.println("BEFORE begin()");    
    sim7000.begin(mySerial);  
    Serial.println("AFTER begin()");        
    
    Serial.println("BEFORE turnON()");    
    sim7000.turnON();
    Serial.println("AFTER turnON()");    
}
  
void loop(){
   Serial.println("INSIDE LOOP");
}
2020-03-31 22:26:08 Thank you. I've updated my code, but it is stuck at "BEFORE turnOn()", i.e. busy turning on.
Code: Select all
#include <Wire.h>
#include <DFRobot_SIM7000.h>

#define PIN_TX     7
#define PIN_RX     8
SoftwareSerial     mySerial (PIN_RX, PIN_TX); 
DFRobot_SIM7000    sim7000;

void setup(){    
    Serial.begin(115200);
    mySerial.begin(9600);

    while(!Serial);

    Serial.println("BEFORE begin()");    
    sim7000.begin(mySerial);  
    Serial.println("AFTER begin()");        
    
    Serial.println("BEFORE turnON()");    
    sim7000.turnON();
    Serial.println("AFTER turnON()");    
}
  
void loop(){
   Serial.println("INSIDE LOOP");
}
userHeadPic andries.arenek