I'm enabling external power off warnings, as specified in section 5.22 of the AT command guide.
When I drop the supply voltage I see a LTE network disconnected message from the lte_handler, but I don't see the +CGEV: ME BATTERY LOW message.
I'm using this little chunk of code to do this, called right after modem initialization is complete:
static void XPOFWARN_Handler(void *context, const char *response) { LOG_ERR("XPOFWARN response: %s", response); } void XPOFWARN_install_handler(void) { int err = at_notif_register_handler(NULL, XPOFWARN_Handler); if (err != 0) { LOG_ERR("Can't register handler err=%d", err); } if (at_cmd_write("AT%XPOFWARN=1,31", NULL, 0, NULL) != 0) { LOG_ERR("Can't start XPOFWARN handler"); } }
The handler installs successfully, the AT%XPOFWARN=1,31 command gets an "OK" response, and I see lots of other modem responses being printed by my XPOFWARN_Handler, but not the "+CGEV: ME BATTERY LOW" response that I was expecting when I lowered the battery voltage. I do see the LTE handler indicate that the LTE connection drops, right as I drop the voltage, so the modem is noticing the voltage drop and going offline.
Any idea what's going on here? I'm using compatible modem firmware and a board with a nRF9160-SIxA-B1 module, so that shouldn't be the issue.