SIM7000E expansion shield with Arduin Lenardo

I’ve switched to Tx-8 rx-7 on shield and uploaded code example yesterday. It works and received the location of current position. But today it’s not receiving serial data from shield. just prints “Turn ON SIM7000…”
I’m using Arduino Lenardo board with external DC power Adapter(5-12V). I have copied the code down below,

#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(){
int signalStrength;
Serial.begin(115200);
while(!Serial);
sim7000.begin(mySerial);
Serial.println(“Turn ON SIM7000…”);
if(sim7000.turnON()){ //Turn ON SIM7000
Serial.println(“Turn ON !”);
}
Serial.println(“Set baud rate…”);
while(1){
if(sim7000.setBaudRate(19200)){ //Set SIM7000 baud rate from 115200 to 19200 reduce the baud rate to avoid distortion
Serial.println(“Set baud rate:19200”);
break;
}else{
Serial.println(“Faile to set baud rate”);
delay(1000);
}
}

Serial.println("Check SIM card......");
if(sim7000.checkSIMStatus()){                                //Check SIM card
    Serial.println("SIM card READY");
}else{
    Serial.println("SIM card ERROR, Check if you have insert SIM card and restart SIM7000");
    while(1);
}


Serial.println("Set net mode......");
while(1){
    if(sim7000.setNetMode(NB)){                              //Set net mod NB-IOT
        Serial.println("Set NB-IOT mode");
        break;
    }else{
        Serial.println("Fail to set mode");
        delay(1000);
    }
}

Serial.println("Get signal quality......");
delay(500);
signalStrength=sim7000.checkSignalQuality();                 //Check signal quality from (0-30)
Serial.print("signalStrength =");
Serial.println(signalStrength);
delay(500);

Serial.println("Attaching service......");
while(1){
    if(sim7000.attacthService()){                            //Open the connection
        Serial.println("Attach service");
        break;
    }else{
        Serial.println("Fail to Attach service");
        delay(1000);
    }
}

}

plz help asap its research for my degree plzz

The fact tgat it was working and now it’s not with nothing changed it’s likely not the code. You probably have some other issue. You could try uploading the code again and removing and reinstalling the board.

Shaun

1 Like

HI Shaun thanks for your reply. THe net bulb starting blink 7 times when I open serial reading.
Earlier It shows some unsuported files are in UART then I removed those. I think It’s not displaying serial data from the shield. Is there any way to check serial reading from the shield

Is there any way to reset the Shield

One thing to check before you do anything. Are you 100% it was working. These boards require an NB-IoT sim and plan. If you’re trying to use a standard 3G/4G sim it wont work. Here’s some links:
Telstra
Vodafone
Optus

2 Likes

I was using Telstra Normal 3G/4G SIM but it didnt attach services(showed signal strength, SIM ready etc… ). later I was trying to change baud rate in SIM7000 after that It shows that unsupport baud rate through serial reading. then it didnt show any data from the shield in serial reading.
I will test with NB IOT Telstra SIM.
Thank you for the valuable details

HI Shaun.
I’ve changed the “Serial.begin(9600)” in Arduino Lenardo at setup() and set the baudrate for SIM7000 object to:“sim7000.setBaudRate(19200)”.
have some changed in DFRobot_SIM7000.cpp as below
bool DFRobot_SIM7000::turnON(void)
{
pinMode(13,OUTPUT);
digitalWrite(13, HIGH);
delay(2000);
digitalWrite(13, LOW);
int i=3;
while(1){
i = 6;
delay(200);
baudrate = 19200;
setRate(baudrate);
send_cmd(“AT\r\n”);
while(i){
if(check_send_cmd(“AT\r\n”,“OK”,1,1000)){
digitalWrite(13, HIGH);
return true;
}
delay(20); // to fix Turn ON problem
i–;
}
pinMode(13,OUTPUT);
digitalWrite(13, HIGH);
delay(2000);
digitalWrite(13, LOW);
}
}

Now works well. waiting for Telstra NB-IOT SIM.
Thanks

Some times it won’t work, As a solution, when serial started to turn on SIM7000, press the Boot button twice(IF net bulb is blinking, press and hold boot button for 1.5 sec to turn off the net bulb and wait 2-3 sec and press boot button again to blink ).

The February issue of Silicon Chip features an article on page 26 using the SIM7000 shield and a Leonardo shield. They also mention the NB-IoT issue, might be worth a read.