Cannot send commands to GPS Air530

I recently bought a Gps Air530.
Retrieving NMEA sentences goes fine but when i try to send a command to it, i don’t get any response, not even an error message.
I’ve seen more people struggling with this but i haven’t seen any answer yet.

Does SeedStudio have a solution for this?

Thanks,
Roel

You are receiveing NEMA output. That means there is nothing wrong with your GPS module and wiring. Since, your GPS is not responding to AT commands, I suggest checking if there is a baud rate mismatch. Also make sure that you are sending the commands in correct format.

By the way, if you ever need proteus libraries for generic GPS modules, you can find here:

GPS Library for protues is no-go… just FYI ,Link is 404 man…
PJ

I would start with the wire connections, You check the port with loopback wires or any port tests, What is the default baud rate? If you getting good strings back then I would look at the Transmit side of the port and loop it back to be sure it’s coming out, You have software or Hardware flow control enabled?
Xon/Xoff = Software, RTS/CTS or DTR/DSR = Hardware. Or NONE.

can you post a pic of the setup , I’m ordering an Air530 for testing but won’t have it for a few days or a week? So press on
HTH
GL :slight_smile: PJ


PJ,
the layout is very simple: just connected the Grove cable from the gps to a Grove board with the Arduino . And in the configuraton of the Arduino, i only see a baud rate. But the cable only has Rx and TX so it must be Xon/Xoff.

I don’t have hardware to connect Serial1 to another computer port to check what comes out. As technician i would like to figure out such things. As customer and simple Arduino user, i would expect that it would not be needed to go into such details
I tried the example of Grove - GPS (Air530) | Seeed Studio Wiki but it doesn’t describe how to configure the thing.

The manual that Seed publishes, basically just the datasheet of the chip, is in Chinese but someone was so kind to translate it: Heltec_AB02S_Mods/Air530 GPS Manual Text English.pdf at master · sivaelid/Heltec_AB02S_Mods · GitHub
And that shows commands like $PGKC243*2A which should return a similar line with the current NMEA lines that are given. I entered that in a minimal sketch(see below) but it doesn’t give any response.

void setup(void)
{
Serial.begin(115200);
Serial1.begin(9600);
Serial.println("\nSetup\n");
while (Serial1.available()){
Serial1.read();
}
Serial1.print("$PGKC243*2A\r\n")
}

void loop(void)
{
while (Serial1.available()) {
char c = Serial1.read();
Serial.print(c);
}
}

what i forgot to mention: why do i want to send command to the GPS?

the gps sends all its NMEA sentences, over 9600 baud, at a frequency of 1Hz. Every second, it spend 0.7s on sending the data,so i receie positions at a rather low rate and with some delay, i’d like to get it faster.
The chip can do much better than this; to get there, you have to modify some of its settings.

But… i didn’t buy a chip, i bought a Grove board. Maybe the intention of the Grove board is just to demonstrate the basic function of the gps, and, as tepalia02 said, that works. Or maybe there is another reason why on the Grove board, the chip cannot be configured.

On the other hand, the sketch on the wiki contains lines:
if (Serial.available()) // if data is available on hardware serial port ==> data is coming from PC or notebook SoftSerial.write(Serial.read()); // write it to the SoftSerial shield

The example on the wiki uses SoftwareSerial on pin 2,3 instead of the hardware Serial1, don’t now why. Of course I tried exactly that sketch as well but no effect.

Nice, I’ve ordered the last one…so.
Looks like it is connected properly, I would set baud rates the same , just for testing.
The "Grove " is only the connection format and sizes . I’m not a fan because of the proprietary nature of it, Hard to get the connectors and pins. Kind of large also, IMO.
However you can usually find every dongle, sensor or trinklet’ with a grove connector for $$ than most without. but I digress.
So pin 8 sends the NEMA data out to the Arduino at 9600 I see, I get the one second timing.
It is PIN 9 then to send data to it, be sure those white and yellow cable line up.
You send a string with checksum and CR &LF
Ascii or HEX?
OK, so you send it a Query for the Nema data interval First? I think you need to send it the Start or Respond to commands first, but I would test with a terminal and TTL to USB direct first. with something like super terminal. What kind of Arduino is that?
You’ll get it , your close.
HTH
GL :slight_smile: PJ

HI, guys.
I received the GPS AIR530 connected it up to the XIAO expansion board’s UART Grove connection. I loaded the code attached and plugged in, After some seconds it started streaming the data to the monitor, Next I fired up the older version of (ver.22.07) U center mentioned in the WIKI and configured it to connect to the Xiao port 21 , Data Started to stream and populate the screens.
I added a Google Maps (Free) API Key to the preferences and It displayed the correct location ON SPOT.
I can send configuration changes no problem with the U center App, Restart the GPS and Everything appears to work fine. Picking up 10 Satellites from inside house at dinning room table next to a window.
The Checksum for the commands MUST be correct for it to accept the cmd.
HTH
GL :slight_smile: PJ

/*
  GPS pass data Serial test (from serial port tester)

  Receives from the main USB serial port, sends to the (Serial 1) port.
  Receives from serial port 1(GPS AIR530), sends to the USB main serial (Serial 0).

  This example works on Xiao Nref52840 Sense (serial1)port pins 7,8

  The circuit:
  - GPS AIR530 serial device attached to Serial port 1
  - USB Serial Monitor open on Serial port (this one is port 21)
  - Once you get data then try the U center app (older version )
  - add free Google API key to prefrences to get the whole experiernce. total time 30 minutes
  

void setup() {
 Serial1.begin(9600);
  Serial.begin(9600);
  while (!Serial);
  delay(1000);//relax...Get Ready for serial port
  Serial.println();
  Serial.println("Power ON \n ");  // Let's BEGIN!!
Serial1.print("\r");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
  }
}





You need to eliminate the possibilities one by one. First open up the Arduino IDE and serial monitor. No need to run any sketch. Just connect the GPS to your MCU board, set the baud rate and you shall see NMEA messages on the serial monitor. Then you type the commands (try other) in the serial monitor and see if they pass through.

JP, thanks, nice story.
I also got the data properly received and interpreted in U-Center.
But what did you exactly do to send commands to the GPS?
Via the Configuration View, i saw a response to a coldstart command, but with other commands, i didn’t see much happening and most of them i also don’t recognize from the 530 manual. Of course, this gps isn’t a u-blox 5, maybe only some of them work (coincidently?)
When you say that “the checksum must be correct”, it sounds like you entered the commands somewhere manually. Where did you enter them? Do you have an example that worked?

Regards,
Roel

Yea, It’s “PJ” like “PEE JAY” btw,

Anyway Yes, I was able to turn on and off ,Remove GxGSV sentence and Only get Long/Lat in the output also change the sample rate to 5hz etc. You can send commands & messages to the module by u-blox or in HEX from a serial port, You can save the config to it as well. You can also see what HEX command strings look like with proper checksum , u-center has everything you need , I configure the options I want in there then save the config and Done.
You can send the HEX from the Serial Monitor in the IDE to the module also. I wouldn’t want to deprive you of thrill of discovery on your own ,so here is what I can point you in,
HTH
GL :slight_smile:
PJ

Here is a link you :index_pointing_at_the_viewer: need to read and understand in order to become the wizard of GPS/GSM :stuck_out_tongue:
This one Also…

Hi PJ,
I’m sorry for misconfiguring your name, hope it didn’t remind you of someone you don’t want to be confused with… ;–)

Thanks for your explanation. What your are saying is basically that everything works with you and that there is much more i could learn about GPS. I fully agree with both statements, but what i was looking for was actually just a repeatable sequence of steps that work with you, just to check if exactly the same sequence has the same effect in my situation.

From your story, i understand that this Air530 gps obeys the binary UBX command which are specified for U-Blox gpses and that i probably should forget about the text-based $PGKC commands that its own manual talks about.
That sounds strange but it brings me further that repeatedly trying to send the GKC commands to it. Following the u-center dox, via configuration view, i managed to disable GSA and GSV sentences. But when i try to disable other ones, like ZDA, the selection of ‘message’ jumps back to ‘F0-02 NMEA GxGSA’.
Changing the frequency to 2Hz also worked.
So by this, at least i know that commands get sent to the gps and that (sometimes) the gps even responds to it.
But it is not yet so clear why it responds to command meant for another type of gps and not to its own commands. Or did you get similar results with the $PGKC… commands from the manual?

bye
Roel

LoL, Yea No Worries Unless your that n :woman_with_headscarf:un from Military School?
but I digress,
You can see the HEX of the commands sent if you use configuration view and enable it under UBX.
It. The Air530 isn’t 100 U-box 8 protocol compliant so that’s why just the basic NEMA configs work.
The PK commands would be in a U-blox wrapper and would never work that way. It’s been a little while and I moved along in the location portion working with Long & Lat with no GSV data of my project.

I was using the dev board and serial to serial program to see the config commands.

You can send them with a terminal program directly to the module using USB to TTL Serial converter also.
The other link is useful as some of the commands are more compatible with this and other braded modules.
I had some hex strings to send to turn on and off GSV data, You can see them inside u-center.
HTH
GL :wink: PJ