I am programming the BG950AGLAA-N06-SGNSA module and I have a problem with detecting the SIM card. The module doesn’t recognize it. I initialize the module according to the documentation. After enabling the reset, the VDD pin stays high for 4.3 seconds and then switches to low. After that, I can’t detect the inserted SIM card. If I don’t reset the module after initialization, the module doesn’t respond at all. Does anyone have any suggestions on what to do to make the module detect the SIM card? Below it is my code for theinitialization of the module
digitalWrite(VCC, HIGH);
digitalWrite(MODEM_PWRKEY, LOW);
delay(500); // Allow some time for the power to stabilize
digitalWrite(MODEM_RST, LOW); // Set MODEM_RST to default low
digitalWrite(MODEM_PON, HIGH); // Set PON_TRIG (MODEM_PON) high
// Wait 50ms after setting PON_TRIG high
SerialDebug.println("Waiting 50ms...");
delay(100);
//Power on the modem through PWRKEY
SerialDebug.println("Activating PWRKEY...");
digitalWrite(MODEM_PWRKEY, HIGH);
delay(1000); // Hold PWRKEY in low state for 1000 ms
digitalWrite(MODEM_PWRKEY, LOW);
//delay(500); // Small delay to ensure PWRKEY action completes
// Send a 100ms pulse to MODEM_RST to reset the modem
SerialDebug.println("Sending 100ms pulse to MODEM_RST...");
digitalWrite(MODEM_RST, HIGH); // musi byc reset bo inaczej no response
delay(100); // Hold MODEM_RST high for 100ms
digitalWrite(MODEM_RST, LOW); // Leave MODEM_RST low -> after this command VDD is high for 4,3s
SerialDebug.println("Setup complete. Starting GSM module communication...");
// Start communication with the GSM module
SerialDebug.println("Starting SerialAT...");
SerialAT.begin(SERIAL_AT_BAUDRATE, SERIAL_8N1, MODEM_RX, MODEM_TX);
delay(3000); // Wait for the GSM module to initialize
SerialDebug.println("GSM module initialized. Checking modem...");
SerialDebug.println("Testing modem AT response...");
bool modemResponds = modem.testAT();
SerialDebug.print("Modem responds to AT: ");
SerialDebug.println(modemResponds ? "Yes" : "No");