Hi Folks!
I'm pulling my hair out at this point, although in truth there isn't much to begin with.
I'm using an OSEPP Uno R3 Plus and a Waveshare GSM/GPRS/GPS Shield(B).
I've inserted an AT&T Sim Card that has been tested and works.
RX and TX jumpers are RX=2, TX=3.
The Shield has Power and the power light is on.
The Uno is powered from the USB connected to my computer where I download the firmware.
UART Select is all the way to the right as shown in the photo (although I've tried it at all three settings.
I've tried probably 15 different variations of code to see if I can get a basic "AT" command to respond without any luck.
I've removed the shield from the Uno and wired it, in case I was missing something.
I've tried every combination know to man of Software Serial RX and TX values.
I've read everything I can online on blogs and community forums and followed as I understand it.
I've tried everything I could on TinyGSM.
I'm wondering if I just have a bad shield or if I'm making a rookie error.
Any and all guidance greatly appreciated.
Sean.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(4800);
Serial.print("Initializing hardware..\n");
while (!Serial)
{
Serial.print(".");
delay(10);
}
Serial.print("Initializing SoftwareSerial..\n");
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
delay(200);
}
void loop() // run over and over
{
Serial.print("Main Loop\n");
delay(2000);
mySerial.println("AT");
delay(200);
mySerial.println("AT");
delay(200);
if( mySerial.available()>0 )
{
Serial.write(mySerial.read());
}
Serial.print(mySerial.read());
Serial.print("\n");
}
the GSM/GPRS/GPS_Shield_(B) states a baud rate of 115200 your code sets mySerial to 4800 - have you tested with 115200?
SoftwareSerial does not work well at 115200baud - I would suggest using an Arduino with a hardware serial port
Yes, I spent about three days at 115200, but then read a post that stated that SoftwareSerial worked better at lower rates. The recommendation was 4800, so I tried that recently.
Cannot figure out why the board won't at least respond.
if the Waveshare GSM/GPRS/GPS Shield is transmitting at 115200baud a receiver at 4800 will probably not display anything (you may get garbage displayed)
I suggest using a Mega with hardware ports at 115200baud
In each loop, you send 2 AT commands and read only 2 characters from the serial (only 2 calls to read).
After each command, you must wait for the response
mySerial.println("AT");
while(!mySerial.available()); // wait for chars
while(mySerial.available()) Serial.write(mySerial.read());
Xartefact,
I did read it as best I can and my understanding is:
This is the UART Select. I put that to D1. (meaning Pin 1 is the TX,Pin0 is the RX on the Uno)
This is the UART Config.
-I put the yellow connector on Pin0 between TX and the common since I'm matching it with the RX on the Uno underneath.
Similarly I pit the second connector on Pin1 between RX and the common pin, since I'm matching it with the TX on the Uno underneath.
This is connecting IOREF and 5V.
I've changed the sketch to:
SoftwareSerial mySerial(0, 1); // RX, TX
.......because Pin0 is RX on the Uno, and Pin1 is TX
Also moved the baud rate to 115200 per another poster's recommendation.
And yet still nothing coming out of the board when I run the TinyGSM utilities. Picture of board attached.
I know I'm out of my depth here and would really appreciate any guidance.
pin 0 and 1 are used for serial communication (it's the Serial object)
You can use them as inputs and/or outputs but you loose the ability of serial communication.
Try to configure other digital pins than 0 and 1. (go back to default 2 & 3)
Use this skecth to begin