AT+QGPSLOC freezing modem occasionally

I have noticed that after a BG95M3 modem reboot there is a small chance that issuing a GPS location AT command (AT+QGPSLOC) will cause the modem to not respond to any further AT commands. The only way to reestablish communication is to do another reboot.

The first time I issue the AT+QGPSLOC=2 command I see the echoed command, but no response. Then my MCU retries this command and no echoed command or response is returned. In fact, I could even send AT to it (which normally sends OK response) and I will get nothing. So I do another reboot and everything works fine.

I only see this once every dozen or so modem reboots, but appears this GPS command has a small chance of freezing the modem the first time it is issued after a reboot. Once frozen the modem has to be reboot either manually or by an MCU. This can cause issues in my product so I have developed a lot of work around code to detect this issue and then perform another reboot, but obviously I am not fixing the real problem. Has anyone else experienced this issue?

I suggest you weld the main serial port (TxD, RxD), send the command manually and watch the output; I think it might be due to a stack overflow of the data you define in the MCU.