Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problema scheda T-SIM 7672G V1.0 #216

Open
PIERLUIGI1983 opened this issue Jan 27, 2025 · 4 comments
Open

Problema scheda T-SIM 7672G V1.0 #216

PIERLUIGI1983 opened this issue Jan 27, 2025 · 4 comments

Comments

@PIERLUIGI1983
Copy link

I HAVE PURCHASED SEVERAL CARDS, WHEN TRYING THE EXAMPLES PROVIDED, THE SENDING OF SMS WORKS CORRECTLY, WHILE THE EXAMPLE FOR RECEIVING SMS DOESN'T WORK, JUST AS THE EXAMPLE FOR MAKING A NUMBER RING DOESN'T WORK, WHAT CAN I DO?

@lewisxhe
Copy link
Contributor

lewisxhe commented Jan 27, 2025

Have you read the README ?

Image

Image

Image

@PIERLUIGI1983
Copy link
Author

MI STA DICENDO CHE LA SCHEDA NON SUPPORTA I SMS E LE CHIAMATE; SE è COSI PERCHE RIESCO AD IVIARE SMS ?

@PIERLUIGI1983
Copy link
Author

con questo codice, riesci a leggere i SMS in arrivo
if (gsmSerial.available()) {
String response = gsmSerial.readString();
Serial.println("Risposta dal modulo GSM:");
Serial.println(response);

// Controlla se è arrivato un nuovo SMS
if (response.indexOf("+CMTI:") != -1) {
  int indexStart = response.indexOf(",") + 1;
  int msgIndex = response.substring(indexStart).toInt();

  // Legge il messaggio ricevuto
  readSMS(msgIndex);
}

}
}

void readSMS(int msgIndex) {
Serial.print("Leggo l'SMS all'indice ");
Serial.println(msgIndex);

// Invia il comando AT+CMGR per leggere l'SMS
gsmSerial.print("AT+CMGR=");
gsmSerial.println(msgIndex);
delay(1000);

// Stampa la risposta del modulo GSM
while (gsmSerial.available()) {
msg = gsmSerial.readString();
Serial.println("Contenuto SMS:");
Serial.println("msg");Serial.println(msg);
}

}

void sendATCommand(String command) {
gsmSerial.println(command);
delay(1000);

// Stampa la risposta dal modulo GSM
while (gsmSerial.available()) {
String response = gsmSerial.readString();
Serial.println(response);
}
}

@lewisxhe
Copy link
Contributor

lewisxhe commented Feb 6, 2025

Only base stations that support SGS servic can use the SMS function. You said you can send SMS, so the base station you use should support SGS servic. Try to write ATDebug for fault debugging. After starting up, send AT OK, wait for SMS Done, then send SMS from another number to the modem to see if there is any message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants