GSM module A7670C-LASL sim registration problem

Subject: Help Required: A7670C-LASL GSM Module - Network Registration Issue

Hello everyone,

I’m currently working with a Xiao ESP32S3 and an A7670C-LASL GSM module to send data from the ESP32S3. However, I’ve encountered a persistent issue with the AT+CREG? command.

Whenever I check the network registration status using AT+CREG?, I consistently receive the response (0,6), which indicates that only message services are available on the SIM card. Interestingly, I can still make voice calls, but I am unable to connect to the internet or fetch any data.

Additionally, the response to the AT+CSQ command shows a signal quality value above 15, followed by 99, which I understand might indicate signal quality or network issues, but I’m unsure how to proceed from here.

I have been troubleshooting this issue for the past 6 days, and despite my efforts, I am still unable to achieve a network registration status of (0,1) (indicating full network registration for data services).

Could anyone provide guidance on how to resolve this issue and change the registration status from (0,6) to (0,1)? Any help or advice on how to proceed would be greatly appreciated.

Thank you!

This is the code:
#include <HardwareSerial.h>

#define SerialGSM Serial1
#define BaudrateGsm 115200
#define GSMRXPin 3
#define GSMTXPin 4

// Please update number before test
#define PHONE_NUMBER "+911234567890"

void sim_at_wait() {
delay(100);
while (SerialGSM.available()) {
Serial.write(SerialGSM.read());
}
}

bool sim_at_cmd(String cmd) {
SerialGSM.println(cmd);
sim_at_wait();
return true;
}

bool sim_at_send(char c) {
SerialGSM.write(c);
return true;
}

void sent_sms() {
sim_at_cmd("AT+CMGF=1");
String temp = "AT+CMGS="";
temp += (String)PHONE_NUMBER;
temp += """;
sim_at_cmd(temp);
sim_at_cmd("Test message");

// End charactor for SMS
sim_at_send(0x1A);
}

void call() {
String temp = "ATD";
temp += PHONE_NUMBER;
temp += ";";
sim_at_cmd(temp);

delay(20000);

// Hang up
sim_at_cmd("ATH");
}

void setup() {
delay(20);
Serial.begin(115200);
Serial.println("\n\n\n\n-----------------------\nSystem started!!!!");

// Delay 8s for power on
delay(8000);
SerialGSM.begin(MCU_SIM_BAUDRATE, SERIAL_8N1, GSMRXPin, GSMTXPin);

// Check AT Command

sim_at_cmd("ATI"); // Check if the module responds
delay(1000);

sim_at_cmd("AT+CIPSHUT"); // Shut down any previous IP session
delay(2000);

sim_at_cmd("AT+COPS=0"); // Register to network automatically
delay(1000);

sim_at_cmd("AT"); // Basic check
delay(500); // 0.5-second delay for quick response

sim_at_cmd("AT+CNMP=38"); // Set network mode (if applicable for your module)
delay(1000);

sim_at_cmd("AT+CSQ"); // Check signal quality
delay(500);

sim_at_cmd("AT+CPIN?"); // Check SIM card status
delay(500);

sim_at_cmd("AT+CREG?"); // Check network registration status
delay(1000);

sim_at_cmd("AT+CGATT?"); // Check if GPRS is attached
delay(1000);

sim_at_cmd("AT+CGACT?"); // Check if PDP context is activated
delay(1000);

sim_at_cmd("AT+CSTT="internet""); // Set APN (adjust APN as needed)
delay(3000); // Longer delay to allow APN connection

sim_at_cmd("AT+CIICR"); // Activate GPRS
delay(3000); // Additional delay for reliable connection

sim_at_cmd("AT+CIFSR"); // Get local IP address (if successful connection)
delay(1000);

sim_at_cmd("AT+CIPMUX=0"); // Set single connection mode (adjust if needed)
delay(500);

sim_at_cmd("AT+CIPSPRT=0"); // Disable prompt for data sending
delay(500);

sent_sms();

call();
}

void loop() {
if (Serial.available()) {
char c = Serial.read();
SerialGSM.write(c);
}
sim_at_wait();
}