Arduino Nano and GSM 0308-71 Communication Problems

Hi guys,

I am a novice arduino user. I'm trying to communicate with an Enfora GSM module via the serial pins on my arduino nano.

Arduino Pins - GSM Pins
3.3v VCC
GND GND
Rx RXD
Tx TXD
DTR and RTS pins pulled up through 100k Resistor.

I am trying to send a basic AT command to see if my arduino is communicating, but I keep receiving random numbers back.

Below is the code;

void setup()
{
Serial.begin(115200);
delay(5000);
Serial.println("AT");
delay(5000);
}
void loop(){
Serial.flush();
Serial.print(Serial.read());
delay(2000);
}

Can anyone help??

Thanks in advance.

What version of the IDE are you using?

What do you think Serial.flush() is doing?

serial.flush is there justs to make sure the serial data has finished transmitting.

Then, wouldn't it make sense to do that AFTER there is something to send?

but I keep receiving random numbers back.

It might be helpful to see those "random numbers".

I couldn’t find documentation for your module (I couldn’t identify it) so this is not going to help, but the Nano has a 5V logic level, meaning that even if you power the module from the 3.3V output of the nano it will still receive 5V on the TXD pin, so I wonder whether your physical configuration is based on a reliable source.

The same for the baud rate of 115200, which looks pretty high for this kind of devices.