I have an arduino nano connected to an A7 gps + gprs module. The connections are as below;
U_RXD <=> D8 #TX
U_TXD <=> D7 #RX
PWR_KEY <=> D9
Here is a sample code for testing.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7,8); //Rx Tx
const int pwr_key = 9;
void setup() {
Serial.begin(115200);
mySerial.begin(9600);
Serial.println("Initializing...");
pinMode(pwr_key,OUTPUT);
digitalWrite(pwr_key,HIGH);
delay(2000);
digitalWrite(pwr_key,LOW);
delay(1000);
while(!mySerial.available()) {
Serial.println("Connecting...");
}
mySerial.println("AT");
delay(100);
Serial.write(mySerial.read());
}
void loop() {
//do nothing
}
The SIM I use is registered and the frequency of operation of the A7 is well within the frequency of operation of mobile network operators.
After running this code it gets stuck in the while loop meaning is has not been able to register onto any network. Is there something I am doing wrong