Neo 7 GPS power save mode help

I am using the following sketch;

#include <TinyGPS++.h>
TinyGPSPlus gps;


void setup(void) {

  Serial3.begin(9600);

}
void loop()
{
  gpsWaitFix (2);

}
bool gpsWaitFix(uint16_t waitSecs)
{
  //waits a specified number of seconds for a fix, returns true for good fix
  uint32_t endwaitmS;
  uint8_t GPSchar;
  uint32_t endFixmS;
  Serial.print(F("Wait GPS Fix "));
  Serial.print(waitSecs);
  Serial.println(F(" seconds"));

  endwaitmS = millis() + (waitSecs * 1000);

  while (millis() < endwaitmS)
  {
    if (Serial3.available() > 0)
    {
      GPSchar = Serial3.read();
      gps.encode(GPSchar);
    }
    if (gps.location.isUpdated() && gps.altitude.isUpdated() && gps.date.isUpdated())
    {
      endFixmS = millis();
      Serial.println(endFixmS);//record the time when we got a GPS fix

      Serial.print(gps.location.lat(), 6);
      Serial.print(F(","));
      Serial.println(gps.location.lng(), 6);

      return true;
    }
  }
  return false;
}

Which works fine but I want to active power save (from another switch input).

I understand from the Neo DOCs Neo Specs that I can use the command UBX-RXM-PMREQ.

Does anyone know how to implement this and sleep and wake up the GPS? Ideally I want the sleep mode to save some power but still wake and be able to do a hot fix.

Ublox produce a software tool for a PC called u-center.

You can use it to see the string of bytes you need to send to the GPS to implement the UBX-RXM-PMREQ command.

Thanks Srnet. I did find that and now have it running.

I can see I can open message windows and see the bytes to send (as in serialWrite).

My confusion is; in the image attached which appears to be the basic turn on and off, its sets a time period for each then just seems to reset to the original state so how do I keep it on or off?

Also this mode doesnt seem to save much power.

Are there other modes?

That is the correct command, to learn how to 'turn off' the GPS note that the datasheet for that command says ;

"Duration of the requested task, set to zero for infinite duration"

Note also that after the command is sent any byte you then send to the GPS will wake it up.

With that command the GPS current should fall to around 25uA or so.

Great thanks for clarifying.

Last question. In the message right at the end....

0000  B5 62 02 41 08 00 10 27 00 00 02 00 00 00 84 CC  µbA'Ì

What are those characters and I guess I don't need them?

Thanks again for the help

Kev

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