Pages: [1]   Go Down
Author Topic: Arduino GSM Shield (Antenova) with GPS  (Read 2511 times)
0 Members and 1 Guest are viewing this topic.
Maine
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

  Hello All,
    I've been stuck on this issue for a long time and while there appear to be other posts with similar problems, the solutions all tend to differ depending on a number of different factors.  Of which none appear to fit my particular configuration.
    I am trying to use the new Arduino GSM Shield http://arduino.cc/en/Main/ArduinoGSMShield to transmit location coordinates to a web client from the Ultimate GPS Breakout from Adafruit http://www.adafruit.com/products/746
    Because the GSM Shield uses SoftwareSerial to communicate with the modem, it conflicts with the serial output of the GPS.  Besides tweaking the code to use AltSoftSerial, (which doesn't look particularly up-to-date), the only solution I can think of is to use a Mega/Mega ADK for its multiple hardware serial ports.  Yet all the information I've been able to find on this configuration (Mega/GPS/GSM) is designed for other GSM boards using the more common SIM900 modem.
   Has anybody had any success using a Mega's HW Serial in combination with the latest Arduino GSM Shield?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Besides tweaking the code to use AltSoftSerial, (which doesn't look particularly up-to-date), the only solution I can think of is to use a Mega/Mega ADK for its multiple hardware serial ports.

Tweaking the code to use hardware serial interface isn't that easy, you have to write a wrapper class around the HardwareSerial class to include the additional methods of the GSM3SoftwareSerial class.

The easiest solution is to strictly split the time between the two serial interfaces. Use a higher baudrate (38400) to communicate with the GSM modem to make the periods with disabled interrupts as short as possible. Don't communicate with the GSM modem while you're communicating with the GPS, you even might clean the receiving buffer of the hardware serial after you finished the communication with the GSM modem.

The main reason I haven't bought a GSM Shield from Arduino is the decision of the Arduino team to use a software serial implementation for the communication with it. Although ths works in simple setups it's a no-go for timing critical applications that have to respond to interrupts in a timely fashion.
Logged

Maine
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you,
   At least I know I'm not missing something really obvious...  It really does appear to be that complicated smiley-confuse

Quote
The easiest solution is to strictly split the time between the two serial interfaces. Use a higher baudrate (38400) to communicate with the GSM modem to make the periods with disabled interrupts as short as possible. Don't communicate with the GSM modem while you're communicating with the GPS, you even might clean the receiving buffer of the hardware serial after you finished the communication with the GSM modem.
   Again, thank you for this suggestion!  Can you or anyone else reading this recommend a good tutorial for splitting serial time interrupts?  To be clear, I'm not asking anybody to write it for me, I just haven't had any luck searching for the right resources.
  
Quote
The main reason I haven't bought a GSM Shield from Arduino is the decision of the Arduino team to use a software serial implementation for the communication with it.

I have to say... As happy as I was to finally see a branded GSM solution from Arduino, I really have to question its value when taking the price tag into consideration... Basically its only really useful for sending data from digital or analog inputs as long as the data isn't coming from the serial port and only if youre sending the data to another SIM card on the same network?  Those are some pretty heavy limitations for a +$100 piece of equipment!

EDIT  Found a promising tutorial at http://arduino.cc/en/Tutorial/TwoPortReceive.  I will post results soon.
    
« Last Edit: September 15, 2013, 01:27:55 pm by roundhouselabs » Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 617
Posts: 49463
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can you or anyone else reading this recommend a good tutorial for splitting serial time interrupts?
I don't believe that that is what was suggested. Re-read what was suggested.

You can't control how the reception of data. You can only control whether you are paying attention at the moment data arrives. Given that, it seems obvious that you don't want to not listen to either device for any extended period of time. Given that, it seems clear that different hardware (a Mega with 4 hardware serial ports) is in your future.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
IxD masters student in Ireland.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

roundhouselabs -
Have you had any luck with this yet? I seem to be in the same predicament.
 
Logged

Maine
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Have you had any luck with this yet? I seem to be in the same predicament.

   I had delayed further work on this issue in the hopes that the new Arduino Yun would include built-in support for the GSM Library within the Bridge library...  On receiving my new board, it appears my hopes were in vain...  There is however some hope that the Linux/OpenWRT portion of the board will work with a USB GSM dongle which I've already been using with a Raspberry Pi...  The Linino/OpenWRT SoC used by the YUN is similar to the TP-Link WR703N mini router for which we managed to use for GPS tracking as documented in this forum- https://forum.openwrt.org/viewtopic.php?pid=185438
   Nevertheless, I would like to think my +$100 investment in the GSM Shield has not gone to waste, so I will keep trying...
Quote
I don't believe that that is what was suggested. Re-read what was suggested.
Yes I mistyped.  
Quote
You can only control whether you are paying attention at the moment data arrives. Given that, it seems obvious that you don't want to not listen to either device for any extended period of time.
The challenge is going to be identifying
  • A. How much data needs to be transmitted
  • B. How often it needs to be transmitted
As most use cases for which the project involves fleet management for public vehicles (i.e transit busses, snowplows, schoolbusses etc...) the intervals between transmission of minimal information (i.e Lat./Long.) might give us more room than someone tracking an RC plane for example.  Another advantage to our use scenario is that most public vehicles either operate along a fixed route or within a limited jurisdiction.  In such cases, we might be able to take advantage of the fact that routes have usually been planned around a series of waypoints.
  I wonder if a better approach would be to configure the device more like a datalogger with a set of geolocated triggers telling the device to send the last logged position?  This way we could select how much data to transmit and when to send it according to the strength of the signal, and even incorporate different formats like mesh or wifi depending on the terrain?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, have the same problem. Conflicts between both libraries. Tried to solve it by commenting out the PCINT0 and PCINT1 vector part in GSM3softwserial.cpp and commenting out the PCINT2 vector part in Softwareserial.cpp as described in   http://purposefulscience.blogspot.com/2013/06/arduino-gsm-shield-tips.html paragraph on sotwareserial issues but  the I have since this correction other err msgs starting with:
GSM\GSM3ShieldV1ClientProvider.cpp.o: In function `GSM3ShieldV1ClientProvider::flushSocketContinue()':
C:\Program Files\Arduino\libraries\GSM/GSM3ShieldV1ClientProvider.cpp:251: undefined reference to `GSM3SoftSerial::spaceAvailable()'
GSM\GSM3ShieldV1ClientProvider.cpp.o: In function `GSM3ShieldV1ClientProvider::readSocket()':
C:\Program Files\Arduino\libraries\GSM/GSM3ShieldV1ClientProvider.cpp:221: undefined reference to `GSM3SoftSerial::spaceAvailable()'
GSM\GSM3ShieldV1ClientProvider.cpp.o: In function `GSM3ShieldV1ClientProvider::disconnectTCP(bool, int)':
C:\Program Files\Arduino\libraries\GSM/GSM3ShieldV1ClientProvider.cpp:157: undefined reference to `GSM3SoftSerial::spaceAvailable()'
GSM\GSM3ShieldV1ModemCore.cpp.o: In function `GSM3ShieldV1ModemCore::delayInsideInterrupt(unsigned long)':
C:\Program Files\Arduino\libraries\GSM/GSM3ShieldV1ModemCore.cpp:197: undefined reference to `GSM3SoftSerial::tunedDelay(unsigned int)'

ETC; any one has a clue on how to solve??
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I am attempting a device that consists of :

ARDUINO UNO
ARDUINO GSM
EM408 GPS Shield + GPS

---

The purpose.

To send location data after is activated every 10 minutes over GSM as SMS messages with lat/long data from the GPS

---

The problem.

Conflict between the digital pin given the SoftwareSerial.cpp and GSM3SoftSerial.cpp

---

What i've tried.

I have tried to make the GPS work on pins 0 and 1.

I have modified the libraries to work on GSM (pins 2 and 3) and on GPS (pins 0 and 1) by commenting the PCINT'X'_vect within the cpp s.

Now, since there is no clear thing on how to make the GSM on other pins I said that the only way would be to make the GPS do that.

But after i comment PCINT2_vect in <Software Serial< or the <GSM3SoftSeriale the one that doesn have it available stops working). On the other hand if I let them not commented in both places I get the well known errors of conflict.

Now. What I would see as next attempts and questions for you guys :

1. Is there a clear way around this yet ? (had to try smiley-razz ...)

2.. Is there a way to split the time pin 2/3 is used between the devices (libraries) ? (that is way over my head at this point but i try it if t is the way)

3. Since I dont need to send the data super fast as i get it, can't I get the GPS data and after delete/reset everything and send data via SMS. Any thoughts on this matter, cause it's a software issue not a hardware one, because I CAN do that hardware with a couple of relays but that problems are the checks done at compile regarding the libraries.


Thank you for any help... Im running out of options here.... smiley-sad

Any help appreciated.

All the best,
Alex
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
The problem is not difficult to overcome. It requires you to use AltSoftSerial.
A full working example is shown here
http://www.mallinson-electrical.com/shop/gpsgsm
Hope this helps
Logged

Pages: [1]   Go Up
Jump to: