ArduinoGeneral

SIM7000e serial connection

userHead Account cancelled 2018-07-05 13:16:01 4735 Views2 Replies
Hi,

I just received a SIM7000E Arduino NB-IoT/LTE/GPRS/GPS Expansion Shield and have it connected to Arduino with Telstra Sim in Australia. Connected via Arduino Usb to PC and 12V 2A power supply to UNO.

I have been running the AT Sketch and able to use most AT commands. I can see the device is connected to the network both via AT and the online sim control center.

Overnight however I am unable to communicate with the device via serial both Arduino serial and Putty.

When resetting device I get "Turn on SIM7000.........." however then there seems to be no connection. In Putty you can't even type command into window. Not sure if this has something to do with baud rate. I am using software serial on Uno with switch set to D7 and D8.

I am new to this and trying to debug it seems that it gets stuck at turnON() which is where baudrate changes are made in DFRobot_SIM7000 code as Some added Serial.println() get to there but no further not even an else in turnON()

The Net Led blinks about 11 times fast the 4 times slow (suspect connected) then about 12 seconds with nothing (suspect disconnected) which the online sim monitoring seems to agree with. Yesterday when able to communicate over serial was maintaining constant connection to network.

This is the Sketch I have been using.

Is there a reset to factory as such method for this board?
Code: Select all
 /*
  * File  : DFRobot_SIM7000_ATtest.ino
  * Power : SIM7000 needs 7-12V DC power supply
  * Brief : This example use the serial port to send AT command to control the SIM7000
  *         With initialization completed, we can enter AT command to SIM7000 directly
  *         Common AT commands : 
  *         AT+CPIN? : Check SIM card
  *         AT+CSQ   : Check signal quality
  *         AT+CGATT?: Check net attached state
  *         AT+CSTT  : Start net connect task
  *         AT+CIFSR : Get local IP
  *         Get the AT command table in Resource folder :SIM7000 Series_AT Command Manual_V1.01.pdf
  * Note  : If you use Mega please connect PIN8 PIN10 and set PIN_RX = 10
  *         The AT command must end with CRLF
  */
#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);
    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);
        }
    }
    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());
    }
}
2018-08-02 16:22:24 Have you confirmed that if 2G is still available in your area of your SIM card carrier? userHeadPic robert.chen
2018-07-28 19:59:44 I seem to have the exactly this problem. userHeadPic marijnvanoverveld