BG96 issue detecting networks

Hi Quectel forum,
I’m working with Arduino UNO connected by the Shield in my BG96. I’ve found some issues when I tried to attach a private mobile network. First of all, the BG96 reply the IMSI and QCCID when I send the appropiate commands, but when I send:

AT+COPS?
AT+CREG?

bg96 response me with:

+COPS: 0
+CREG: 0,4

bg96 indicates me that there are not any network available for connecting it, and that’s not true.
I don’t understand why happens this and how I can solve it. Another issue I’ve is in the commands fields when string is needed like AT+CGDCONT, is it mandatory writting the select between “”??. I’ve some problems in this aspect because the instruction I send to the ATresponse function is a String, and is not willing to write a String inside another String.
I know it would be hard to understand but I don’t know how I can explain more my troubles, I appologize for it.
PS: I send you too my Arduino’s code when my AT command’s sequence I write appears and a picture of the AT commands’ responses I receive. Whether you will help me, I appreciate a lot.

Arduino code:

#include <SoftwareSerial.h>
#include <ATcommands.h>
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define UART_RX 10 // Serial PIN RX connection
#define UART_TX 11 // Serial PIN TX connection
#define WIDTH_DISPLAY 128 // ancho pantalla OLED
#define HEIGTH_DISPLAY 32 // alto pantalla OLED

SoftwareSerial mySerial(UART_RX, UART_TX);
Adafruit_SSD1306 screen(WIDTH_DISPLAY, HEIGTH_DISPLAY, &Wire);

void setup() {
  Serial.begin(9600);
  mySerial.begin(9600);
  Serial.println("Welcome to use NB-IoT Shield QG96");
  
  ATresponse("AT+IPR=9600;&W", 1000);
  ATresponse("ATI", 1000);
  ATresponse("AT+CIMI", 1000);
  ATresponse("AT+QCCID", 1000);
  ATresponse("AT+CFUN=1", 1000);
  ATresponse("AT+COPS?", 1000);
  ATresponse("AT+CGREG?", 1000);
  ATresponse("AT+CGDCONT=1,IP,m2m.movistar.es", 1000);
  ATresponse("AT+CGDCONT?", 1000);
  ATresponse("AT+CGATT=1", 1000);
  ATresponse("AT+QCSQ", 1000);
  ATresponse("AT+CGACT=1,1", 1000);
  ATresponse("AT+CGPADDR=1", 1000);
  ATresponse("AT+CGDCONT?", 1000);      
  // ATresponse("AT+", 1000);      
}

void loop() {   
  //Nothing here
}

void ATresponse(String AT, int wait){
  // The function extract the AT command response and specified 
  // a delay between different commands 
//  mySerial.flush();
  mySerial.println(AT+"\r\n");
  delay(wait);
  updateSerial();
}
                                                                              
void updateSerial(){
  while (mySerial.available()) {
    Serial.write(mySerial.read()); //Forward what Serial received to Software Serial Port
  }
  // while (Serial.available()) {
  //   mySerial.write(Serial.read()); //Forward what Serial received to Software Serial Port
  // }  
}

AT commands’ responses:

AT+IPR=9600;&WOKATIQuectelBG96Revision: BG96MAR02A07M1G
OK
AT+CIMI
214074309576665
OK
AT+QCCID
+QCCID: 8934071500005028241F
OK
AT+CFUN=1
OK
AT+COPS?
+COPS: 0
OK
AT+CGREG?
+CGREG: 0,4
OK
AT+CGDCONT=1,IP,m2m.movistar.es
ERROR
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.
AT+CGATT=1
(*do not response me anything more after the previous line*)

Dear emartican,

Based on your desription and arduino code , You module has not registered network yet .

  1. As your said, the cell network is private network , so I can not confirm , what APN is right APN , pls touch to the operator of this network and get the right APN name and set it via AT+cgdcont

2.To check the status of register network .

at+cereg?;+cgreg?;+cops?;+qcsq;+qnwinfo

AT+QMBNCFG=“DEACTIVATE”

AT+QMBNCFG=“autosel”,0

reboot module, then try these command again:

AT+CGDCONT?

AT+CGCONTRDP

AT+COPS?

AT+CIMI

AT+QCSQ

AT+QMBNCFG="LIST‘

AT+QCFG=“emmcause”

  1. For more detail , pls kindly open the blow link ,and read the related Doc .

https://cnquectel-my.sharepoint.com/:f:/g/personal/ae-fae_quectel_com/EjtNKp0uv4dIvPLPhnjfHn4BlgbpsmFdr_wTXim8cUW0Pw?e=GtbO1U

1 Like