Not really. But I can't think of any other explanation than the modem not being properly reset on reboot. Maybe try toggling the 'lte_reset' gpio switch on system reboot?
There are also those "lte-pwrkey" and "lte-power" gpio-hogs, which I didn't see any reason to expose as switches. Maybe I missed the point? You could try to remove them from the device tree and export them to userspace instead, so makeing it possible to toggle the outputs.
Not really. It's sort of on my todo-list to look at it. But don't expect that to happen any time soon...
The easiest fix is probably a shutdown script putting the modem into reset. It can simply do
echo 1 >/sys/class/gpio/gpio483/value
No need to disable the reset line again. The boot scripts will fix that.
But some care should be taken to avoid killing the modem on firmware upgrades. I just don't know how we should do that. Worst case is someone rebooting the NR7101 while the modem is writing to its internal flash.
Maybe we could do a simple AT or QMI command ping before resetting? And just skip the reset if we can't get a response from the modem? Skipping the reset on some unknown error should be harmless. Worst case is that you end up like now -having to boot a second time.
Could this additionally or alternatively be viewed as a deficiency in ModemManager since ModemManager just sits there in an error state without attempting to reboot the modem?
I don't think so. This is related to the hardware design making it posible to reboot the host without resetting the modem. MM cannot be expected to know anything about that. And there is no generic reset it can use even if it realised that a reset is required. The GPIO reset is obviously specific to this system only. It's not for MM to touch, IMHO.
The init.d mechanism already includes shutdown functionality as described here, and I noticed that the network init.d script at /etc/init.d/network already includes such a shutdown() call with:
shutdown() {
ifdown -a
sleep 1
}
and so I tried simply appending the line to set gpio483 to '1' to this call, as follows:
shutdown() {
ifdown -a
sleep 1
echo 1 >/sys/class/gpio/gpio483/value
}
And indeed this ensures the modem is in a good state every reboot.
To make this conditional on some condition not associated with firmware upgrade, I'm not sure how to best query the modem: uqmi -d /dev/cdc-wdm0 --get-data-status does not go via proxy and gives a 'connection broken' error.