When should gpio-restart be used/avoided?

Bjørn Mork bjorn at mork.no
Sun Aug 14 04:35:38 PDT 2022


Bjørn Mork <bjorn at mork.no> writes:

> FWIW, I did a simple test now using ModemManager on the MF286D.  There
> is no issue with the modem after reboot, even if the gpio-restart device
> is disabled.
>
> This is my MM config:
>
> config interface 'wan'
>         option device '/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb2/2-1'
>         option proto 'modemmanager'
>         option apn 'internet.public'
>
>
> I disabled the gpio-restart by doing
>
>  echo gpio-restart >/sys/bus/platform/drivers/restart-gpio/unbind
>
> Rebooting brings up the modem connection comes up just fine.  I can't
> see anything wrong with it.
>
> In theory all services in a QMI modem should be reset to defaults and
> all state cleared by simply sending a QMI_CTL SYNC request to the modem.
> And I see that we do send this during setup in
>
> package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh 
>
> A bit late maybe, after PIN and framing config, but that's probably
> fine.  At least I don't expect the SIM state to be reset by SYNC.  Don't
> know about 802.3 framing, but I'd have to dig out an old modem to find
> out.  I guess it will work since the framing is a persistent setting
> IIRC.
>
> I'll do a test with uqmi too.

Now tested with uqmi.  ModemManager disabled by removing the /etc/rc.d
symlink.  gpio-restart disabled as before.  Otherwise default config
except for this uqmi network interface:

config interface 'wan'
        option device '/dev/cdc-wdm0'
        option proto 'qmi'
        option apn 'internet.public'
        option dhcp '0'
        option autoconnect '0'



I don't see any issues after rebooting multiple times.  The modem is
re-initialised and the connection is brought up on boot.

Note that I haven't tested with PIN verification enabled.  And I am
disabling dhcp and autoconnect since these features depends on some
buggy vendor firmware implementation. In my experience, using modem
firmware for session management is about as good idea as running vendor
firmware on your router... I guess these choices might affect the test
result though.  

But AFAICS the gpio-restart is not required for proper modem reset.  The
modem works just fine without it.


Bjørn



More information about the openwrt-devel mailing list