AT command arduino sketch problem

Hello guys,
I am trying to use "Waveshare_SIM7600.h"

you can find the library here:

I am using the library, in order to write serial MQTT AT commands using the "sendATcommand()" function.
The problem is that there is no response from the module it is only printing the commands!. I think there is missing code which is software serial: include"Softwareserial" is not added in the library.

How could I fix this?

CODE:

#include "Waveshare_SIM7600.h"

int POWERKEY = 2;

char APN[] = "";
char aux_string[60];
char ServerIP[] = "
";
char Port[] = "1883";
char Publish[] = "
";
char Subscribe[] = "
";
char Message[] = "Waveshare";
char CLIENT[] = "
";
char User[] = "
";
char Pass[] = "
*";
int i = 0, j;

void setup() {

Serial.begin(115200);

sim7600.sendATcommand("AT&F", "OK", 2000);//redefine the module configurations
sim7600.sendATcommand("AT+CPIN?", "+CPIN: READY", 2000);
sim7600.sendATcommand("AT+CSQ", "+CSQ: 7,99", 2000);/check the signal
sim7600.sendATcommand("AT+CREG?", "+CREG: 0,1", 2000);
sim7600.sendATcommand("AT+CPSI?", "LTE", 2000);//check if connected to 4G
sim7600.sendATcommand("AT+CGREG?", "+CGREG: 0,1", 2000);
sprintf(aux_string, "AT+CGDCONT=1,"IP","%s"", APN);
sim7600.sendATcommand(aux_string, "OK", 2000); //APN setting
sim7600.sendATcommand("AT+CGPADDR", "+CGPADDR: 1,0.0.0.", 2000);//IP ADRESS
memset(aux_string, '\0', 30);

sim7600.sendATcommand2("AT+CMQTTSTART", "OK","+CMQTTSTART: 23", 5000); //Start MQTT
sprintf(aux_string, "AT+CMQTTACCQ=0,"%s"", CLIENT);
sim7600.sendATcommand2(aux_string, "OK","+CMQTTACCQ: 0,19", 2000); //ACCQUIRE CLIENT
delay(50);
memset(aux_string, '\0', 30);
sim7600.sendATcommand("AT+CMQTTWILLTOPIC=0,6", ">", 2000);//CONNECTION WILL TOPIC
sim7600.sendATcommand("/", "OK", 500);
sim7600.sendATcommand("AT+CMQTTWILLMSG=0,6,1", ">", 500);//CONNECTION WILL MSG
sim7600.sendATcommand("
/", "OK", 500);
sim7600.sendATcommand("at+cmqttconnect=0,"tcp://
:1883",6000,1,"",""", "+CMQTTCONNECT: 0,0", 5000);//CONNECT TO BROKER
memset(aux_string, '\0', 30);
sim7600.sendATcommand("AT+CMQTTSUB=0,6,1", ">", 2000); //SUBSCRIBE A TOPIC
sim7600.sendATcommand("
/
*", "OK", 2000);

}

void loop() {

}

Response:

AT&F
AT+CPIN?
AT+CSQ
.
.
.
.
etc

the library clearly expects the module on the Serial line.

No use of SoftwareSerial

you need to wire the module accordingly (which is pretty bad if connected at the same time to the Serial Console)


Please correct your post above and add code tags around your code:
[code]`` [color=blue]// your code is here[/color] ``[/code].

It should look like this:// your code is here
(Also press ctrl-T (PC) or cmd-T (Mac) in the IDE before copying to indent your code properly)

read how to use the forum please.

Hello J-M-L,
Thank you for the quick reply.

The serial defined in the library is the same as arduino serial not software serial so it is only printing the command!

Please know that I am new in arduino so I did not get what you mean. What should I do to add software serial.

meroata:
. What should I do to add software serial.

Rewrite the library with software serial instead of serial...
Or don’t use the serial console and connect your device on Serial

PLEASE CORRECT FIRST POST