Is there some mechanism to subscribe to unsolicited modem responses?

SDK 2.0.0, nrf9160, modem fw 1.3.2

We are effectively running the GNSS sample and the MQTT sample in separate threads.  We are interested in seeing the modem temperature (via AT%XTEMP=1 command).  This command seems to enable periodic notifications of the form %XTEMP: N,M

Is there a way for one of my threads to register a "callback" that is executed when the %XTEMP string is received from the modem and delivers that %XTEMP: N,M to me?

We saw the nrf_modem_at_cmd_filter_set, but that looks like it is intercepting commands going to the modem rather than processing responses from the modem.

Thank you.

Parents Reply
  • Yes, it does seem like AT monitor is what I am looking for.  We started with the AT Monitor sample and it ran showing us the +CEREG and %CESQ messages.

    We modified it by adding another AT_MONITOR() for "XTEMP" (the monitor library uses strstr() for filtering) and did a nrf_modem_at_printf("AT%%XTEMP=1"); to enable perioding reporting.  This returned "OK".  We never saw an XTEMP message.  We even tried changing the AT_MONITOR filter to ANY.  And we enabled debug messages in the AT monitor library -- it never received an "%XTEMP" message from the modem.

    Does the modem ever send those %XTEMP notifications?  It doesn't seem to.

    Thank you.

Children
Related