Setting up QMI for EC25 fails

I have been following this tutorial: QMI Interface Internet Connection Setup Using Sixfab Shield/HAT

It doesn’t tell you NOT to have the USB connected at the start - its only halfway through when it says to connect the USB that I realize I should not have had USB connected at the start.

Anyway…to my issue:

When I sudo ./qmi_install.sh I get errors (Rpi4) :

 sudo ./qmi_install.sh
Installing kernel headers for Raspberry Pi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1:1.20230405-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing udhcpc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
udhcpc is already the newest version (1:1.35.0-4+b3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Create and Change directory to /opt/qmi_files
/opt/qmi_files /home/al/test_fft
Downloading QMI WWAN Driver for Quectel Module
--2024-01-01 14:42:09--  https://github.com/sixfab/Sixfab_QMI_Installer/raw/main/src/Quectel_Linux_Android_QMI_WWAN_Driver_V1.2.1.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/sixfab/Sixfab_QMI_Installer/main/src/Quectel_Linux_Android_QMI_WWAN_Driver_V1.2.1.zip [following]
--2024-01-01 14:42:10--  https://raw.githubusercontent.com/sixfab/Sixfab_QMI_Installer/main/src/Quectel_Linux_Android_QMI_WWAN_Driver_V1.2.1.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27398 (27K) [application/zip]
Saving to: ‘qmi_wwan.zip’

qmi_wwan.zip                                                100%[========================================================================================================================================>]  26.76K  --.-KB/s    in 0.005s

2024-01-01 14:42:10 (5.29 MB/s) - ‘qmi_wwan.zip’ saved [27398/27398]

Archive:  qmi_wwan.zip
  inflating: /opt/qmi_files/qmi_wwan_q/Makefile
  inflating: /opt/qmi_files/qmi_wwan_q/ReleaseNote.txt
   creating: /opt/qmi_files/qmi_wwan_q/log/
  inflating: /opt/qmi_files/qmi_wwan_q/log/how_to_use_bridge.txt
  inflating: /opt/qmi_files/qmi_wwan_q/log/how_to_use_bridge_and_QMAP.txt
  inflating: /opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c
  inflating: /opt/qmi_files/qmi_wwan_q/rmnet_nss.c
/opt/qmi_files/qmi_wwan_q /opt/qmi_files /home/al/test_fft
make CROSS_COMPILE= -C /lib/modules/6.1.0-rpi7-rpi-v8/build M=/opt/qmi_files/qmi_wwan_q modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-v8'
  CC [M]  /opt/qmi_files/qmi_wwan_q/qmi_wwan_q.o
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘bridge_arp_reply’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:308:13: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
  308 |             netif_rx_ni(reply);
      |             ^~~~~~~~~~~
      |             netif_rx
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘rmnet_vnd_update_rx_stats’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:708:29: error: invalid operands to binary + (have ‘u64_stats_t’ and ‘unsigned int’)
  708 |         stats64->rx_packets += rx_packets;
      |         ~~~~~~~~~~~~~~~~~~~ ^~
      |                |
      |                u64_stats_t
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:709:27: error: invalid operands to binary + (have ‘u64_stats_t’ and ‘unsigned int’)
  709 |         stats64->rx_bytes += rx_bytes;
      |         ~~~~~~~~~~~~~~~~~ ^~
      |                |
      |                u64_stats_t
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘rmnet_vnd_update_tx_stats’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:724:29: error: invalid operands to binary + (have ‘u64_stats_t’ and ‘unsigned int’)
  724 |         stats64->tx_packets += tx_packets;
      |         ~~~~~~~~~~~~~~~~~~~ ^~
      |                |
      |                u64_stats_t
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:725:27: error: invalid operands to binary + (have ‘u64_stats_t’ and ‘unsigned int’)
  725 |         stats64->tx_bytes += tx_bytes;
      |         ~~~~~~~~~~~~~~~~~ ^~
      |                |
      |                u64_stats_t
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘_rmnet_vnd_get_stats64’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:756:38: error: incompatible types when assigning to type ‘u64’ {aka ‘long long unsigned int’} from type ‘u64_stats_t’
  756 |                         rx_packets = stats64->rx_packets;
      |                                      ^~~~~~~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:757:36: error: incompatible types when assigning to type ‘u64’ {aka ‘long long unsigned int’} from type ‘u64_stats_t’
  757 |                         rx_bytes = stats64->rx_bytes;
      |                                    ^~~~~~~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:758:38: error: incompatible types when assigning to type ‘u64’ {aka ‘long long unsigned int’} from type ‘u64_stats_t’
  758 |                         tx_packets = stats64->tx_packets;
      |                                      ^~~~~~~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:759:36: error: incompatible types when assigning to type ‘u64’ {aka ‘long long unsigned int’} from type ‘u64_stats_t’
  759 |                         tx_bytes = stats64->tx_bytes;
      |                                    ^~~~~~~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘qmap_register_device’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:1176:21: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1176 |     memcpy (qmap_net->dev_addr, real_dev->dev_addr, ETH_ALEN);
      |             ~~~~~~~~^~~~~~~~~~
In file included from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/string.h:20,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/bitmap.h:11,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/cpumask.h:12,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/smp.h:13,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/arch/arm64/include/asm/arch_timer.h:18,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/arch/arm64/include/asm/timex.h:8,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/timex.h:67,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/time32.h:13,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/time.h:60,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/arch/arm64/include/asm/stat.h:12,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/stat.h:6,
                 from /usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/linux/module.h:13,
                 from /opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:13:
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/arch/arm64/include/asm/string.h:35:21: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   35 | extern void *memcpy(void *, const void *, __kernel_size_t);
      |                     ^~~~~~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c: In function ‘qmi_wwan_bind’:
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:1893:39: error: assignment of read-only location ‘*dev->net->dev_addr’
 1893 |                 dev->net->dev_addr[0] |= 0x02;  /* set local assignment bit */
      |                                       ^~
/opt/qmi_files/qmi_wwan_q/qmi_wwan_q.c:1894:39: error: assignment of read-only location ‘*dev->net->dev_addr’
 1894 |                 dev->net->dev_addr[0] &= 0xbf;  /* clear "IP" bit */
      |                                       ^~
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-6.1.0-rpi7-common-rpi/scripts/Makefile.build:255: /opt/qmi_files/qmi_wwan_q/qmi_wwan_q.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-rpi7-common-rpi/Makefile:2039: /opt/qmi_files/qmi_wwan_q] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-v8'
make: *** [Makefile:28: default] Error 2
/opt/qmi_files /home/al/test_fft
Downloading Connection Manager
--2024-01-01 14:42:16--  https://github.com/sixfab/Sixfab_QMI_Installer/raw/main/src/Quectel_QConnectManager_Linux_V1.6.1.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/sixfab/Sixfab_QMI_Installer/main/src/Quectel_QConnectManager_Linux_V1.6.1.zip [following]
--2024-01-01 14:42:17--  https://raw.githubusercontent.com/sixfab/Sixfab_QMI_Installer/main/src/Quectel_QConnectManager_Linux_V1.6.1.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 232878 (227K) [application/zip]
Saving to: ‘quectel-CM.zip’

quectel-CM.zip                                              100%[========================================================================================================================================>] 227.42K  --.-KB/s    in 0.04s

2024-01-01 14:42:18 (5.39 MB/s) - ‘quectel-CM.zip’ saved [232878/232878]

Archive:  quectel-CM.zip
   creating: /opt/qmi_files/quectel-CM/
  inflating: /opt/qmi_files/quectel-CM/atc.c
  inflating: /opt/qmi_files/quectel-CM/atchannel.c
  inflating: /opt/qmi_files/quectel-CM/atchannel.h
  inflating: /opt/qmi_files/quectel-CM/at_tok.c
  inflating: /opt/qmi_files/quectel-CM/at_tok.h
  inflating: /opt/qmi_files/quectel-CM/default.script
  inflating: /opt/qmi_files/quectel-CM/default.script_ip
  inflating: /opt/qmi_files/quectel-CM/device.c
  inflating: /opt/qmi_files/quectel-CM/ethtool-copy.h
  inflating: /opt/qmi_files/quectel-CM/GobiNetCM.c
   creating: /opt/qmi_files/quectel-CM/libmnl/
  inflating: /opt/qmi_files/quectel-CM/libmnl/attr.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/callback.c
   creating: /opt/qmi_files/quectel-CM/libmnl/dhcp/
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/dhcp.h
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/dhcpclient.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/dhcpmsg.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/dhcpmsg.h
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/packet.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/dhcp/packet.h
  inflating: /opt/qmi_files/quectel-CM/libmnl/ifutils.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/ifutils.h
  inflating: /opt/qmi_files/quectel-CM/libmnl/libmnl.h
  inflating: /opt/qmi_files/quectel-CM/libmnl/nlmsg.c
  inflating: /opt/qmi_files/quectel-CM/libmnl/README
  inflating: /opt/qmi_files/quectel-CM/libmnl/socket.c
   creating: /opt/qmi_files/quectel-CM/log/
  inflating: /opt/qmi_files/quectel-CM/log/cdc_mbim.txt
  inflating: /opt/qmi_files/quectel-CM/log/cdc_mbim_vlan.txt
  inflating: /opt/qmi_files/quectel-CM/log/ecm_ncm_rndis.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet_qmap=1.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet_qmap=1_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet_qmap=4.txt
  inflating: /opt/qmi_files/quectel-CM/log/gobinet_qmap=4_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_mbim.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_mbim_qmap=4.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_qmap=1.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_qmap=1_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_qmap=4.txt
  inflating: /opt/qmi_files/quectel-CM/log/pcie_mhi_qmap=4_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q_qmap=1.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q_qmap=1_bridge.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q_qmap=4.txt
  inflating: /opt/qmi_files/quectel-CM/log/qmi_wwan_q_qmap=4_bridge.txt
   creating: /opt/qmi_files/quectel-CM/log/usage_of_argument/
  inflating: /opt/qmi_files/quectel-CM/log/usage_of_argument/6.txt
  inflating: /opt/qmi_files/quectel-CM/log/usage_of_argument/m.txt
  inflating: /opt/qmi_files/quectel-CM/main.c
  inflating: /opt/qmi_files/quectel-CM/Makefile
  inflating: /opt/qmi_files/quectel-CM/mbim-cm.c
  inflating: /opt/qmi_files/quectel-CM/MPQCTL.h
  inflating: /opt/qmi_files/quectel-CM/MPQMI.h
  inflating: /opt/qmi_files/quectel-CM/MPQMUX.c
  inflating: /opt/qmi_files/quectel-CM/MPQMUX.h
  inflating: /opt/qmi_files/quectel-CM/NOTICE
  inflating: /opt/qmi_files/quectel-CM/qmap_bridge_mode.c
  inflating: /opt/qmi_files/quectel-CM/QMIThread.c
  inflating: /opt/qmi_files/quectel-CM/QMIThread.h
  inflating: /opt/qmi_files/quectel-CM/QmiWwanCM.c
  inflating: /opt/qmi_files/quectel-CM/qrtr.c
  inflating: /opt/qmi_files/quectel-CM/quectel-mbim-proxy.c
  inflating: /opt/qmi_files/quectel-CM/quectel-qmi-proxy.c
  inflating: /opt/qmi_files/quectel-CM/ReleaseNote.txt
  inflating: /opt/qmi_files/quectel-CM/rmnetctl.c
  inflating: /opt/qmi_files/quectel-CM/udhcpc.c
  inflating: /opt/qmi_files/quectel-CM/udhcpc_netlink.c
  inflating: /opt/qmi_files/quectel-CM/udhcpc_script.c
  inflating: /opt/qmi_files/quectel-CM/util.c
  inflating: /opt/qmi_files/quectel-CM/util.h
Copying udhcpc default script
Making /opt/qmi_files/quectel-CM
/opt/qmi_files/quectel-CM /opt/qmi_files /home/al/test_fft
rm -rf *.o libmnl/*.o quectel-CM quectel-qmi-proxy quectel-mbim-proxy
gcc -Wall -Werror -O1  quectel-qmi-proxy.c -o quectel-qmi-proxy -lpthread -ldl -lrt
gcc -Wall -Werror -O1  quectel-mbim-proxy.c -o quectel-mbim-proxy -lpthread -ldl -lrt
gcc -Wall -Werror -O1  QmiWwanCM.c GobiNetCM.c main.c MPQMUX.c QMIThread.c util.c qmap_bridge_mode.c mbim-cm.c device.c atc.c atchannel.c at_tok.c udhcpc.c -o quectel-CM -lpthread -ldl -lrt
QMIThread.c: In function ‘requestSetupDataCall’:
QMIThread.c:1826:16: error: pointer used after ‘free’ [-Werror=use-after-free]
 1826 |         return le16_to_cpu(pMUXMsg->QMUXMsgHdrResp.QMUXError);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QMIThread.c:1825:9: note: call to ‘free’ here
 1825 |         free(pResponse);
      |         ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
mbim-cm.c: In function ‘mbim_open_device’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1695:5: note: in expansion of macro ‘mbim_check_err’
 1695 |     mbim_check_err(err, pRequest, pOpenDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1695:5: note: in expansion of macro ‘mbim_check_err’
 1695 |     mbim_check_err(err, pRequest, pOpenDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_close_device’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1711:5: note: in expansion of macro ‘mbim_check_err’
 1711 |     mbim_check_err(err, pRequest, pCloseDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1711:5: note: in expansion of macro ‘mbim_check_err’
 1711 |     mbim_check_err(err, pRequest, pCloseDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_query_connect’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1730:5: note: in expansion of macro ‘mbim_check_err’
 1730 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1730:5: note: in expansion of macro ‘mbim_check_err’
 1730 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_ms_version_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1761:5: note: in expansion of macro ‘mbim_check_err’
 1761 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1761:5: note: in expansion of macro ‘mbim_check_err’
 1761 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_device_services_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1782:5: note: in expansion of macro ‘mbim_check_err’
 1782 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1782:5: note: in expansion of macro ‘mbim_check_err’
 1782 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_device_caps_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1825:5: note: in expansion of macro ‘mbim_check_err’
 1825 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1825:5: note: in expansion of macro ‘mbim_check_err’
 1825 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_set_radio_state’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1878:5: note: in expansion of macro ‘mbim_check_err’
 1878 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1878:5: note: in expansion of macro ‘mbim_check_err’
 1878 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_subscriber_status_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1896:5: note: in expansion of macro ‘mbim_check_err’
 1896 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1896:5: note: in expansion of macro ‘mbim_check_err’
 1896 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_register_state_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1921:5: note: in expansion of macro ‘mbim_check_err’
 1921 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1921:5: note: in expansion of macro ‘mbim_check_err’
 1921 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_packet_service_query’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1940:5: note: in expansion of macro ‘mbim_check_err’
 1940 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1940:5: note: in expansion of macro ‘mbim_check_err’
 1940 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_packet_service_set’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:1965:5: note: in expansion of macro ‘mbim_check_err’
 1965 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:1965:5: note: in expansion of macro ‘mbim_check_err’
 1965 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_set_connect’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:2046:5: note: in expansion of macro ‘mbim_check_err’
 2046 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:2046:5: note: in expansion of macro ‘mbim_check_err’
 2046 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_ip_config’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:2069:5: note: in expansion of macro ‘mbim_check_err’
 2069 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:2069:5: note: in expansion of macro ‘mbim_check_err’
 2069 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘mbim_proxy_configure’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:2165:5: note: in expansion of macro ‘mbim_check_err’
 2165 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:2165:5: note: in expansion of macro ‘mbim_check_err’
 2165 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c: In function ‘qmi_over_mbim_qmidev_send’:
mbim-cm.c:1679:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |         ^~
mbim-cm.c:2449:5: note: in expansion of macro ‘mbim_check_err’
 2449 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
mbim-cm.c:1679:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 1679 |         if (err) return err; if (_status) return _status; return 8888; \
      |                              ^~
mbim-cm.c:2449:5: note: in expansion of macro ‘mbim_check_err’
 2449 |     mbim_check_err(err, pRequest, pCmdDone);
      |     ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:28: release] Error 1
/opt/qmi_files /home/al/test_fft
After reboot please follow commands mentioned below
go to /opt/qmi_files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]  for manual operation
Press ENTER key to reboot

and here

OK

Quectel
EC25
Revision: EC25AUGCR06A01M1G

OK

EC25AUGCR06A01M1G

OK

ERROR
AT+CPIN?

+CME ERROR: 10
AT+CPAS

+CPAS: 0

OK
AT+CFUN?

+CFUN: 1

OK
AT+COPS?

+COPS: 0

OK
AT+QCFG?="band"

ERROR

and more detail here

(venv) al@kiwitracker:~/test_fft $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
(venv) al@kiwitracker:~/test_fft $ uname -a
Linux kiwitracker 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
(venv) al@kiwitracker:~/test_fft $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
(venv) al@kiwitracker:~/test_fft $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 4, If 1, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 4, If 2, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 4, If 3, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 4, If 4, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
(venv) al@kiwitracker:~/test_fft $ dmesg | grep tty
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=DC:A6:32:2B:7B:B3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=a17b558d-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=NZ
[    0.000418] printk: console [tty1] enabled
[    1.629262] fe201000.serial: ttyAMA1 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.629529] serial serial0: tty port ttyAMA1 registered
[    5.419227] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[  450.519345] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[  450.529585] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[  450.531102] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[  450.533092] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3
(venv) al@kiwitracker:~/test_fft $

I have managed to get libqmi working with this method : Setting up a data connection over QMI interface using libqmi

But now I need to workout how to restore my default route as it overwrote my wireless LAN one when I did :

sudo udhcpc -q -f -i wwan0

Hi,

That tutorial is outdated for Bookworm you can follow libqmi or ecm tutorials.

So fort qmilib - what commands needs to be issued after boot to connect every time?

Thanks

Thanks for the reply.
I looked at the QMICLI command manual - but it is literally a list of commands with parameters - no explanation of what the commands do. Or any examples.

I presume setting the modem to auto connect on reboot must have one of either:
(a) a settings file or
(b) you have to create your own systemd

Is there any guide as to what all these commands do?

Thanks

Al

When I follow this tutorial :

And issue this command:
sudo udhcpc -q -f -i wwan0

It seems to work but kills my network (LAN) connection to my rasp pi. Is there a way to avoid this?

Thanks

Al