LG77L PMTK commands

Where can I get the list of all the PMTK commands for LG77L module?
Thanks.

Hi Jinseok_Jeon,

Please refer to section 2.3. PMTK Messages from attached Protocol Specification.

Best regards,
Meiji
Quectel_Lx0&Lx6&LC86L&LG77L_GNSS_Protocol_Specification_V2.0.pdf (544.3 KB)

Thank you so much Meiji for your quick response.

Hi Meiji,

I have another question about waking up the module from standby mode.
It goes into the standby mode with a command PMTK161. Here is the part of my Arduino code.
Serial2.println("$PMTK161,0*28");

But I couldn’t wake it up. The manual says that sending a byte to the module will wake it up so I used following line but the module won’t wake up.
Serial2.println(" ");

Could you give me an example to wake it up from the standby mode?

Thanks.

Hi Jinseok_Jeon,

Could you please try to wake it up by sending any arbitrary character(s) instead of the space? For example:

Serial2.println(“a”);

Please let us know if this helps.

Best regards,
Meiji

Meiji,

I tried that and also tried Serial2.write(45); as well. 45 was picked randomly.
None of them can wake it up from standby mode. However, from backup mode, I could wake it up by pulling the wakeup pin (FOR_ON) high.

Thanks.

Hi Jinseok_Jeon,

Could you please provide your firmware version? You can check it by sending the following command:

$PQVERNO,R*3F

Best regards,
Meiji

Hi Meiji,

After I sent that command, I got following messages.
$PQVERNO,R,LG77LNR01A02S_GLN,2020/12/18,06:03*76

If the firmware version is not the latest and that cause this issue, could you please let me know where to download the latest firmware and how to replace the firmware with the new one?

Thank you for your patient support.

Jinseok

Hi Jinseok

LG77LNR01A02S_GLN is currently the latest firmware. We’ve tested on our side with tool QCOM, and it works well to wake up the module from Standby mode.

Have you tested if it’s possible to wake the module up by sending any character via Serial tool?

Best regards,
Meiji

Hello Meiji,

Thank you for confirming the firmware is the latest one. The module I’m using is a part of Lilygo’s wrist watch - GPS version (https://github.com/Xinyuan-LilyGO/E-Paper-watch), and I’m using Arduino IDE for programming.

As I said before, I have tried to wake it up from standby mode by sending a character, a byte through serial port using the Arduino IDE, not the tool you mentioned, QCOM, which I don’t have. However, as I also mentioned before, I could wake it up from the backup mode by pulling the WAKEUP pin (#13) high, and pulled the WAKEUP pin low just before sending the command to put it into backup mode. It works well. But I just can’t wake it up from the standby mode.

I’m wondering if this is related to the reset pin (#14). I have tested it but it seems putting the reset pin high or low wouldn’t affect to the state.

I think I can use the backup mode instead, which actually save the battery even more. But I want to know why the module behaves differently for the standby mode from what it is supposed to do.

Let me give you the part of my code to put the module in standby mode and wake it up.

Putting it into standby mode
digitalWrite(GPS_WAKEUP, LOW);
Serial2.println("$PMTK161,0*28");
Waking up
digitalWrite(GPS_WAKEUP, HIGH);
Serial2.println(“a”); // I also tried to send a different character and tried Serial2.write(45);

Is there anything I’m doing it wrong?
Thanks.

Jinseok

Hi Jinseok,
QCOM_V1.6.zip (711.1 KB)

Tests on our side showed the module can be wokend up from Standby mode through arbitrary commands - which suggests the issue you met is not from firmware.
In order to figure out why your module behaves differently for the standby mode, our suggesstion on the procedure would be:
1.1) First to check on PC if it works well to wake up the module from Standby mode (without Arduino enviroment). This involves the help from a Seriral tool to send commands and receive messages ( e.g. QCOM, please check the QCOM tool from attachment.)
We need such test to decide if the problem is from the module itself, before we come to the code part for checking.
1.2) Once you can confirm the module itself functions well, please try the following code:
//Putting it into standby mode
Serial2.println("$PMTK161,0*28");
//Waking up
Serial2.println(" a");

WAKEUP pin is only applicable for backup mode, not for Standby mode.

Best regards,
Meiji

Thank you Meiji for your quick replies. I will try QCOM and let you know the result. However, the serial port from the PC is connected to the microcontroller, ESP32 and the module is connected to the microcontroller, so I don’t know whether I can use this tool or not, but I will try to find out how to do it.

Thanks.

I still can’t wake up the module from the standby mode.
I have read the hardware and protocol documents and thought I might need to use the GLP mode rather than standby mode. The document says I need to change the baud rate to 115200 before entering GLP mode. So, here is the sequence I’m thinking.

  1. From ESP32, open the serial port with 9600 bps.
  2. Send command to change baud rate to 115200.
  3. Open the port again (because its not 9600 bps anymore) with 115200 bps.
  4. Send command to enter GLP mode
    Is this correct?

Update:
I have done some tests.
First, I opened the port with 9600 bps and sent the command $PQBAUD,W,115200*43 to change the baud rate to 115200 bps. I believe the baud rate remains the same as long as the module has a backup powered. And then I loaded a code with opening the port with 115200 bps and then sent the command $PQGLP,W,1,1*21 to enter GLP mode. I got response, $PQGLP,W,OK*09, which means it’s done. I’m running the module in GLP mode with fully charged battery and will compare the battery consumption rate to the normal mode.
So, my new question is whether the baud rate and the GLP mode are permanent until I change them as long as I have the Vbackup is powered. Or should I set up the baud rate and GLP mode every time when I turn on the module?

Thanks.

J

I have done some more tests.
After the battery ran out, I could open the serial port with 115200 and the module responded as it’s still GLP mode. So, the PQBAUD command changes the baud rate and saves the setting so does PQGLP command.

With GLP mode, the battery life extends about 20%. But this is not enough for me. I still need to find a way to use the standby mode: to wake up the module from the standby mode.

J

Hi Jinseok,

From your description we don’t see anything incorrect.
If you like, you can provide (via private message) your Circuit Design Diagram to us for a check.

Best regards,
Meiji

As I said before, I’m using Lilygo’s wrist watch, GPS version. The schematic is in this folder: https://github.com/Xinyuan-LilyGO/E-Paper-watch/tree/main/schematic).
One thing just now I noticed in the schematic is that the Vbackup is tied to Vcc_IO. Would this be an issue?

Thanks.

I finally found the reason why the module was not waked up.
It seems the module requires longer time to be ready to be waked up after entered into the standby mode than I thought.
Between Standby and Wakeup commands, there must be at least 120ms of delay.
Serial2.println("$PMTK161,0*28"); // stand by mode
delay(120); // should be >120
Serial2.println(“a”); // send any character to wake up

Thanks.

1 Like