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:
Problem was in the power supply. There must be at least 2 ampers.