Fail to set Baud rate for Module Sim7000C

Hi,

I uploaded the example code from DFRobot_SIM7000 to my Arduino Uno R3 that connect to module Sim7000C expansion shield
but the serial monitor display "Faile to set baut rate"

/*!
 * @file     DFRobot_SIM7000_ATtest.ino
 * @n        SIM7000 needs 7-12V DC power supply
 * @brief    This example use the serial port to send AT command to control the SIM7000
 * @n        With initialization completed, we can enter AT command to SIM7000 directly
 * @n        Common AT commands : 
 * @n        AT+CPIN? : Check SIM card
 * @n        AT+CSQ   : Check signal quality
 * @n        AT+CGATT?: Check net attached state
 * @n        AT+CSTT  : Start net connect task
 * @n        AT+CIFSR : Get local IP
 * 
 * @n        Get the AT command table in Resource folder :SIM7000 Series_AT Command Manual_V1.01.pdf
 * @n        If you use Mega please connect PIN8 PIN10 and set PIN_RX = 10
 * @n        The AT command must end with CRLF
 * 
 * @copyright   Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @license     The MIT License (MIT)
 * @author      [TangJie](jie.tang@dfrobot.com)
 * @version     V1.0.1
 * @date        2021-09-16
 * @url         https://github.com/DFRobot/DFRobot_SIM7000
 */

#include <DFRobot_SIM7000.h>

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

void setup() {
  Serial.begin(9600);
  mySerial.begin(19200);
  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);
      }
  }
  mySerial.begin(19200);
  Serial.println("For example, if you type AT\\r\\n, OK\\r\\n will be responsed!");
  Serial.println("Enter your AT command :");
}

void loop() {
  mySerial.listen();
  while(mySerial.available()){
    Serial.write(mySerial.read());
  }
  mySerial.flush();
  while(Serial.available()){
    mySerial.write(Serial.read());
  }
}

Hi,

I uploaded the example code from DFRobot_SIM7000 to my Arduino Uno R3 that connect to module Sim7000C expansion shield
but the serial monitor display "Faile to set baut rate"

/*!
 * @file     DFRobot_SIM7000_ATtest.ino
 * @n        SIM7000 needs 7-12V DC power supply
 * @brief    This example use the serial port to send AT command to control the SIM7000
 * @n        With initialization completed, we can enter AT command to SIM7000 directly
 * @n        Common AT commands : 
 * @n        AT+CPIN? : Check SIM card
 * @n        AT+CSQ   : Check signal quality
 * @n        AT+CGATT?: Check net attached state
 * @n        AT+CSTT  : Start net connect task
 * @n        AT+CIFSR : Get local IP
 * 
 * @n        Get the AT command table in Resource folder :SIM7000 Series_AT Command Manual_V1.01.pdf
 * @n        If you use Mega please connect PIN8 PIN10 and set PIN_RX = 10
 * @n        The AT command must end with CRLF
 * 
 * @copyright   Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @license     The MIT License (MIT)
 * @author      [TangJie](jie.tang@dfrobot.com)
 * @version     V1.0.1
 * @date        2021-09-16
 * @url         https://github.com/DFRobot/DFRobot_SIM7000
 */

#include <DFRobot_SIM7000.h>

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

void setup() {
  Serial.begin(9600);
  mySerial.begin(19200);
  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);
      }
  }
  mySerial.begin(19200);
  Serial.println("For example, if you type AT\\r\\n, OK\\r\\n will be responsed!");
  Serial.println("Enter your AT command :");
}

void loop() {
  mySerial.listen();
  while(mySerial.available()){
    Serial.write(mySerial.read());
  }
  mySerial.flush();
  while(Serial.available()){
    mySerial.write(Serial.read());
  }
}

the doc states

Operating Voltage: 5V (NOTE: The module will consume great amount of current immediately when connected to the network. So the external power supply is needed at work.)
Input Voltage: 7~12VDC (VIN range: 6~20V)

did you connect a separate suitable power supply to your module?

note as well they mention

Software/Hardware Serial Port Switch: Arduino UNO/Mega controllers connect USB with the hardware interface D0,D1 in default. So serial port conflicts are common when serial ports are used by the expansion shields. Considering these conflicts, SIM7000 Arduino NB-IoT/LTE/GPRS expansion shield equipped with a software serial port to communicate with Arduino. Learn more about Arduino SoftwareSerial Library.

➜ make sure the switch is set for software serial

Your two topics on the same subject have been merged. Cross posting is against the forum rules as it wastes people's time.


#include <SoftwareSerial.h>
#define rxPin 2 
#define txPin 3

SoftwareSerial mySerial(rxPin, txPin);

void setup()
{
  mySerial.begin(9600);               // SIMCOM 7000 baud rate
  Serial.begin(9600);                 // Arduino serial baud rate
  
  Serial.println("Remember to turn on the SIMCOM 7000 module, by push button or set D12 HIGH for 2 sec/pulse");
  Serial.println("Remember to energize the SIMCOM 7000 module with external power - the Arduino Uno can not provide enough");
  Serial.println("Verify that the GSM network LED is flashing. The GPS antenna must see the sky to recive");
  Serial.println("SIMCOM 7000C => C => Module made to be used in China mainland.  G is for global. I use E myself :-)");
  Serial.println("Consider ditch the Uno R3, as it only have one hardware serial. It is used for the USB connection. Uno R3 have problem parsing large amounts of data from SIMCOM 7000, f.eks GPS strings");
  Serial.println("You can set the baudrate to autobaud,  with AT command: AT+IPR=0 and it is stored. However, the SIMCOM 7000 baudrate must be set stepwise, according to: https://simcom.ee/documents/SIM7000x/SIM7000%20Series%20UART%20Application%20Note_V1.00.pdf");
  Serial.println("You must study the library DFRobot_SIM7000.h. Read the manual or ask the support. I prefer myself not use library, but send command and parse the feedback. I think it is easyer then with code, than study other peoples library");
  Serial.println("Use this code to send and recive data from serial monitor to your module, and read the response. SIMCOM 7000 AT commands is found at SIMCOM website");
}

void loop()
{
   if (mySerial.available())
    Serial.write(mySerial.read());  // Send serial data from Arduino serial to SIMCOM 7000
   
   if (Serial.available())
    mySerial.write(Serial.read());  //Send feedback from SIMCOM 7000 to Arduino serial
}

Have you tried any value other than 19200?

I tried to set baud rate ''9600 and 115200''

Did you check this?

@roypl , did you manage to make this work. Can you post the answer please?
I have the same (or similar) problem.

Hi i using same board and module! i hope it can help you

you need to check 2 things to solve it

  1. Did you set your baudrate in serial monitor same as 9600?
  2. if you setting the right baudrate then add this code on the top
    #include <SoftwareSerial.h>

I was having the same problem, and I was able to solve it that way