Unable to connect to SIM card in 4G module.

Wireless communications in Waspmote, topologies, node types...
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Unable to connect to SIM card in 4G module.

Post by libelium-dev » Wed Nov 06, 2019 10:01 am

Hi,

Please upload the following code, then open the Serial monitor and at the bottom of the window select Carriage return. Now wait around 20 seconds and introduce the following commands at the upper part of the serial monitor. Please share with us the answer of the module.
  • AT
  • AT+CMEE=2
  • AT+CPIN?

    Code: Select all

    void setup()
    {  
      // init USB port
      USB.ON();
      USB.println(F("Bridge between USB port and SOCKET1"));
    
      Utils.setMuxSocket1();
      
      // begin serial communication
      beginSerial( 115200, SOCKET1);
      
      // switch on 3G/GPRS or expansion board in SOCKET1
      pinMode(GPRS_PW, OUTPUT);
      digitalWrite(GPRS_PW, HIGH);
      pinMode(DIGITAL6,OUTPUT);
      digitalWrite(DIGITAL6,HIGH);
      delay(1000);
    
      serialFlush(0);
      serialFlush(1);
      USB.ON();
    }
    
    
    void loop()
    {   
      // UART1 ----> UART0 (USB)
      while( serialAvailable(1) > 0 ) 
      {
        // print
        printByte(serialRead(1),0);       
      }
    
      // USB (UART0) ----> UART1
      while( serialAvailable(0) > 0 ) 
      {
        // print 
        printByte(serialRead(0), 1);
      } 
    }
    
    Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest