Go Down

Topic: modem IMEI not detected (Read 2533 times) previous topic - next topic

Kyntox

Hi everyone.

I am using an arduino uno board with GSM shield 2 (just bought it).

I have external supply from jack 12v and 1500mA working fine.

The sim card is working fine.

I use arduino IDE 1.8.5.

I use the code provided by getting started example:

Code: [Select]
// import the GSM library
#include <GSM.h>

// PIN Number
#define PINNUMBER "2103"

// initialize the library instance
GSM gsmAccess(true);     // include a 'true' parameter for debug enabled
GSMScanner scannerNetworks;
GSMModem modemTest;

// Save data variables
String IMEI = "";

// serial monitor result messages
String errortext = "ERROR";

void setup()
{
  // initialize serial communications
  Serial.begin(9600);
  Serial.println("GSM networks scanner");
  scannerNetworks.begin();

  // connection state
  boolean notConnected = true;

  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER)==GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  // get modem parameters
  // IMEI, modem unique identifier
  Serial.print("Modem IMEI: ");
  IMEI = modemTest.getIMEI();
  IMEI.replace("\n","");
  if(IMEI != NULL)
    Serial.println(IMEI);

  // currently connected carrier
  Serial.print("Current carrier: ");
  Serial.println(scannerNetworks.getCurrentCarrier());

  // returns strength and ber
  // signal strength in 0-31 scale. 31 means power > 51dBm
  // BER is the Bit Error Rate. 0-7 scale. 99=not detectable
  Serial.print("Signal Strength: ");
  Serial.print(scannerNetworks.getSignalStrength());
  Serial.println(" [0-31]");
}

void loop()
{
  // scan for existing networks, displays a list of networks
  Serial.println("Scanning available networks. May take some seconds.");

  Serial.println(scannerNetworks.readNetworks());

    // currently connected carrier
  Serial.print("Current carrier: ");
  Serial.println(scannerNetworks.getCurrentCarrier());

  // returns strength and ber
  // signal strength in 0-31 scale. 31 means power > 51dBm
  // BER is the Bit Error Rate. 0-7 scale. 99=not detectable
  Serial.print("Signal Strength: ");
  Serial.print(scannerNetworks.getSignalStrength());
  Serial.println(" [0-31]");

}


I get the following result on the serial monitor:

Code: [Select]
GSM networks scanner
Modem IMEI: 0
Current carrier: 0
Signal Strength:  [0-31]
Scanning available networks. May take some seconds.

Current carrier: 0
Signal Strength:  [0-31]
Scanning available networks. May take some seconds.


It looks like I can't connect to my modem. Any idea why ?

Greetings,

L.

Kyntox

I would like to add that I can send and recieve sms correctly.

georgejzf

I would like to add that I can send and recieve sms correctly.
I had the same question with you.

Go Up