QMI interface has been mostly asked tutorial Quectel UC20 / Quectel EC25 with our Sixfab 3G-4G/LTE Base Shield v2.

In this tutorial we will be demonstrating you the process step by step. Without further ado, lets get started.

Hardware Setup

  1. Plug Quectel EC25 Mini PCIe module to the Sixfab 3G-4G/LTE Base Shield v2.
  2. Connect required antennas to EC25 module. (Antenna Connecting Guide will be Available soon!).
  3. Attach the Shield on top of your Raspberry Pi and connect the micro-USB cable that comes with the Shield.

Note: Make sure you are using original Raspberry Adapter as your power source.

Software Setup

    1. First run update
      sudo apt-get update

 

    1. Install Raspberry Pi kernel headers.
      sudo apt-get install raspberrypi-kernel-headers

      qmi_install_01

 

    1. Check installed kernel headers packet version ls /usr/src
      In our case, it is 4.14.79

      qmi_install_02

 

    1. Now open your browser and go to rpi-firmware github repository commits

      qmi_install_03

 

    1. Here, find out your version and click on <> button to browse the repository at that point in the history.

      qmi_install_04

 

    1. From the link copy the hash as shown in the image below.

      qmi_install_05

 

    1. Now go back your terminal and update rpi in following format. Replace the term <hash> with your hash as shown in the image.
      sudo rpi-update <hash>

      qmi_install_06

 

    1. Reboot your Raspberry Pi in order to activate the new firmware.

 

    1. After rebooting, download qmi_installer.sh script.
      wget https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/qmi_install.sh

      qmi_install_07

 

    1. Change the permission of the script.
      sudo chmod +x qmi_install.sh

      qmi_install_08

 

    1. Run the installer script
      sudo ./qmi_install.sh

      qmi_install_09

 

    1. At the end of installation enter any key to reboot your Raspberry Pi.

 

    1. Open and change your directory to files/quectel-CM
      cd /files/quectel-CM

      qmi_install_10

 

    1. Now run the following command to connect to the Internet
      sudo ./quectel-CM -s internet
      Here internet is the APN for the network provider.
      Don’t forget to replace it with your APN.

      qmi_install_11

 

    1. Now you can check you IP using
      ifconfig wwan0

      qmi_install_12

 

Auto Connect on rebooot

If you want your Raspberry Pi to automatically connected to Internet via QMI interface then there is one more step you will need to follow.

    1. Get the installation script.
      wget https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/install_auto_connect.sh

      qmi_install_13

 

    1. Change the permission
      sudo chmod +x install_auto_connect.sh

      qmi_install_14

 

    1. Now install the script
      sudo ./install_auto_connect.sh

      qmi_install_15

 

    1. It will then ask for APN. Type in your APN and then press ENTER

      qmi_install_16

 

    1. Once you press enter it will create and activate the service.

      qmi_install_17

 

    1. The name of the service is qmi_reconnect. To check if the service is active you can type
      sudo systemctl status qmi_reconnect.service

      qmi_install_18

 

    1. If it is working fine then you will be able to see active(running) in green.

      qmi_install_19

 

49 thoughts on “QMI Interface with 3G-4G/LTE Base Shield v2”

  1. Hi Saeed. Any idea as to why when using the qmi interface everything appears to be fine (device has an IP, route, etc…) but in fact ping fails, dns lookup will fail,…networking will fail. If I install the ppp installer everything will work perfectly.
    Thanks

    1. Hi Andy, Could you please send me the image of your setup?
      Did you update before starting the installation process with

      sudo apt-get update

    1. PPP uses a dialing number to establish a data connection

      QMI does not use dialling or the PPP protocol to establish a data connection and it is usually faster than PPP mode.

  2. I get:
    sudo qmicli -d /dev/cdc-wdm0 –wds-start-network=apn=’xxxx.com’ client-no-release-cid
    error: couldn’t start network: QMI protocol error (14): ‘CallFailed’
    call end reason (3): generic-no-service

    The SIM is connected I can at+cnum and I see the cell number

    I assume it means the cell network is not connected or the SIM is not in the slot. The SIM tested good in another modem. I am using a Telit LE910Cx.

    Any thoughts?

  3. I had to add a default route out of wwan0 to make it work right because I was configuring it via Wifi to make it work. It might be that.

  4. Hey Saeed,

    Thanks for this work. it makes the job much easier. QQ on the output. I have followed the guide and got it working but in my output is says “too few arguments”

    [email protected]:~# quectel-CM -s pp.vodafone.co.uk wap wap pap -f /var/log/VF-output.log
    [03-16_21:38:38:166] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [03-16_21:38:38:167] quectel-CM profile[1] = pp.vodafone.co.uk/wap/wap/64, pincode = (null)
    [03-16_21:38:38:169] Find /sys/bus/usb/devices/1-1.1.3 idVendor=2c7c idProduct=0125
    [03-16_21:38:38:169] Find /sys/bus/usb/devices/1-1.1.3:1.4/net/wwan0
    [03-16_21:38:38:169] Find usbnet_adapter = wwan0
    [03-16_21:38:38:169] Find /sys/bus/usb/devices/1-1.1.3:1.4/usbmisc/cdc-wdm0
    [03-16_21:38:38:169] Find qmichannel = /dev/cdc-wdm0
    [03-16_21:38:38:192] cdc_wdm_fd = 8
    [03-16_21:38:38:269] Get clientWDS = 20
    [03-16_21:38:38:301] Get clientDMS = 1
    [03-16_21:38:38:333] Get clientNAS = 4
    [03-16_21:38:38:365] Get clientUIM = 1
    [03-16_21:38:38:397] Get clientWDA = 1
    [03-16_21:38:38:429] requestBaseBandVersion EC25EFAR06A03M4G
    [03-16_21:38:38:557] requestGetSIMStatus SIMStatus: SIM_READY
    [03-16_21:38:38:557] requestSetProfile[1] pp.vodafone.co.uk/wap/wap/64
    [03-16_21:38:38:621] requestGetProfile[1] pp.vodafone.co.uk/wap/wap/64
    [03-16_21:38:38:653] requestRegistrationState2 MCC: 234, MNC: 15, PS: Attached, DataCap: LTE
    [03-16_21:38:38:685] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
    [03-16_21:38:38:749] requestRegistrationState2 MCC: 234, MNC: 15, PS: Attached, DataCap: LTE
    [03-16_21:38:38:781] requestSetupDataCall WdsConnectionIPv4Handle: 0x87309130
    [03-16_21:38:38:845] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
    [03-16_21:38:38:877] ifconfig wwan0 up
    [03-16_21:38:38:887] busybox udhcpc -f -n -q -t 5 -i wwan0
    [03-16_21:38:38:914] udhcpc (v1.22.1) started
    No resolv.conf for interface wwan0.udhcpc
    [03-16_21:38:39:020] Sending discover…
    [03-16_21:38:39:110] Sending select for 10.33.44.170…
    [03-16_21:38:39:210] Lease of 10.33.44.170 obtained, lease time 7200
    Too few arguments.
    Too few arguments.

    What is going on there? I have included the command to start it.

  5. Hey Saaed,

    I had to rebuild my Pi for a project and I have noted now that i have put it back again I am not getting a lease from Vodafone (My carrier) on a known working SIM.

    Do I need to put anything specific into /etc/network/interfaces to cater for DHCP requests or is there anything the busybox instance would need to get a lease?

    I have tried two working SIM cards and the unit times out on getting a lease now.

      1. Its ok. I recompiled it and it worked. I think I had a header mismatch in my rush to get it working. Thanks for the quick reply

  6. Just got a successful connection using the QMI interface via sudo ./quectel-CM -s ‘APN’

    I would like this to run at startup automatically after each reboot, as I assume this is the only way to have the device online after reboot without manually executing sudo ./quectel-CM -s ‘APN’ is that correct?

    Any recommendations for setting this to run at startup? I’m novice but was able to write a shell script that runs sudo ./quectel-CM -s ‘APN’ (and it works) but am having trouble getting this to run automatically at startup via rc.local. For current version of Debian, it sounds like a systemd configuration would be preferable. Is systemd the best option, and if so does Sixfab have a systemd init file example that works?

  7. Hi,
    I’m trying to get my RPI (Raspbian strecht) to work with my 3G-4G/LTE Base Shield V2 with EC25 module.
    So I installed a fresh Raspbian to my RP3 and I followed every steps described in your tutorials :

    But I dont get any connection… All I have is an endless loop saying :
    “requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW”
    When I launch the instruction “sudo ./quectel-CM -s internet” (as internet is my APN)

    I type “sudo apt-get update” before installation and connect two LTE antenna to Main port

    I found the log “SIMStatus: SIM_ABSENT” seems not normal.I insert sim card to the slot and change other sim card still have
    the “SIMStatus: SIM_ABSENT” log

    Usefull informations :
    full “sudo ./quectel-CM -s internet” output :
    [05-01_13:16:16:246] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [05-01_13:16:16:247] ./quectel-CM profile[1] = internet///0, pincode = (null)
    [05-01_13:16:16:247] Find /sys/bus/usb/devices/1-1.1.2 idVendor=2c7c idProduct=0125
    [05-01_13:16:16:248] Find /sys/bus/usb/devices/1-1.1.2:1.4/net/wwan0
    [05-01_13:16:16:248] Find usbnet_adapter = wwan0
    [05-01_13:16:16:248] Find /sys/bus/usb/devices/1-1.1.2:1.4/usbmisc/cdc-wdm0
    [05-01_13:16:16:248] Find qmichannel = /dev/cdc-wdm0
    [05-01_13:16:16:362] cdc_wdm_fd = 7
    [05-01_13:16:16:442] Get clientWDS = 20
    [05-01_13:16:16:474] Get clientDMS = 1
    [05-01_13:16:16:506] Get clientNAS = 4
    [05-01_13:16:16:538] Get clientUIM = 1
    [05-01_13:16:16:570] Get clientWDA = 1
    [05-01_13:16:16:602] requestBaseBandVersion EC25AUFAR06A01M4G
    [05-01_13:16:16:730] requestGetSIMStatus SIMStatus: SIM_ABSENT
    [05-01_13:16:16:730] requestSetProfile[1] internet///0
    [05-01_13:16:16:794] requestGetProfile[1] internet///0
    [05-01_13:16:16:826] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:16:858] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
    [05-01_13:16:16:922] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:22:138] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:27:290] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:32:449] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:38:145] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    [05-01_13:16:43:297] requestRegistrationState2 MCC: 466, MNC: 1, PS: Detached, DataCap: UNKNOW
    ^C[05-01_13:16:45:953] QmiWwanThread exit
    [05-01_13:16:45:954] main exit

    Thanks !

    1. bbywes227 I have the same problem. I have tried replacing the pin several times but yields the same result. My setup is with EC-25A and AT&T Sim card.

      Here are my logs.

      [05-19_03:51:09:484] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
      [05-19_03:51:09:484] ./quectel-CM profile[1] = Broadand///0, pincode = (null)
      [05-19_03:51:09:488] Find /sys/bus/usb/devices/1-1.2 idVendor=2c7c idProduct=0125
      [05-19_03:51:09:488] Find /sys/bus/usb/devices/1-1.2:1.4/net/wwan0
      [05-19_03:51:09:488] Find usbnet_adapter = wwan0
      [05-19_03:51:09:488] Find /sys/bus/usb/devices/1-1.2:1.4/usbmisc/cdc-wdm0
      [05-19_03:51:09:488] Find qmichannel = /dev/cdc-wdm0
      [05-19_03:51:09:501] cdc_wdm_fd = 7
      [05-19_03:51:09:878] Get clientWDS = 19
      [05-19_03:51:09:910] Get clientDMS = 1
      [05-19_03:51:09:942] Get clientNAS = 3
      [05-19_03:51:09:974] Get clientUIM = 1
      [05-19_03:51:10:006] Get clientWDA = 1
      [05-19_03:51:10:038] requestBaseBandVersion EC25AFAR05A04M4G
      [05-19_03:51:10:166] requestGetSIMStatus SIMStatus: SIM_ABSENT
      [05-19_03:51:10:166] requestSetProfile[1] Broadand///0
      [05-19_03:51:10:230] requestGetProfile[1] Broadand///0
      [05-19_03:51:10:262] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:10:294] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
      [05-19_03:51:10:358] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:15:414] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:20:469] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:25:525] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:30:581] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:35:637] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:40:693] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:45:749] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:50:805] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:55:861] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
      [05-19_03:51:55:861] requestSetOperatingMode(1)
      [05-19_03:51:55:892] requestSetOperatingMode(0)

  8. Everything in this tutorial goes great until step 14
    I get stuck in an endless loop. Other similar posting show, make sure you do step 1. I did.
    I read this could be an antenna issue. LTE Primary, GPS and LTE Diversity are plugged in solid. I’m not sure where to go.
    My APN might be wrong. How do I know?
    ATT = pta
    ATT = broadband
    and several others…
    Any her would be greatly appreciated.

    EC25-A
    AT&T
    North America

    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s pta
    [05-11_15:22:21:019] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [05-11_15:22:21:019] ./quectel-CM profile[1] = pta///0, pincode = (null)
    [05-11_15:22:21:021] Find /sys/bus/usb/devices/1-1.3 idVendor=2c7c idProduct=0125
    [05-11_15:22:21:021] Find /sys/bus/usb/devices/1-1.3:1.4/net/wwan0
    [05-11_15:22:21:021] Find usbnet_adapter = wwan0
    [05-11_15:22:21:021] Find /sys/bus/usb/devices/1-1.3:1.4/usbmisc/cdc-wdm0
    [05-11_15:22:21:021] Find qmichannel = /dev/cdc-wdm0
    [05-11_15:22:21:118] cdc_wdm_fd = 7
    [05-11_15:22:21:200] Get clientWDS = 19
    [05-11_15:22:21:233] Get clientDMS = 1
    [05-11_15:22:21:265] Get clientNAS = 3
    [05-11_15:22:21:297] Get clientUIM = 2
    [05-11_15:22:21:329] Get clientWDA = 1
    [05-11_15:22:21:361] requestBaseBandVersion EC25AFAR05A04M4G
    [05-11_15:22:21:488] requestGetSIMStatus SIMStatus: SIM_READY
    [05-11_15:22:21:488] requestSetProfile[1] pta///0
    [05-11_15:22:21:553] requestGetProfile[1] pta///0
    [05-11_15:22:21:585] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:21:617] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
    [05-11_15:22:21:681] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:26:836] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:31:988] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:37:146] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:42:905] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:48:057] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:53:944] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:22:59:097] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:23:04:921] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:23:10:072] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:23:10:072] requestSetOperatingMode(1)
    [05-11_15:23:10:105] requestSetOperatingMode(0)
    [05-11_15:23:10:424] requestRegistrationState2 MCC: 0, MNC: 0, PS: Detached, DataCap: UNKNOW
    [05-11_15:23:11:129] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    [05-11_15:23:11:161] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UNKNOW
    ^C[05-11_15:23:13:625] QmiWwanThread exit
    [05-11_15:23:13:626] main exit

  9. Hello,

    I have problems compiling the driver. Pls see the output:
    [email protected]:/home/pi/files/drivers# make clean && make && make install
    rm -rf *~ .tmp_versions modules.order Module.symvers
    find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c | xargs rm -rf
    rm -rf *~ .tmp_versions modules.order Module.symvers
    find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c | xargs rm -rf
    make -C /lib/modules/4.19.42-v7+/build M=/home/pi/files/drivers modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.19.42-v7+’
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.o
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/option.o
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.o
    CC [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o
    /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_register_device’:
    /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c:286:8: error: too few arguments to function ‘netdev_upper_dev_link’
    err = netdev_upper_dev_link(real_dev, new_dev);
    ^~~~~~~~~~~~~~~~~~~~~
    In file included from /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c:15:0:
    ./include/linux/netdevice.h:4208:5: note: declared here
    int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev,
    ^~~~~~~~~~~~~~~~~~~~~
    scripts/Makefile.build:309: recipe for target ‘/home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o’ failed
    make[2]: *** [/home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o] Error 1
    Makefile:1524: recipe for target ‘_module_/home/pi/files/drivers’ failed
    make[1]: *** [_module_/home/pi/files/drivers] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.42-v7+’
    Makefile:10: recipe for target ‘modules’ failed
    make: *** [modules] Error 2

    1. You need to change the call to “netdev_upper_dev_link(real_dev, new_dev, &dev_ack)” now it takes 3 params, I have fixed in my code, but Sixfab need to fix files otherwise the qmi_install script always overwrite mods.

  10. Saeed, please advise as I too get the SIM_ABSENT message. Despite having an AT&T Sim card with your latest v2 shields.

  11. Thanks for this tutorial. I followed and was able to connect. But its disconnecting after 1min always. When i repeat “sudo ./quectel-CM -s internet” its connecting. see output below
    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s JIONET
    [05-21_11:58:37:018] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [05-21_11:58:37:019] ./quectel-CM profile[1] = JIONET///0, pincode = (null)
    [05-21_11:58:37:020] Find /sys/bus/usb/devices/1-1.5 idVendor=2c7c idProduct=0125
    [05-21_11:58:37:020] Find /sys/bus/usb/devices/1-1.5:1.4/net/wwan0
    [05-21_11:58:37:021] Find usbnet_adapter = wwan0
    [05-21_11:58:37:021] Find /sys/bus/usb/devices/1-1.5:1.4/usbmisc/cdc-wdm0
    [05-21_11:58:37:021] Find qmichannel = /dev/cdc-wdm0
    [05-21_11:58:37:052] /proc/2929/fd/7 -> /dev/cdc-wdm0
    [05-21_11:58:37:052] /proc/2929/exe -> /home/pi/files/quectel-CM/quectel-CM
    [05-21_11:58:39:067] cdc_wdm_fd = 7
    [05-21_11:58:39:422] Get clientWDS = 10
    [05-21_11:58:39:454] Get clientDMS = 1
    [05-21_11:58:39:486] Get clientNAS = 3
    [05-21_11:58:39:518] Get clientUIM = 1
    [05-21_11:58:39:550] Get clientWDA = 1
    [05-21_11:58:39:582] requestBaseBandVersion EC25EFAR02A09M4G
    [05-21_11:58:39:710] requestGetSIMStatus SIMStatus: SIM_READY
    [05-21_11:58:39:710] requestSetProfile[1] JIONET///0
    [05-21_11:58:39:774] requestGetProfile[1] jionet///0
    [05-21_11:58:39:806] requestRegistrationState2 MCC: 405, MNC: 861, PS: Attached, DataCap: LTE
    [05-21_11:58:39:838] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
    [05-21_11:58:39:902] requestRegistrationState2 MCC: 405, MNC: 861, PS: Attached, DataCap: LTE
    [05-21_11:58:39:998] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
    [05-21_11:58:45:054] requestRegistrationState2 MCC: 405, MNC: 861, PS: Attached, DataCap: LTE
    [05-21_11:58:45:150] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
    [05-21_11:58:48:540] QmiWwanThread exit
    [05-21_11:58:48:542] main exit

    But again same issue. I have to reconnect after every 1 min.
    What might be the issue here, any solutions suggestions.
    Thanks in advance

    1. What is the status of the LEDs?
      What are you using as the power source? (5V 2.5A adapter is recommended)

  12. Hi all,

    As anyone managed to use the EC-25 with the qmi interface?
    That “No resolv.conf for interface wwan0.udhcpc” seems to be persistent despite multiple attempt
    [05-23_12:59:17:355] Sending discover…
    [05-23_12:59:20:233] requestRegistrationState2 MCC: 272, MNC: 3, PS: Attached, DataCap: UMTS
    [05-23_12:59:20:488] Sending discover…
    [05-23_12:59:23:588] Sending discover…
    [05-23_12:59:26:688] Sending discover…
    [05-23_12:59:29:798] Sending discover…
    [05-23_12:59:32:947] No lease, failing

    I have noticed some error while installing qmi.sh but I don’t know if it is related.
    [email protected]:/opt $ sudo ./qmi_install.sh
    Clear Files
    Change directory to /home/pi
    Downloading source files
    –2019-05-23 12:02:27– https://sixfab.com/wp-content/uploads/2018/11/files.zip
    Resolving sixfab.com (sixfab.com)… 104.28.23.189, 104.28.22.189, 2606:4700:30::681c:17bd, …
    Connecting to sixfab.com (sixfab.com)|104.28.23.189|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 122805 (120K) [application/zip]
    Saving to: ‘files.zip’

    files.zip 100%[===============================>] 119.93K –.-KB/s in 0.1s

    2019-05-23 12:02:27 (1.18 MB/s) – ‘files.zip’ saved [122805/122805]

    Archive: files.zip
    creating: files/
    creating: files/drivers/
    inflating: files/drivers/.cache.mk
    creating: files/drivers/drivers/
    creating: files/drivers/drivers/net/
    creating: files/drivers/drivers/net/usb/
    inflating: files/drivers/drivers/net/usb/qmi_wwan.c
    inflating: files/drivers/drivers/net/usb/usbnet.c
    creating: files/drivers/drivers/usb/
    creating: files/drivers/drivers/usb/serial/
    inflating: files/drivers/drivers/usb/serial/option.c
    inflating: files/drivers/drivers/usb/serial/qcserial.c
    inflating: files/drivers/drivers/usb/serial/usb-wwan.h
    inflating: files/drivers/drivers/usb/serial/usb_wwan.c
    inflating: files/drivers/drivers/usb/serial/usb_wwan.o.ur-safe
    inflating: files/drivers/Makefile
    creating: files/quectel-CM/
    inflating: files/quectel-CM/default.script
    inflating: files/quectel-CM/dhcpclient.c
    inflating: files/quectel-CM/GobiNetCM.c
    inflating: files/quectel-CM/main.c
    inflating: files/quectel-CM/Makefile
    inflating: files/quectel-CM/MPQCTL.h
    inflating: files/quectel-CM/MPQMI.h
    inflating: files/quectel-CM/MPQMUX.c
    inflating: files/quectel-CM/MPQMUX.h
    inflating: files/quectel-CM/QMIThread.c
    inflating: files/quectel-CM/QMIThread.h
    inflating: files/quectel-CM/QmiWwanCM.c
    inflating: files/quectel-CM/quectel-qmi-proxy.c
    inflating: files/quectel-CM/udhcpc.c
    inflating: files/quectel-CM/util.c
    inflating: files/quectel-CM/util.h
    Updating rpi
    Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
    Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
    Get:3 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
    Fetched 11.7 MB in 1min 15s (155 kB/s)
    Reading package lists… Done
    Installing udhcpc
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following package was automatically installed and is no longer required:
    realpath
    Use ‘sudo apt autoremove’ to remove it.
    The following additional packages will be installed:
    busybox
    The following NEW packages will be installed:
    busybox udhcpc
    0 upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
    Need to get 396 kB of archives.
    After this operation, 798 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://ftp.heanet.ie/mirrors/raspbian/raspbian stretch/main armhf busybox armhf 1:1.22.0-19 [374 kB]
    Get:2 http://ftp.heanet.ie/mirrors/raspbian/raspbian stretch/main armhf udhcpc armhf 1:1.22.0-19 [22.4 kB]
    Fetched 396 kB in 0s (567 kB/s)
    Selecting previously unselected package busybox.
    (Reading database … 141575 files and directories currently installed.)
    Preparing to unpack …/busybox_1%3a1.22.0-19_armhf.deb …
    Unpacking busybox (1:1.22.0-19) …
    Selecting previously unselected package udhcpc.
    Preparing to unpack …/udhcpc_1%3a1.22.0-19_armhf.deb …
    Unpacking udhcpc (1:1.22.0-19) …
    Setting up busybox (1:1.22.0-19) …
    Setting up udhcpc (1:1.22.0-19) …
    Processing triggers for man-db (2.7.6.1-2) …
    Copying udhcpc default script
    Change directory to /home/pi/files/drivers
    rm -rf *~ .tmp_versions modules.order Module.symvers
    find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c | xargs rm -rf
    rm -rf *~ .tmp_versions modules.order Module.symvers
    find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c | xargs rm -rf
    make -C /lib/modules/4.19.42-v7+/build M=/home/pi/files/drivers modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.19.42-v7+’
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.o
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/option.o
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.o
    CC [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o
    /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c: In function ‘qmimux_register_device’:
    /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c:286:8: error: too few arguments to function ‘netdev_upper_dev_link’
    err = netdev_upper_dev_link(real_dev, new_dev);
    ^~~~~~~~~~~~~~~~~~~~~
    In file included from /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.c:15:0:
    ./include/linux/netdevice.h:4208:5: note: declared here
    int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev,
    ^~~~~~~~~~~~~~~~~~~~~
    scripts/Makefile.build:309: recipe for target ‘/home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o’ failed
    make[2]: *** [/home/pi/files/drivers/./drivers/net/usb/qmi_wwan.o] Error 1
    Makefile:1524: recipe for target ‘_module_/home/pi/files/drivers’ failed
    make[1]: *** [_module_/home/pi/files/drivers] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.42-v7+’
    Makefile:10: recipe for target ‘modules’ failed
    make: *** [modules] Error 2
    Change directory to /home/pi/files/quectel-CM
    rm -rf quectel-CM *~
    rm -rf quectel-qmi-proxy
    rm -rf quectel-CM *~
    rm -rf quectel-qmi-proxy
    gcc -Wall -s quectel-qmi-proxy.c -o quectel-qmi-proxy -lpthread -ldl
    gcc -Wall -s QmiWwanCM.c GobiNetCM.c main.c MPQMUX.c QMIThread.c util.c udhcpc.c -o quectel-CM -lpthread -ldl
    main.c: In function ‘kill_brothers’:
    main.c:299:5: warning: this ‘if’ clause does not guard… [-Wmisleading-indentation]
    if (ls_dir(“/proc”, is_brother_process, argv))
    ^~
    main.c:302:2: note: …this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
    return 0;
    ^~~~~~
    MPQMUX.c:36:25: warning: ‘qmi_ctl_CtlFlags’ defined but not used [-Wunused-const-variable=]
    static const QMI_NAME_T qmi_ctl_CtlFlags[] = {
    ^~~~~~~~~~~~~~~~
    MPQMUX.c:25:25: warning: ‘qmi_QMIType’ defined but not used [-Wunused-const-variable=]
    static const QMI_NAME_T qmi_QMIType[] = {
    ^~~~~~~~~~~
    MPQMUX.c:20:25: warning: ‘qmi_CtlFlags’ defined but not used [-Wunused-const-variable=]
    static const QMI_NAME_T qmi_CtlFlags[] = {
    ^~~~~~~~~~~~
    MPQMUX.c:16:25: warning: ‘qmi_IFType’ defined but not used [-Wunused-const-variable=]
    static const QMI_NAME_T qmi_IFType[] = {
    ^~~~~~~~~~
    After reboot please start following command
    go to /home/pi/files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]
    Press any key to reboot!

    Any help or experience on this?
    Thanks

  13. I was able to get everything to compile successfully, but when I try to connect using my T-Mobile SIM I never get an IP address from DHCP. Any ideas why?

    I’m using a new six fab mPCI-E Base Shield (for 3G, 4G/LTE mPCI-E modules V2) and Quectel EC25-A modem with the full-band LTE antenna attached.

    $ sudo ./quectel-CM -s fast.t-mobile.com
    [05-31_13:47:55:990] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [05-31_13:47:55:991] ./quectel-CM profile[1] = fast.t-mobile.com///0, pincode = (null)
    [05-31_13:47:55:992] Find /sys/bus/usb/devices/1-1.3 idVendor=2c7c idProduct=0125
    [05-31_13:47:55:992] Find /sys/bus/usb/devices/1-1.3:1.4/net/wwan0
    [05-31_13:47:55:992] Find usbnet_adapter = wwan0
    [05-31_13:47:55:993] Find /sys/bus/usb/devices/1-1.3:1.4/usbmisc/cdc-wdm0
    [05-31_13:47:55:993] Find qmichannel = /dev/cdc-wdm0
    [05-31_13:47:56:009] cdc_wdm_fd = 7
    [05-31_13:47:56:106] Get clientWDS = 19
    [05-31_13:47:56:139] Get clientDMS = 1
    [05-31_13:47:56:170] Get clientNAS = 3
    [05-31_13:47:56:202] Get clientUIM = 1
    [05-31_13:47:56:235] Get clientWDA = 1
    [05-31_13:47:56:267] requestBaseBandVersion EC25AFAR05A04M4G
    [05-31_13:47:56:395] requestGetSIMStatus SIMStatus: SIM_READY
    [05-31_13:47:56:395] requestSetProfile[1] fast.t-mobile.com///0
    [05-31_13:47:56:459] requestGetProfile[1] fast.t-mobile.com///0
    [05-31_13:47:56:491] requestRegistrationState2 MCC: 310, MNC: 260, PS: Attached, DataCap: LTE
    [05-31_13:47:56:523] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
    [05-31_13:47:56:587] requestRegistrationState2 MCC: 310, MNC: 260, PS: Attached, DataCap: LTE
    [05-31_13:47:56:619] requestSetupDataCall WdsConnectionIPv4Handle: 0x871f4060
    [05-31_13:47:56:682] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
    [05-31_13:47:56:714] ifconfig wwan0 up
    [05-31_13:47:56:739] busybox udhcpc -f -n -q -t 5 -i wwan0
    [05-31_13:47:56:768] udhcpc (v1.22.1) started
    No resolv.conf for interface wwan0.udhcpc
    [05-31_13:47:56:883] Sending discover…
    [05-31_13:47:59:966] Sending discover…
    [05-31_13:48:03:046] Sending discover…
    [05-31_13:48:06:126] Sending discover…
    [05-31_13:48:46:360] Sending discover…
    [05-31_13:48:49:474] No lease, failing

  14. I have a working connection and all is fine for many hours. Then for some reason the connection drops and the sixfab device is no longer seen via usb. lsusb does not show the device and ls/dev dos not find the ttyUSB devices. a reboot of the pi does not solve the issue. The only way to recover is to power cycle the pI which in turn power cycles the six fab shield. So it looks to me that the modem is locking up and can only be recovered by a power cycle. Is there any way to reset or power cycle the modem without having to power cycle the pi. It is a remote application and I have no way to power cycle the pi when it locks up.

    1. Hello,

      Did you try resetting the module? Use GPIO26 (The pin is used to hardware reset the module, by pulling it HIGH)

      How long does the module work fine?

      1. Thanks that is what I was looking for. The modem can stay up for days before the issue happens. I have verified that GPIO26 resets the modem but need to let it run to see if it is enough to recover from the lock up.

Leave a Reply

Your email address will not be published. Required fields are marked *