Go Down

Topic: Problem sending AT command to GSM Shield 2 to control buzzer sound level (Read 249 times) previous topic - next topic

declan_odonoghue

Hi!

I want to send the AT command "AT+CRSL=<10>" to the GSM shield. This command controls the buzzer volume, which I would like to mute. Without the GSM library, the command works as desired. However, with both GSM.h and SoftSerial.h included, an error is seen. A problem with SoftSerial.h and GSM3SoftSerial.h is listed in the errors.

A sample of the error and the code are shown below:

How can I resolve this issue and send AT commands to the GSM?



///////// Error sample ////////////

libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin): In function `SoftwareSerial::read()':

(.text+0x0): multiple definition of `__vector_3'

libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here




//////// Code ////////////

// libraries
#include <GSM.h>
#define PINNUMBER "0139"

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);


// initialize the library instance

GSM gsmAccess; // include a 'true' parameter for debug enabled
GSMVoiceCall vcs;



////////////////// Setup ////////////////////

void setup() {

  Serial.begin(9600);
  mySerial.begin(9600);

  Serial.println("Initialising");
  mySerial.println("AT+CRSL=?");

 
  // 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
    {
     
      delay(1000);
    }
  }

  // This makes sure the modem notifies correctly incoming events
  vcs.hangCall();
  Serial.println("Ready");

 
}


void loop() {
}


dannable

Search Google for: multiple definition of `__vector_3'

You will find a full explanation and remedies. No need to repeat here.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Go Up