Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By abdurino
#32864 Connected GSM Neoway M590.
With external power 5V its work perfect on Arduino Uno, but same not work properly in ESP8266.

Neoway M590:
edge 1 - 5V external,
2 - gnd external+gnd esp8266,
7 - gsm TX->gpio 12
8 - gsm RX->gpio 13

At commands ok, register in network ok, sometime send sms )
but not receive sms and after some time module not respond or unregister network.

Tried connect TTL 5V->3.3V on RX/TX, but in this case not work even at commands.

Any ideas? May be somebody already solve all problems by this module?
Softwareserial library in attach.
+70001111111 replace on your phone.

Code: Select all
#include <SoftwareSerial.h>

SoftwareSerial mySerial(12, 13); // RX, TX (7 tx->12) (8 rx -> 13)

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);  //скорость порта
  Serial.println("GSM tester v1.0");
  mySerial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  String str;
 
  if (mySerial.available()) {  //если GSM модуль что-то послал нам, то
    str = mySerial.readStringUntil('\n');
    Serial.println(str);
  }
  if (Serial.available() > 0) {
    str = Serial.readStringUntil('\n');

    if (str =="send sms") {
      send_sms("+70001111111", "test sms");
    } else {
      //Serial.println("at command");
      mySerial.println(str);
    }   
    //Serial.println(str);
  }
}

void send_sms(String phone, String text) {
  mySerial.println("AT+CMGS=\"" + phone + "\"");
  delay(500);
  mySerial.print(text);
  delay(500);
  mySerial.print((char)26);
  readModem();
  delay(500);
  Serial.println("SMS send complete");
  delay(2000);
}

void readModem() {
  String str;
  if (mySerial.available()) {  //если GSM модуль что-то послал нам, то
    str = mySerial.readStringUntil('\n');
    Serial.println(str);
  }
}
You do not have the required permissions to view the files attached to this post.