Hi, I am working with A7 Ai-thinker Module and Arduino UNO. I have some problems.
When I send AT through Serial Monitor, the module does not respond OK. Its response is AT.
This is mi code
#include <SoftwareSerial.h>
SoftwareSerial A7Module(2, 3); //Rx Tx
void setup()
{
A7Module.begin(19200);
Serial.begin(19200);
delay(100);
}
void loop()
{
//Envíamos y recibimos datos
if (Serial.available() > 0) {
char a;
a = Serial.read();
A7Module.print(a);
}
if (A7Module.available() > 0) {
char b;
b = A7Module.read();
Serial.print(b);
}
}
Someone can help me?
The conecctions are:
UTXD ------> RX Arduino
URXD------>TX Aduino.
Thanks
Thank you, but I can't solve my problem, it is frustrating.
I wrote this code, for incoming calls and sms and it working very well.
But when I try to communicate with my module sending AT or another command, it doesn't work. I send AT and I hope receive OK but I receive AT.
#include <SoftwareSerial.h>
SoftwareSerial A7Module(2, 3); // RX TX
char incoming_char = 0;
void setup() {
//digitalWrite(9, HIGH); // Uncomment to enable card power by Software
//delay(1000);
//digitalWrite(9, LOW);
delay (5000); //Turn on GPS and Sim card
A7Module.begin(19200);
Serial.begin(19200);
delay (1000);
// A7Module.println("AT + CPIN = \"XXXX\""); //AT command to enter the PIN of the card
delay(25000); //Time to find a network
A7Module.print("AT+CLIP=1\r");
delay(1000);
A7Module.print("AT+CMGF=1\r"); //Set text mode to send and receive messages
delay(1000);
A7Module.print("AT+CNMI=2,2,0,0,0\r"); //Set module to print sms
delay(1000);
Serial.println("OK");
}
void loop() {
if (Serial.available() > 0) {
char a;
a = Serial.read();
A7Module.print(a);
}
if (A7Module.available() > 0)
{
incoming_char = A7Module.read();
Serial.print(incoming_char);
}
}
Ezequiel1506:
Thank you, but I can't solve my problem, it is frustrating.
I wrote this code, for incoming calls and sms and it working very well.
But when I try to communicate with my module sending AT or another command, it doesn't work. I send AT and I hope receive OK but I receive AT.
You mean you can communicate with the module using 19200 to call and SMS? That is really weird, it is supposed to only communicate in 115200 by default.
Do you have any USB-Serial converter to directly try out the communication?
No, I don't have.
And yes, I can communicate but when I try to communicate sending AT through Serial Monitor, the module does not respond OK. Its response is AT.
Ezequiel1506:
No, I don't have.
And yes, I can communicate but when I try to communicate sending AT through Serial Monitor, the module does not respond OK. Its response is AT.
The A6/A7 uart has the ability to adapt to your first AT command. That is why you can communicate with 19200. The first time you send AT, the module will catch the baud and adjust its with that.
The AT you got from the module is called echo. By default it will echo every character you send. There is an AT command to cancel it: ATE=0
has anyone solved this problem.? I can make calls via pins 0, 1 .. and get GPS data , (not at the same time) But no luck texting at 115200, 9600 , 57000, or 4800..