0

I've tried a pretty standard code but the Serial Monitor yields zero response.

Using a standard Arduino Uno (tried a second one as well, just to be sure) and am now trying the second shield with this code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

void setup()
{
  Serial. begin(9600);
 mySerial.begin(9600);


}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}    

There is nothing coming back whatsoever in the serial monitor (yep, I checked the baud rate and tried several others).

Any ideas?

What should I be seeing if anything?

1

What should I be seeing if anything?

Usually, a GSM module will not send (unsollicited) messages. Everything it sends will be an response to an received message.

Try sending AT (with a new line/carriage return (depending on the GSM module)) to the GSM module, it will send something like AT OK or just OK

And you didn't set the pin directions (output/input), might be doen by the serial libraries, but beter be safe if you're not sure.

Also check your wiring (jumpers on UART multiplexer in this case?) and share it with us, Rx/Tx wiring often gets messed up :) If your GSM module has a USB connection, you might even test it with a terminal (taking out the Arduino in the middle, thus any wiring/code between.)

I also suggest you change the name of the serial connection to the GSM to something like gsmSerial rather than mySerial (which could be anything).

Be sure the 3G shield has enough power (amperes), otherwise they might reset when attempting to make an connection. (Put the external supply in the Arduino, rather than USB powered)

1

I have one, and I haven't figured out how to get it to accept input, but have received responses. Here are some things to try:

  • Make sure you have your jumpers set for D2 and D3. Just telling software serial to look at 2 and 3 doesn't mean your board is jumpered that way.

    • Also, remember that Tx for the board = Rx on the arduino and in your code. Software serial is (rx, tx), so (2,3) means your board will be jumpered with tx on 2 and rx on 3.
  • There are four LEDs on the board. If all four aren't lit, the board is powered down, and won't do anything.

    • First, make sure your power switch is set right - "VCC Switch", by the USB connector, is set to the power level of your board. I'm using an Uno at 5V, so for me that's set to 5V.
    • It's best to provide power through your barrel connector on your Arduino and connection through the USB. GSM modules are power hogs.
    • With all of that plugged in, your board should show two lights, the first and third.
    • Now hit the "PWR" button. The second light will come on dimly, then stronger. Now the module has power.
    • Finally, the fourth light will come on when the module has detected network. At that point, the 5216 will start sending you messages.
  • You need to make sure your baudrate is set properly. Anything less than a Mega can't handle communication at 115200, which is the default for the module. At best, you'll set both Serial and SoftwareSerial for 115200 baud, and you'll get mostly correct characters from the board, but an occasional bad character.
  • Here are some great instructions for changing the default baudrate at Github from some JeanBritz
    • One caveat to those instructions: make sure you have your Itead board powered by the Uno before plugging into the mini USB.

Here's a bit of light at the end of the tunnel for you - what you'll see when it's sending properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.