using GSM shield without Arduino GSM library (AT commands?)

You can post your problem related to Proteus Projects here. We will try our best to help you out.
Post Reply
Robinson
Posts:12
Joined:Fri Mar 03, 2017 11:06 am
using GSM shield without Arduino GSM library (AT commands?)

Post by Robinson » Fri Mar 03, 2017 11:07 am

Hi,
I've assembled a data logging unit with an RTC module, LCD (i2c) display, SD memory card shield and Arduino GSM/GPRS shield on Arduino Uno R3.

Since the sketch was too big for Arduino, I removed some of not used GSM library (Mockup, SMS, Voice, ModemVerification,MultiClientProvider, MultiServerProvider, ScanNetwork) moving all related files in a new folder.
I checked on a separate sketch that having removed those files did no affect the GPRS connection and data transfer with GET method works perfectly.

The sketch compiles well, but goes out of memory and it doesn't run.

Is there a way to avoid using GSM library? reducing so far memory usage to what I actually need? maybe with AT commands (I don't know much how they work).

Thanks for any help.

Junaid_Shahid
Posts:110
Joined:Tue Feb 14, 2017 9:00 am

Re: using GSM shield without Arduino GSM library (AT commands?)

Post by Junaid_Shahid » Fri Mar 03, 2017 11:09 am

Robinson wrote:
Fri Mar 03, 2017 11:07 am
Hi,
I've assembled a data logging unit with an RTC module, LCD (i2c) display, SD memory card shield and Arduino GSM/GPRS shield on Arduino Uno R3.

Since the sketch was too big for Arduino, I removed some of not used GSM library (Mockup, SMS, Voice, ModemVerification,MultiClientProvider, MultiServerProvider, ScanNetwork) moving all related files in a new folder.
I checked on a separate sketch that having removed those files did no affect the GPRS connection and data transfer with GET method works perfectly.

The sketch compiles well, but goes out of memory and it doesn't run.

Is there a way to avoid using GSM library? reducing so far memory usage to what I actually need? maybe with AT commands (I don't know much how they work).

Thanks for any help.
Put this code in your Arduino and enter AT commands with Serial Monitor:

Code: Select all

#include <SoftwareSerial.h>
#include <string.h>

char incoming_char = 0;
SoftwareSerial cell(2,3);

void setup()
{
  // Initialize serial ports for communication.
  Serial.begin(9600);

  // Reset
  Serial.println("Start Reset");
  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);
  delay(12000);
  digitalWrite(7, LOW);
  delay(1000);
  Serial.println("End Reset");  

  cell.begin(9600);

  Serial.println("Enter your AT commands (with CR & NL)...");
}

void loop()
{
  if(cell.available() > 0)
  {
    incoming_char = cell.read();
    if((incoming_char >= ' ') && (incoming_char<='z'))
      Serial.print(incoming_char);
    else
    {
      Serial.print("%");
      Serial.print((int) incoming_char);
      Serial.print("%");
      if(incoming_char == 10)
        Serial.println();
    }
  }

  if(Serial.available() > 0)
  {
    incoming_char = Serial.read();
    cell.print(incoming_char);
  }
}
Source:
SEND SMS WITH SIM900D IN PROTEUS ISIS

Post Reply