Go Down

Topic: Connecting SIM5320E 3G shield to Uno/Mega (Read 327 times) previous topic - next topic

amirf

I have attached Pin 10 and 11 of the Arduino board to RX and TX of the 3G shield. The shield tested separately shows the network operator name and phone number of the Sim card but all Im getting from Arduino is continuously saying "Not Connected".

This is the sample Arduino code. I dont see any reference to Pin 10 and 11. Is this automatic for RX and TX function?

this is the board Im using:

http://wiki.keyestudio.com/Ks0287_keyestudio_SIM5320E_3G_Module_(Black)


and this is the Arduino code:

Code: [Select]


/ import the GSM library
#include <GSM.h>

// PIN Number
#define PINNUMBER ""

// 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]");

}

 

pert

When using the standard Arduino GSM library on the Mega, pin 10 will be used for RX and pin 3 will be used for TX.

When using the standard Arduino GSM library on the Uno, pin 2 will be used for RX and pin 3 will be used for TX.

Note that the GSM library was written for use with the Arduino GSM shield. I have no clue whether that library is compatible with your GSM module because I have never worked with it (or any GSM).

References:

amirf

#2
Jan 17, 2019, 07:35 am Last Edit: Jan 17, 2019, 11:14 am by amirf
I tried it but from Arduino I only get "Not connected".
This is the message from software the vendor sent. Not sure if it indicates it is working or simply reads the data from SIM card.

AT+COPS?
+COPS: 0,0,"Telstra Mobile",2
OK

amirf

I could get the board to make call directly from this software installed on WIndows 10:
https://m2msupport.net/m2msupport/download-at-command-tester/

But I get "Not Connected" from Arduino using Pin 1,2 or 3 and 10 combinations.

Go Up