Smart Home Automation Forum

Full Version: KC868-A4S GSM AT command debug source code for arduino IDE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[attachment=1991]

before use source code, make sure you have set the serial2 pin number by config file.
[attachment=1992]
Hello I am in the process of testing the sim7600 4G but I cannot do the tests here is my code: #define SIM7600_TX 13 // TX2 on KC868-A4S
#define SIM7600_RX 15 // RX2 on KC868-A4S

void setup() {
Serial.begin(115200);
Serial2.begin(115200, SERIAL_8N1, SIM7600_RX, SIM7600_TX);
Serial.println("? KC868-A4S connected to SIM7600!");

// Wait 2 seconds for the module to start
delay(2000);

Serial.println("Sending AT command...");
Serial2.println("AT");

// Wait for the response from SIM7600
unsigned long timeout = millis() + 3000; // Timeout of 3 seconds
while (millis() < timeout) {
while (Serial2.available()) {
char c = Serial2.read();
Serial.write©;
}
}
}

void loop() {
// Transfer of commands from PC to SIM7600
while (Serial.available()) {
Serial2.write(Serial.read());
}

// Display of SIM7600 responses
while (Serial2.available()) {
Serial.write(Serial2.read());
}
}
can you use our sample code test firstly.
I have already done this test but it
after china new year holidays, we can test it with A4S + SIM7600E
(01-31-2025, 11:51 PM)admin Wrote: [ -> ]after china new year holidays, we can test it with A4S + SIM7600E

ok but for me it's a bit urgent