No socket recv() while gnss active?

I have TCP client socket and a thread blocking on `recv()`. I noticed that while gnss is active (trying to get a fix without any assistance), no data is received until I call `send()` (on the same socket) from another context/thread. I suspect data is cashed at the modem, as I can wait at several minutes before calling send and then all data (sent from server a long time ago) is read.

Is this a known issue or am I doing something wrong? Is there a workaround?

More info:

  • modem firmware: mfw_nrf9160_1.3.1
  • nrfxlib revision: v2.0.0
  • PSM is enabled and active
  • works as expected when gnss is disabled.
  • tried using poll before recv but got the same behavior.
Parents Reply
  • AFAIK, it's not possible to have the GNSS receiver and the modem active at the same time. Usually the modem communication takes precedence and when the modem sleeps (or is in RRC idle), the GNSS gets activated. Once the GNSS is active, the modem is not longer able to receive data. That requires to pause the GNSS and activate the modem again. Sending data triggers that.

    If you search the forum, you will find a lot of ideas around that.

Children
Related