QMI not working after rebooting RPI3

Hello All,
I am currently using Raspberry Pi 3 board to use QMI interface to connect to Telit LE910C1 modem connected to the board via USB interface. I followed the following steps:

  1. Flashed the openwrt-22.03.5-bcm27xx-bcm2710-rpi-3-squashfs-factory image file to microSD card.

  2. Boot the RPI 3 board

  3. Initially IP is set as static so I changed it to DHCP client to connect to internet to download pakages.

  4. Downloaded the following packages:
    kmod-usb-net-qmi-wwan
    uqmi
    luci-proto-qmi
    kmod-usb-serial-qualcomm
    picocom
    usb-modeswitch

  5. Connect my USB modem to the USB port of the RPI3. Telit Modem is configured with correct USB config to use QMI

  6. Reboot

  7. Add the QMI interface via LUCI web server.

  8. At this point QMI is working absolutely fine.

  9. Reboot the RPI3 board.

  10. QMI interface is no more working. The
    uqmi -d /dev/cdc-wdm0 --get-data-status command hangs forever.

Any ideas what could be the problem. I also tried to restart it manually by using:
uqmi -d /dev/cdc-wdm0 --start-network internet --autoconnect

but the above command also hangs.

Any help would be hugely appreciated.

Regards,
Vineet.

Hello All,
I added the below lines to the file is located in /lib/netifd/proto/qmi.sh

while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do

Add the following 3 lines before the line above.

uqmi -s -d "$device" --get-pin-status & 
sleep 3 
killall uqmi || echo "UQMI now works fine!"

and after that I rebooted the RPI3 board. Then when I press the "Restart" button on the wwan0 interface, then the QMI interface works just fine.

Any idea what commands I need to send via command line to simulate this "Restart" button on the LUCI console.

Regards
Vineet.