# Getting response from A9G board

**URL:** <https://forum.arduino.cc/t/getting-response-from-a9g-board/1234074>\
**Category:** Programming\
**Created:** [March 11, 2024, 10:28am UTC](https://forum.arduino.cc/t/getting-response-from-a9g-board/1234074 "2024-03-11T10:28:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eonalive](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eonalive](https://forum.arduino.cc/u/eonalive)\
**Post date:** [March 11, 2024, 10:28am UTC](https://forum.arduino.cc/t/getting-response-from-a9g-board/1234074/1 "2024-03-11T10:28:11Z")

</div>

I am using Arduino UNO with A9G board. I am not getting the "OK" response through the code. When i tried through USB to TTL converter, I am getting OK response.  
Expected: "OK"  
Getting: "No response from GPS module!"

```arduino
#include <SoftwareSerial.h>

// Define software serial communication pins
const int gpsRxPin = 7;
const int gpsTxPin = 8;

// Create software serial object
SoftwareSerial gpsSerial(gpsRxPin, gpsTxPin);

void setup() {
  // Initialize serial communication for debugging (optional)
  Serial.begin(9600);

  // Begin communication with GPS module at 9600 baud
  gpsSerial.begin(9600);
  delay(1000);
}

void loop() {
  // Check for available data from GPS module
  gpsSerial.println("AT");
  delay(1000);
   
  if (gpsSerial.available()) {
    String response = gpsSerial.readStringUntil('\n');
    Serial.println("Response: " + response);
    if (response.indexOf("OK") != -1) {
      Serial.println("AT command successful!");
    } else {
      Serial.println("AT command failed!");
    }
  } else {
    Serial.println("No response from GPS module!");
  } 
  delay(1000);
}

```

---

<div class="post-metadata">

**Author:** ![sherzaad](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sherzaad/32/226173_2.png) [@sherzaad](https://forum.arduino.cc/u/sherzaad)\
**Post date:** [March 11, 2024, 10:53am UTC](https://forum.arduino.cc/t/getting-response-from-a9g-board/1234074/2 "2024-03-11T10:53:58Z")

</div>

based on the tutorial [here](https://wiki.dfrobot.com/A9G_Module_SKU_TEL0134) maybe try something like this:  
(Compiles, NOT tested!)

```arduino
#include <SoftwareSerial.h>

// Define software serial communication pins
const int gpsRxPin = 7;
const int gpsTxPin = 8;

// Create software serial object
SoftwareSerial gpsSerial(gpsRxPin, gpsTxPin);

void setup() {
  // Initialize serial communication for debugging (optional)
  Serial.begin(9600);

  // Begin communication with GPS module at 9600 baud
  gpsSerial.begin(9600);
  // Check for available data from GPS module
  gpsSerial.println("AT+RST=1"); ////=1 software reset,=2 power off
  delay(1000);
}

void loop() {
   
  if (gpsSerial.available()) {
    while (gpsSerial.available()){
      char c = gpsSerial.read();
      Serial.print(c);
    } 
  } else {
    Serial.println("No response from GPS module!");
  } 

  delay(1000);
}

```

hope that helps...

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 7, 2024, 10:54am UTC](https://forum.arduino.cc/t/getting-response-from-a9g-board/1234074/3 "2024-09-07T10:54:56Z")

</div>

Closed on September 7, 2024, 10:54am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
