Osura Weerasinghe
Osura Weerasinghe

Reputation: 83

Meaning/purpose of AT+CGNSCMD command

What AT+CGNSCMD command do? in the user manual, it say "Send command to GNSS" is it mean send command to GNSS system or somethig else.

Thanks.

Upvotes: 1

Views: 768

Answers (1)

Anze
Anze

Reputation: 706

The AT+CGNSCMD is an AT command which takes two arguments, and sends a PMTK command to the chip.

  1. The first argument will be 0 (string) or 1 (hexadecimal) meaning the format of the char array which follows (second argument).
  2. The second argument is going to be a "PMTK" command, which is compatible with the SIM808 GNSS decoder, in either char array or hex array format.

A typical useful example could be changing the NMEA string (GPS Data) update rate (PMTK command type 220). To see it in action, first set the test mode on (which streams all the updates through UART to the serial monitor) with this AT command:

AT+CGNSTST = 1

now sending the following PMTK command (through the stated AT coomand) we will change the interval between updates to 200ms:

 AT+CGNSCMD=0,"$PMTK220,200*2C"

Many more useful PMTK commands can be found on this pdf file. Still, be careful, I don't know which commands will be compatible with your chip!

Upvotes: 1

Related Questions