Question

So, when I send at example "AT" via Serial, GSM always returns me ÿ char. "AT" returns ÿÿ - any one char returns one ÿ. Where is the problem? Maybe connection is wrong? Should I use any resistors and connect GSM TX also to the GND?

UPDATE: GSM responds only on CR and NL giving ÿ of each. Any ideas?

Code:

#include <SoftwareSerial.h>

#define rx 10
#define tx 11
SoftwareSerial gsm(rx, tx);

void setup()  
{
   Serial.begin(9600);
   gsm.begin(9600);
}

void loop()
{ 
    if(gsm.available())
       Serial.write(gsm.read());

    if(Serial.available())
       gsm.write(Serial.read());
}

Interfacing:

Interfacing

Was it helpful?

Solution

Problem was in the power supply. There must be at least 2 ampers.

OTHER TIPS

Sounds like your baud rate is incorrect. Have you tried 19200? Documentation from other SIM900 based boards show the default at 19200.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top