Go Down

Topic: GSM shield only works with USB cable connected (Read 907 times) previous topic - next topic

camueller

I'm using a EFCom GSM shield on a Arduino Leonardo. Since the GSM shield only supports D0...D4 I have linked TX->D10 and RX->D11 via cable.
On the software side I'm using the GSM-GPRS-GPS-Shield-3.07.1 library to perform periodic HTTP GET requests.
In GSM.cpp the pins are configured accordingly:

Code: [Select]

#define _GSM_TXPIN_ 10
#define _GSM_RXPIN_ 11


The sketch performing the HTTP GET request was taken mostly from one of the library examples and looks like this:

Code: [Select]

    turnOnGsm();
   
    boolean started;
    if (gsm.begin(9600)) {
      Serial.println(F("\nstatus=READY"));
      started=true;
    }
    else Serial.println(F("\nstatus=IDLE"));
 
    if(started){
      int attached = inet.attachGPRS("internet.telekom", "tm", "tm");
#ifdef DEBUG_UPLOAD
      if (attached)
        Serial.println(F("status=ATTACHED"));
      else
        Serial.println(F("status=ERROR"));
#endif
      delay(1000);

      //Read IP address.
      gsm.SimpleWriteln("AT+CIFSR");
      delay(5000);
      //Read until serial buffer is empty.
      gsm.WhileSimpleRead();

      const int dummyLen = 0;
      char dummy[dummyLen];
      httpGET(dummy, dummyLen);
    }
     
    turnOffGsm();


The sketch works well as long as the Leonardo is connected via USB cable to the PC and to an additional power supply (9V, 660mA).
If the Leonardo is only connected to the PC via USB initial communication works as long as the GSM shield switched to full power for GSM transmission (for which the USB port does not provide enough amps).
If the Leonardo is only connected to the power supply it does not seem to be able to communicate with the GSM shield. Even if I add an additional power supply to the USB port.
To my understanding the the Atmel chip directly communicates with the GSM shield also if SoftSerial is used. However, my experience suggests that the serial connection to the PC is required as well in order to let them communicate. Obviously I'm doing something wrong ?!?!

nikhiljoji

If you are connecting GSM module via cables Check if your connections are wright..

RX of shield to TX of Arduino ( leonardo TX is 1st pin)
TX of shield to RX of arduino ( leonardo RX is 0th pin)
GND of arduino to GND of shield
and supply voltage to the sheild ...
If you are connecting this way you can communicate via serial

Go Up