Re: Yet another Software Serial

@jboyton I have error compiling gSoftSerial & GSM libraries together. This is same issue i am getting with SoftwareSerial so i am trying to find some other serial library.

Arduino: 1.6.5 (Mac OS X), Board: "Arduino Uno"

gSoftSerial/gSoftSerial.cpp.o: In function __vector_3': /Users/ammritt/Documents/Arduino/libraries/gSoftSerial/gSoftSerial.cpp:223: multiple definition ofvector_3' GSM/GSM3SoftSerial.cpp.o:/Applications/Arduino.app/Contents/Java/libraries/GSM/src/GSM3SoftSerial.cpp:499: first defined here gSoftSerial/gSoftSerial.cpp.o: In function gSoftSerial::write(unsigned char)': /Users/ammritt/Documents/Arduino/libraries/gSoftSerial/gSoftSerial.cpp:252: multiple definition ofvector_4' GSM/GSM3SoftSerial.cpp.o:/Applications/Arduino.app/Contents/Java/libraries/GSM/src/GSM3SoftSerial.cpp:487: first defined here gSoftSerial/gSoftSerial.cpp.o: In function gSoftSerial::write(unsigned char)': /Users/ammritt/Documents/Arduino/libraries/gSoftSerial/gSoftSerial.cpp:252: multiple definition of__vector_5' GSM/GSM3SoftSerial.cpp.o:/Applications/Arduino.app/Contents/Java/libraries/GSM/src/GSM3SoftSerial.cpp:487: first defined here collect2: error: ld returned 1 exit status Error compiling.

ammritt: @jboyton I have error compiling gSoftSerial & GSM libraries together. This is same issue i am getting with SoftwareSerial so i am trying to find some other serial library.

This is an annoying problem with the way the Arduino core and compiler are arranged. In order to allow pin selection in the constructors each of these libraries by necessity does a "land grab" for all of the pin change interrupt vectors. If the pins you are using lie in different pin change banks you can easily fix the problem by reducing the references to the pin change vectors in each of the libraries. If the two pins share the same bank it will be more complicated since there will be just one ISR that will have to choose which library to pass the interrupt to.

Which pins are you using? What processor/board?

Board: Arduino Uno
Processor : ATmega328

I am not using any pins just including both libraries in a sketch.

#include <GSM.h>
#include <gSoftSerial.h>
void setup()
{

/* add setup code here */

}

void loop()
{

/* add main program code here */

}

ammritt: I am not using any pins just including both libraries in a sketch.

If you're not planning on connecting your Uno to anything then you should be fine. Otherwise you'll have to use pins.

But what you are attempting may not work even if we resolve the conflict over the interrupt vectors. GSM contains within it a copy of SoftwareSerial, and two software serials attempting to run at the same time isn't going to work very well, if at all. Unless they communicate at different times I think you would be advised to choose a board that has at least one available UART.

You might be able to use the Uno's single UART. But then downloading and debugging become more complicated. The easy and obvious solution is to get a Mega.

@ammritt, I would appreciate it if you would modify your original post and change the title of this Thread as it has nothing to do with my "yet another software serial"

Thanks.

...R