Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A4S GSM AT command debug source code for arduino IDE
#2
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());
}
}
Reply


Messages In This Thread
RE: KC868-A4S GSM AT command debug source code for arduino IDE - by Denilson - 01-29-2025, 08:46 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)