Easy IoT is a simplest IoT Solution presented by DFRobot
By andries.arenek
#40875
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");
}
By nana.wang
#40891
Hi, sorry for inconvenience caused.
Thank you for your support and feedback.
The engineer is checking the wiki page and github library.
We will update it and feed you back ASAP.
By andries.arenek
#40900
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");
}
By nana.wang
#40908
Hi, got it.
Please note that the module SIM7000 requires a 7-12V external power supply. And please switch the hardware and software serial control switch to TX-D8, RX-D7.