QMI interface has been mostly asked tutorial for Raspberry Pi 3 and Raspberry Pi 4 with Quectel UC20 / Quectel EC25 attached on our Sixfab 3G-4G/LTE Base Shield v2.

##Note: This has been tested with Raspberry Pi 4 too.

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

Parts you will need.

  1. Raspberry Pi
  2. Sixfab 3G-4G/LTE Base Shield v2
  3. Quectel EC25 mini PCIe module
  4. LTE antenna (2 antennas are recommended)

Hardware Setup

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

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

Software Setup

  1. First run update
    sudo apt update && sudo apt upgrade
  2. Install Raspberry Pi kernel headers.
    sudo apt-get install raspberrypi-kernel-headersqmi_install_01
  3. Check installed kernel headers packet version ls /usr/src
    In our case, it is 4.14.79qmi_install_02
  4. Now open your browser and go to rpi-firmware github repository commits SKIP THIS STEP FOR RPi4qmi_install_03
  5. Here, find out your version and click on <> button to browse the repository at that point in the history. SKIP THIS STEP FOR RPi4qmi_install_04
  6. From the link copy the hash as shown in the image below. SKIP THIS STEP FOR RPi4qmi_install_05
  7. Now go back your terminal and update rpi in following format. Replace the term <hash> with your hash as shown in the image. SKIP THIS STEP FOR RPi4
    sudo rpi-update <hash>qmi_install_06
  8. Reboot your Raspberry Pi in order to activate the new firmware. SKIP THIS STEP FOR RPi4
  9. 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.shqmi_install_07
  10. Change the permission of the script.
    sudo chmod +x qmi_install.shqmi_install_08
  11. Make sure the module is disconnected before running the installer script
    sudo ./qmi_install.shqmi_install_09
  12. At the end of installation enter any key to reboot your Raspberry Pi and attach the USB cable of the shield.
  13. After rebooting goto directory  files/quectel-CM
    cd /files/quectel-CMqmi_install_10
  14. Now run the following command to connect to the Internet.
    sudo ./quectel-CM -s internet
    Usage: ./quectel-CM [-s [apn [user password auth]]] [-p pincode] [-f logfilename]
    -s [apn [user password auth]] Set apn/user/password/auth get from your network provider
    -p pincode Verify sim card pin if sim card is locked
    -f logfilename Save log message of this program to file
    Example 1: ./quectel-CM
    Example 2: ./quectel-CM -s 3gnet
    Example 3: ./quectel-CM -s 3gnet carl 1234 0 -p 1234 -f gobinet_log.txtqmi_install_11
  15. Now you can check you IP using
    ifconfig wwan0qmi_install_12
  16. Further more you may check by pinging ping -I wwan0 -c 5 8.8.8.8

 

Auto Connect on reboot

If you want your Raspberry Pi to automatically connect to the 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.shqmi_install_13
  2. Change the permission
    sudo chmod +x install_auto_connect.shqmi_install_14
  3. Now install the script
    sudo ./install_auto_connect.shqmi_install_15
  4. It will then ask for APN. Type in your APN and then press ENTERqmi_install_16
  5. Once you press enter it will create and activate the service.qmi_install_17
  6. The name of the service is qmi_reconnect. To check if the service is active you can type
    sudo systemctl status qmi_reconnect.serviceqmi_install_18
  7. If it is working fine then you will be able to see active(running) in green.qmi_install_19

 

84 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.

      1. Is QMI primarily used over USB to supply Internet to a computer? If yes, could this supply Internet to a Wireless AP, which may be a stronger hotspot that an RPi?

        Or is PPP still preferred as the hotspot method? I have my RPi 3B set up as a hotspot with the 3G/4G LTE shield, but I believe the speed should be faster. Wondering if QMI would help. Thanks.

        1. Yes, the module needs to be connected via USB.
          QMI is faster than PPP. You are right, QMI will be the best choice.

        2. Hey Eddie,
          Did you get this working with the QMI approach? I am trying to do the same thing… My sixfab hardware gets here in a couple days.

  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)

        1. hi Saeed
          I yesterday can success to internet and install auto connect.
          But… today still have “SIM_ABSENT” log, I am so confuse.My environment is the same to yesterday.
          List some log:
          at
          OK
          at
          OK
          at
          OK
          AT+CPIN
          ERROR
          AT+COPS
          OK
          AT+CSQ
          +CSQ: 31,99

          Now I install auto connect.Can I staill type “sudo ./quectel-CM -s internet” in comsole for test?

          1. Hi,

            Did you try with different sim too?

            If your reconnect service is active, before running sudo ./quectel-CM -s internet
            stop the reconnect service by sudo systemctl stop reconnect.service

          2. hi Saeed
            I can not reply in your response so I reply here.
            “Did you try with different sim too?” —> yes I try another sim also have”AT+CPIN ERROR” result

          3. Hi,

            Just sec…..

            The command need to be
            AT+CPIN?

            Don’t igonre the “?” mark at the end. 🙂

          4. hi Saeed
            hahaha sory for my little eyes
            List some log:

            sim card 1
            AT+CPIN?
            +CME ERROR: 10
            at
            OK

            sim card 2
            AT
            OK
            AT
            OK
            AT+CPIN?
            +CME ERROR: 10

            I try two sim cards but the log all “CME ERROR: 10”

          5. Hi Could you please email us the image of your hardware setup at hello[at]sixfab [dot] com.

  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

      1. Could you please look at the output I get after finishing step 14 of the instructions? The first line is the commad that starts it all and the output follows
        towards the end, there is a “sending discover ….” and a “no lease, failing” that seems odd. and then there is an everlasting loop. Any help is appreciated.

        [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s NXTGENPHONE
        [10-01_12:23:17:252] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
        [10-01_12:23:17:253] ./quectel-CM profile[1] = NXTGENPHONE///0, pincode = (null)
        [10-01_12:23:17:255] Find /sys/bus/usb/devices/1-1.2 idVendor=2c7c idProduct=0125
        [10-01_12:23:17:255] Find /sys/bus/usb/devices/1-1.2:1.4/net/wwan0
        [10-01_12:23:17:255] Find usbnet_adapter = wwan0
        [10-01_12:23:17:256] Find /sys/bus/usb/devices/1-1.2:1.4/usbmisc/cdc-wdm0
        [10-01_12:23:17:256] Find qmichannel = /dev/cdc-wdm0
        [10-01_12:23:17:283] cdc_wdm_fd = 7
        [10-01_12:23:17:973] Get clientWDS = 19
        [10-01_12:23:18:005] Get clientDMS = 1
        [10-01_12:23:18:037] Get clientNAS = 3
        [10-01_12:23:18:069] Get clientUIM = 1
        [10-01_12:23:18:101] Get clientWDA = 1
        [10-01_12:23:18:133] requestBaseBandVersion EC25AFAR05A04M4G
        [10-01_12:23:18:261] requestGetSIMStatus SIMStatus: SIM_READY
        [10-01_12:23:18:261] requestSetProfile[1] NXTGENPHONE///0
        [10-01_12:23:18:325] requestGetProfile[1] NXTGENPHONE///0
        [10-01_12:23:18:357] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:23:18:389] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
        [10-01_12:23:18:453] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:23:18:487] requestSetupDataCall WdsConnectionIPv4Handle: 0x871f1da0
        [10-01_12:23:18:549] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
        [10-01_12:23:18:581] ifconfig wwan0 up
        [10-01_12:23:18:589] busybox udhcpc -f -n -q -t 5 -i wwan0
        [10-01_12:23:18:593] udhcpc (v1.22.1) started
        No resolv.conf for interface wwan0.udhcpc
        [10-01_12:23:18:705] Sending discover…
        [10-01_12:23:21:798] Sending discover…
        [10-01_12:23:24:908] Sending discover…
        [10-01_12:23:27:998] Sending discover…
        [10-01_12:23:31:087] Sending discover…
        [10-01_12:23:34:203] No lease, failing
        [10-01_12:24:47:445] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:25:28:277] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:25:37:237] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:25:44:917] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:13:077] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:20:885] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:28:500] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:36:180] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:43:892] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:51:572] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
        [10-01_12:26:59:220] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE

        1. sudo ./quectel-CM -s is a non-ending command as long as the connection is up.

          requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: LTE
          Shows your device is connected to an LTE connection.

          You can check your connectivity on a new terminal with
          ping -I wwan0 google.com

  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.

  15. I was able to get connected with this process using the USB connection on my Raspberry Pi Cellular IoT HAT with Verizon SIM, however, is there a way to get the QMI connection to function as a WWAN using the RPi’s header instead of the USB cable? Similar to the PPP installer tutorial.

  16. FYI, I’ve compiled the code on a new Rpi 4 under Raspbian Buster OS and it qmi interface works fine. There are warnings that probably must be fixed.

  17. sudo ./qmi_install.sh
    Clear Files
    Change directory to /home/pi
    Downloading source files
    –2019-07-08 19:39:04– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving github.com (github.com)… 192.30.253.113
    Connecting to github.com (github.com)|192.30.253.113|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip [following]
    –2019-07-08 19:39:04– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.192.133, 151.101.0.133, 151.101.64.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.192.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 66876 (65K) [application/zip]
    Saving to: ‘quectel-CM.zip’

    quectel-CM.zip 100%[===================>] 65.31K –.-KB/s in 0.06s

    2019-07-08 19:39:05 (1.14 MB/s) – ‘quectel-CM.zip’ saved [66876/66876]

    Archive: quectel-CM.zip
    creating: /home/pi/files/quectel-CM/
    inflating: /home/pi/files/quectel-CM/util.h
    inflating: /home/pi/files/quectel-CM/util.c
    inflating: /home/pi/files/quectel-CM/udhcpc.c
    inflating: /home/pi/files/quectel-CM/quectel-qmi-proxy.c
    inflating: /home/pi/files/quectel-CM/QmiWwanCM.c
    inflating: /home/pi/files/quectel-CM/QMIThread.h
    inflating: /home/pi/files/quectel-CM/QMIThread.c
    inflating: /home/pi/files/quectel-CM/MPQMUX.h
    inflating: /home/pi/files/quectel-CM/MPQMUX.c
    inflating: /home/pi/files/quectel-CM/MPQMI.h
    inflating: /home/pi/files/quectel-CM/MPQCTL.h
    inflating: /home/pi/files/quectel-CM/Makefile
    inflating: /home/pi/files/quectel-CM/main.c
    inflating: /home/pi/files/quectel-CM/GobiNetCM.c
    inflating: /home/pi/files/quectel-CM/dhcpclient.c
    inflating: /home/pi/files/quectel-CM/default.script
    Checking Kernel
    4.19.50-v7+ based kernel found
    Downloading source files
    –2019-07-08 19:39:05– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving github.com (github.com)… 192.30.253.113
    Connecting to github.com (github.com)|192.30.253.113|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip [following]
    –2019-07-08 19:39:05– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.128.133, 151.101.64.133, 151.101.0.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 101553 (99K) [application/zip]
    Saving to: ‘drivers.zip’

    drivers.zip 100%[===================>] 99.17K –.-KB/s in 0.09s

    2019-07-08 19:39:06 (1.12 MB/s) – ‘drivers.zip’ saved [101553/101553]

    Archive: drivers.zip
    creating: /home/pi/files/drivers/
    creating: /home/pi/files/drivers/.git/
    extracting: /home/pi/files/drivers/.git/COMMIT_EDITMSG
    extracting: /home/pi/files/drivers/.git/HEAD
    inflating: /home/pi/files/drivers/.git/config
    inflating: /home/pi/files/drivers/.git/description
    creating: /home/pi/files/drivers/.git/hooks/
    inflating: /home/pi/files/drivers/.git/hooks/applypatch-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/fsmonitor-watchman.sample
    inflating: /home/pi/files/drivers/.git/hooks/post-update.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-applypatch.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-commit.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-push.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-rebase.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-receive.sample
    inflating: /home/pi/files/drivers/.git/hooks/prepare-commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/update.sample
    inflating: /home/pi/files/drivers/.git/index
    creating: /home/pi/files/drivers/.git/info/
    inflating: /home/pi/files/drivers/.git/info/exclude
    creating: /home/pi/files/drivers/.git/logs/
    inflating: /home/pi/files/drivers/.git/logs/HEAD
    creating: /home/pi/files/drivers/.git/logs/refs/
    creating: /home/pi/files/drivers/.git/logs/refs/heads/
    inflating: /home/pi/files/drivers/.git/logs/refs/heads/master
    creating: /home/pi/files/drivers/.git/objects/
    creating: /home/pi/files/drivers/.git/objects/03/
    extracting: /home/pi/files/drivers/.git/objects/03/5c2935335b6c52c0815f35c9d1575f5c29a59f
    creating: /home/pi/files/drivers/.git/objects/19/
    extracting: /home/pi/files/drivers/.git/objects/19/5ba83612ad35f67e55c282e64ea5b637313113
    creating: /home/pi/files/drivers/.git/objects/25/
    extracting: /home/pi/files/drivers/.git/objects/25/926acedbfa6265c542319e1938b3bdd90ee485
    creating: /home/pi/files/drivers/.git/objects/39/
    extracting: /home/pi/files/drivers/.git/objects/39/dec0a7d5ff21373eacc04b3bdb45ae21bc5d09
    creating: /home/pi/files/drivers/.git/objects/61/
    extracting: /home/pi/files/drivers/.git/objects/61/3f91add03da189c0fd5334cbccbbf720060079
    creating: /home/pi/files/drivers/.git/objects/6e/
    extracting: /home/pi/files/drivers/.git/objects/6e/bd8c4cc4d3e73319f0b11790d417da1ec690fa
    creating: /home/pi/files/drivers/.git/objects/72/
    extracting: /home/pi/files/drivers/.git/objects/72/a55b6b421184c4fb69411ba3d0150e6c337a88
    creating: /home/pi/files/drivers/.git/objects/91/
    extracting: /home/pi/files/drivers/.git/objects/91/2472f26e4f6c5a9ad30357f7a47d9a3085a1d9
    creating: /home/pi/files/drivers/.git/objects/92/
    extracting: /home/pi/files/drivers/.git/objects/92/cb4b634d343b2fda1752788c459aa21b5e00b2
    creating: /home/pi/files/drivers/.git/objects/a7/
    extracting: /home/pi/files/drivers/.git/objects/a7/52b118ac3c4bc0714022c869ce41093bce9710
    creating: /home/pi/files/drivers/.git/objects/b4/
    extracting: /home/pi/files/drivers/.git/objects/b4/28445756a9e7994114e7aee3a9ea1b5b2ac994
    creating: /home/pi/files/drivers/.git/objects/d2/
    extracting: /home/pi/files/drivers/.git/objects/d2/8dab4b9effcd5d766bb76fa2e2d92de7dcd4f1
    creating: /home/pi/files/drivers/.git/objects/e7/
    inflating: /home/pi/files/drivers/.git/objects/e7/2ad9f81c73973b86bd7992c0f331039a8192bf
    creating: /home/pi/files/drivers/.git/objects/f0/
    extracting: /home/pi/files/drivers/.git/objects/f0/9393322edaf3f9356d5ab816db40e21d78f7aa
    creating: /home/pi/files/drivers/.git/refs/
    creating: /home/pi/files/drivers/.git/refs/heads/
    extracting: /home/pi/files/drivers/.git/refs/heads/master
    inflating: /home/pi/files/drivers/99-quectel-modem.rules
    inflating: /home/pi/files/drivers/Makefile
    creating: /home/pi/files/drivers/drivers/
    creating: /home/pi/files/drivers/drivers/net/
    creating: /home/pi/files/drivers/drivers/net/usb/
    inflating: /home/pi/files/drivers/drivers/net/usb/qmi_wwan.c
    creating: /home/pi/files/drivers/drivers/usb/
    creating: /home/pi/files/drivers/drivers/usb/serial/
    inflating: /home/pi/files/drivers/drivers/usb/serial/option.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/qcserial.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb-wwan.h
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb_wwan.c
    Installing udhcpc
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    udhcpc is already the newest version (1:1.30.1-4).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    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 -o -name *.ur-safe | xargs rm -rf
    make -C /lib/modules/4.19.50-v7+/build M=/home/pi/files/drivers modules
    make[1]: *** /lib/modules/4.19.50-v7+/build: No such file or directory. Stop.
    make: *** [Makefile:10: modules] Error 2
    Change directory to /home/pi/files/quectel-CM
    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 were guarded by the ‘if’
    return 0;
    ^~~~~~
    main.c: In function ‘qmidevice_detect’:
    main.c:401:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~
    main.c:401:13: note: ‘snprintf’ output between 11 and 520 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:408:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~
    main.c:408:13: note: ‘snprintf’ output between 12 and 521 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:422:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name);
    ^~
    main.c:422:13: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name ;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:448:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~
    main.c:448:13: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:450:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~
    main.c:450:17: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:452:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~
    main.c:452:21: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:471:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 27 [-Wformat-truncation=]
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~
    main.c:471:17: note: ‘snprintf’ output between 6 and 261 bytes into a destination of size 32
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:474:55: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~
    main.c:474:17: note: ‘snprintf’ output between 9 and 518 bytes into a destination of size 255
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:526:54: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:526:17: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:532:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:532:21: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:523:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 45 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~
    main.c:523:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    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[] = {
    ^~~~~~~~~~
    udhcpc.c: In function ‘udhcpc_start’:
    udhcpc.c:144:71: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 110 [-Wformat-truncation=]
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~ ~~~~~~~~~~~~~~~~

    udhcpc.c:144:17: note: ‘snprintf’ output between 19 and 146 bytes into a destination of size 128
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After reboot please follow commands mentioned below
    go to /home/pi/files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]
    Press ENTER key to rebootsu
    Using username “pi”.
    Authenticating with public key “imported-openssh-key”
    Linux raspberrypi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Mon Jul 8 19:39:40 2019
    [email protected]:~ $ cd files/quectel-CM/
    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s ndo
    [07-08_19:40:58:812] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [07-08_19:40:58:813] ./quectel-CM profile[1] = ndo///0, pincode = (null)
    [07-08_19:40:58:816] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s ndo
    [07-08_19:40:58:812] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [07-08_19:40:58:813] ./quectel-CM profile[1] = ndo///0, pincode = (null)
    [07-08_19:40:58:816] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
    [07-08_19:41:21:671] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [07-08_19:41:21:672] ./quectel-CM profile[1] = ndo///0, pincode = (null)
    [07-08_19:41:21:675] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
    [email protected]:~/files/quectel-CM $ [07-08_19:40:58:812] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [1] 707
    [2] 708
    -bash: [07-08_19:40:58:812]: command not found
    -bash: LTE_QConnectManager_Linux: command not found
    -bash: Android_V1.1.45: command not found
    [1]- Exit 127 [07-08_19:40:58:812] WCDMA
    [2]+ Exit 127 LTE_QConnectManager_Linux
    [email protected]:~/files/quectel-CM $ [07-08_19:40:58:813] ./quectel-CM profile[1] = ndo///0, pincode = (null)
    -bash: syntax error near unexpected token ('
    [email protected]:~/files/quectel-CM $ [07-08_19:40:58:816] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
    -bash: syntax error near unexpected token
    (‘
    [email protected]:~/files/quectel-CM $ ^C^C
    [email protected]:~/files/quectel-CM $ ^C
    [email protected]:~/files/quectel-CM $ exit^C
    [email protected]:~/files/quectel-CM $ ^C
    [email protected]:~/files/quectel-CM $ cd ~
    [email protected]:~ $ pwd
    /home/pi
    [email protected]:~ $ ls
    Audio Desktop Downloads files qmi_install.sh Videos
    [email protected]:~ $ wget https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/qmi_install.sh
    –2019-07-08 19:43:31– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/qmi_install.sh
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.192.133, 151.101.0.133, 151.101.64.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.192.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 2120 (2.1K) [text/plain]
    Saving to: ‘qmi_install.sh.1’

    qmi_install.sh.1 100%[===================>] 2.07K –.-KB/s in 0s

    2019-07-08 19:43:31 (9.32 MB/s) – ‘qmi_install.sh.1’ saved [2120/2120]

    [email protected]:~ $ exit^C
    [email protected]:~ $ ^C
    [email protected]:~ $ sudo chmod +x qmi_install.sh
    [email protected]:~ $ sudo ./qmi_install.sh
    Clear Files
    Change directory to /home/pi
    Downloading source files
    –2019-07-08 19:44:15– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving github.com (github.com)… 140.82.114.4
    Connecting to github.com (github.com)|140.82.114.4|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip [following]
    –2019-07-08 19:44:16– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.192.133, 151.101.0.133, 151.101.64.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.192.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 66876 (65K) [application/zip]
    Saving to: ‘quectel-CM.zip’

    quectel-CM.zip 100%[===================>] 65.31K –.-KB/s in 0.05s

    2019-07-08 19:44:16 (1.16 MB/s) – ‘quectel-CM.zip’ saved [66876/66876]

    Archive: quectel-CM.zip
    creating: /home/pi/files/quectel-CM/
    inflating: /home/pi/files/quectel-CM/util.h
    inflating: /home/pi/files/quectel-CM/util.c
    inflating: /home/pi/files/quectel-CM/udhcpc.c
    inflating: /home/pi/files/quectel-CM/quectel-qmi-proxy.c
    inflating: /home/pi/files/quectel-CM/QmiWwanCM.c
    inflating: /home/pi/files/quectel-CM/QMIThread.h
    inflating: /home/pi/files/quectel-CM/QMIThread.c
    inflating: /home/pi/files/quectel-CM/MPQMUX.h
    inflating: /home/pi/files/quectel-CM/MPQMUX.c
    inflating: /home/pi/files/quectel-CM/MPQMI.h
    inflating: /home/pi/files/quectel-CM/MPQCTL.h
    inflating: /home/pi/files/quectel-CM/Makefile
    inflating: /home/pi/files/quectel-CM/main.c
    inflating: /home/pi/files/quectel-CM/GobiNetCM.c
    inflating: /home/pi/files/quectel-CM/dhcpclient.c
    inflating: /home/pi/files/quectel-CM/default.script
    Checking Kernel
    4.19.50-v7+ based kernel found
    Downloading source files
    –2019-07-08 19:44:16– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving github.com (github.com)… 140.82.114.4
    Connecting to github.com (github.com)|140.82.114.4|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip [following]
    –2019-07-08 19:44:16– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.128.133, 151.101.64.133, 151.101.0.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 101553 (99K) [application/zip]
    Saving to: ‘drivers.zip’

    drivers.zip 100%[===================>] 99.17K –.-KB/s in 0.09s

    2019-07-08 19:44:17 (1.12 MB/s) – ‘drivers.zip’ saved [101553/101553]

    Archive: drivers.zip
    creating: /home/pi/files/drivers/
    creating: /home/pi/files/drivers/.git/
    extracting: /home/pi/files/drivers/.git/COMMIT_EDITMSG
    extracting: /home/pi/files/drivers/.git/HEAD
    inflating: /home/pi/files/drivers/.git/config
    inflating: /home/pi/files/drivers/.git/description
    creating: /home/pi/files/drivers/.git/hooks/
    inflating: /home/pi/files/drivers/.git/hooks/applypatch-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/fsmonitor-watchman.sample
    inflating: /home/pi/files/drivers/.git/hooks/post-update.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-applypatch.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-commit.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-push.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-rebase.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-receive.sample
    inflating: /home/pi/files/drivers/.git/hooks/prepare-commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/update.sample
    inflating: /home/pi/files/drivers/.git/index
    creating: /home/pi/files/drivers/.git/info/
    inflating: /home/pi/files/drivers/.git/info/exclude
    creating: /home/pi/files/drivers/.git/logs/
    inflating: /home/pi/files/drivers/.git/logs/HEAD
    creating: /home/pi/files/drivers/.git/logs/refs/
    creating: /home/pi/files/drivers/.git/logs/refs/heads/
    inflating: /home/pi/files/drivers/.git/logs/refs/heads/master
    creating: /home/pi/files/drivers/.git/objects/
    creating: /home/pi/files/drivers/.git/objects/03/
    extracting: /home/pi/files/drivers/.git/objects/03/5c2935335b6c52c0815f35c9d1575f5c29a59f
    creating: /home/pi/files/drivers/.git/objects/19/
    extracting: /home/pi/files/drivers/.git/objects/19/5ba83612ad35f67e55c282e64ea5b637313113
    creating: /home/pi/files/drivers/.git/objects/25/
    extracting: /home/pi/files/drivers/.git/objects/25/926acedbfa6265c542319e1938b3bdd90ee485
    creating: /home/pi/files/drivers/.git/objects/39/
    extracting: /home/pi/files/drivers/.git/objects/39/dec0a7d5ff21373eacc04b3bdb45ae21bc5d09
    creating: /home/pi/files/drivers/.git/objects/61/
    extracting: /home/pi/files/drivers/.git/objects/61/3f91add03da189c0fd5334cbccbbf720060079
    creating: /home/pi/files/drivers/.git/objects/6e/
    extracting: /home/pi/files/drivers/.git/objects/6e/bd8c4cc4d3e73319f0b11790d417da1ec690fa
    creating: /home/pi/files/drivers/.git/objects/72/
    extracting: /home/pi/files/drivers/.git/objects/72/a55b6b421184c4fb69411ba3d0150e6c337a88
    creating: /home/pi/files/drivers/.git/objects/91/
    extracting: /home/pi/files/drivers/.git/objects/91/2472f26e4f6c5a9ad30357f7a47d9a3085a1d9
    creating: /home/pi/files/drivers/.git/objects/92/
    extracting: /home/pi/files/drivers/.git/objects/92/cb4b634d343b2fda1752788c459aa21b5e00b2
    creating: /home/pi/files/drivers/.git/objects/a7/
    extracting: /home/pi/files/drivers/.git/objects/a7/52b118ac3c4bc0714022c869ce41093bce9710
    creating: /home/pi/files/drivers/.git/objects/b4/
    extracting: /home/pi/files/drivers/.git/objects/b4/28445756a9e7994114e7aee3a9ea1b5b2ac994
    creating: /home/pi/files/drivers/.git/objects/d2/
    extracting: /home/pi/files/drivers/.git/objects/d2/8dab4b9effcd5d766bb76fa2e2d92de7dcd4f1
    creating: /home/pi/files/drivers/.git/objects/e7/
    inflating: /home/pi/files/drivers/.git/objects/e7/2ad9f81c73973b86bd7992c0f331039a8192bf
    creating: /home/pi/files/drivers/.git/objects/f0/
    extracting: /home/pi/files/drivers/.git/objects/f0/9393322edaf3f9356d5ab816db40e21d78f7aa
    creating: /home/pi/files/drivers/.git/refs/
    creating: /home/pi/files/drivers/.git/refs/heads/
    extracting: /home/pi/files/drivers/.git/refs/heads/master
    inflating: /home/pi/files/drivers/99-quectel-modem.rules
    inflating: /home/pi/files/drivers/Makefile
    creating: /home/pi/files/drivers/drivers/
    creating: /home/pi/files/drivers/drivers/net/
    creating: /home/pi/files/drivers/drivers/net/usb/
    inflating: /home/pi/files/drivers/drivers/net/usb/qmi_wwan.c
    creating: /home/pi/files/drivers/drivers/usb/
    creating: /home/pi/files/drivers/drivers/usb/serial/
    inflating: /home/pi/files/drivers/drivers/usb/serial/option.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/qcserial.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb-wwan.h
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb_wwan.c
    Installing udhcpc
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    udhcpc is already the newest version (1:1.30.1-4).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    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 -o -name *.ur-safe | xargs rm -rf
    make -C /lib/modules/4.19.50-v7+/build M=/home/pi/files/drivers modules
    make[1]: *** /lib/modules/4.19.50-v7+/build: No such file or directory. Stop.
    make: *** [Makefile:10: modules] Error 2
    Change directory to /home/pi/files/quectel-CM
    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 were guarded by the ‘if’
    return 0;
    ^~~~~~
    main.c: In function ‘qmidevice_detect’:
    main.c:401:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~
    main.c:401:13: note: ‘snprintf’ output between 11 and 520 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:408:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~
    main.c:408:13: note: ‘snprintf’ output between 12 and 521 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:422:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name);
    ^~
    main.c:422:13: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name ;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:448:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~
    main.c:448:13: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:450:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~
    main.c:450:17: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:452:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~
    main.c:452:21: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:471:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 27 [-Wformat-truncation=]
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~
    main.c:471:17: note: ‘snprintf’ output between 6 and 261 bytes into a destination of size 32
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:474:55: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~
    main.c:474:17: note: ‘snprintf’ output between 9 and 518 bytes into a destination of size 255
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:526:54: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:526:17: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:532:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:532:21: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:523:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 45 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~
    main.c:523:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    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[] = {
    ^~~~~~~~~~
    udhcpc.c: In function ‘udhcpc_start’:
    udhcpc.c:144:71: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 110 [-Wformat-truncation=]
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~ ~~~~~~~~~~~~~~~~

    udhcpc.c:144:17: note: ‘snprintf’ output between 19 and 146 bytes into a destination of size 128
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After reboot please follow commands mentioned below
    go to /home/pi/files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]
    Press ENTER key to reboot^C
    [email protected]:~ $ ^C
    [email protected]:~ $ make
    make: *** No targets specified and no makefile found. Stop.
    [email protected]:~ $
    [email protected]:~ $
    [email protected]:~ $ sudo apt-get install raspberrypi-kernel-headers
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    raspberrypi-kernel-headers
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 24.9 MB of archives.
    After this operation, 163 MB of additional disk space will be used.
    Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20190620+1-1 [24.9 MB]
    Fetched 24.9 MB in 3s (7,619 kB/s)
    Selecting previously unselected package raspberrypi-kernel-headers.
    (Reading database … 91783 files and directories currently installed.)
    Preparing to unpack …/raspberrypi-kernel-headers_1.20190620+1-1_armhf.deb …
    Unpacking raspberrypi-kernel-headers (1.20190620+1-1) …
    Setting up raspberrypi-kernel-headers (1.20190620+1-1) …
    [email protected]:~ $ ls /usr/src
    linux-headers-4.19.50+ linux-headers-4.19.50-v7l+
    linux-headers-4.19.50-v7+ sense-hat
    [email protected]:~ $ sudo reboot
    [email protected]:~ $
    Using username “pi”.
    Authenticating with public key “imported-openssh-key”
    Linux raspberrypi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Mon Jul 8 19:50:37 2019

    [email protected]:~ $
    [email protected]:~ $
    [email protected]:~ $ sudo ./qmi_install.sh
    Clear Files
    Change directory to /home/pi
    Downloading source files
    –2019-07-08 19:50:49– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving github.com (github.com)… 192.30.253.113
    Connecting to github.com (github.com)|192.30.253.113|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip [following]
    –2019-07-08 19:50:50– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.128.133, 151.101.192.133, 151.101.0.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 66876 (65K) [application/zip]
    Saving to: ‘quectel-CM.zip’

    quectel-CM.zip 100%[===================>] 65.31K –.-KB/s in 0.07s

    2019-07-08 19:50:50 (1004 KB/s) – ‘quectel-CM.zip’ saved [66876/66876]

    Archive: quectel-CM.zip
    creating: /home/pi/files/quectel-CM/
    inflating: /home/pi/files/quectel-CM/util.h
    inflating: /home/pi/files/quectel-CM/util.c
    inflating: /home/pi/files/quectel-CM/udhcpc.c
    inflating: /home/pi/files/quectel-CM/quectel-qmi-proxy.c
    inflating: /home/pi/files/quectel-CM/QmiWwanCM.c
    inflating: /home/pi/files/quectel-CM/QMIThread.h
    inflating: /home/pi/files/quectel-CM/QMIThread.c
    inflating: /home/pi/files/quectel-CM/MPQMUX.h
    inflating: /home/pi/files/quectel-CM/MPQMUX.c
    inflating: /home/pi/files/quectel-CM/MPQMI.h
    inflating: /home/pi/files/quectel-CM/MPQCTL.h
    inflating: /home/pi/files/quectel-CM/Makefile
    inflating: /home/pi/files/quectel-CM/main.c
    inflating: /home/pi/files/quectel-CM/GobiNetCM.c
    inflating: /home/pi/files/quectel-CM/dhcpclient.c
    inflating: /home/pi/files/quectel-CM/default.script
    Checking Kernel
    4.19.50-v7+ based kernel found
    Downloading source files
    –2019-07-08 19:50:50– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving github.com (github.com)… 192.30.253.113
    Connecting to github.com (github.com)|192.30.253.113|:443… connected.
    HTTP request sent, awaiting response… 302 Found
    Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip [following]
    –2019-07-08 19:50:50– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.64.133, 151.101.0.133, 151.101.192.133, …
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.64.133|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 101553 (99K) [application/zip]
    Saving to: ‘drivers.zip’

    drivers.zip 100%[===================>] 99.17K –.-KB/s in 0.08s

    2019-07-08 19:50:51 (1.18 MB/s) – ‘drivers.zip’ saved [101553/101553]

    Archive: drivers.zip
    creating: /home/pi/files/drivers/
    creating: /home/pi/files/drivers/.git/
    extracting: /home/pi/files/drivers/.git/COMMIT_EDITMSG
    extracting: /home/pi/files/drivers/.git/HEAD
    inflating: /home/pi/files/drivers/.git/config
    inflating: /home/pi/files/drivers/.git/description
    creating: /home/pi/files/drivers/.git/hooks/
    inflating: /home/pi/files/drivers/.git/hooks/applypatch-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/fsmonitor-watchman.sample
    inflating: /home/pi/files/drivers/.git/hooks/post-update.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-applypatch.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-commit.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-push.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-rebase.sample
    inflating: /home/pi/files/drivers/.git/hooks/pre-receive.sample
    inflating: /home/pi/files/drivers/.git/hooks/prepare-commit-msg.sample
    inflating: /home/pi/files/drivers/.git/hooks/update.sample
    inflating: /home/pi/files/drivers/.git/index
    creating: /home/pi/files/drivers/.git/info/
    inflating: /home/pi/files/drivers/.git/info/exclude
    creating: /home/pi/files/drivers/.git/logs/
    inflating: /home/pi/files/drivers/.git/logs/HEAD
    creating: /home/pi/files/drivers/.git/logs/refs/
    creating: /home/pi/files/drivers/.git/logs/refs/heads/
    inflating: /home/pi/files/drivers/.git/logs/refs/heads/master
    creating: /home/pi/files/drivers/.git/objects/
    creating: /home/pi/files/drivers/.git/objects/03/
    extracting: /home/pi/files/drivers/.git/objects/03/5c2935335b6c52c0815f35c9d1575f5c29a59f
    creating: /home/pi/files/drivers/.git/objects/19/
    extracting: /home/pi/files/drivers/.git/objects/19/5ba83612ad35f67e55c282e64ea5b637313113
    creating: /home/pi/files/drivers/.git/objects/25/
    extracting: /home/pi/files/drivers/.git/objects/25/926acedbfa6265c542319e1938b3bdd90ee485
    creating: /home/pi/files/drivers/.git/objects/39/
    extracting: /home/pi/files/drivers/.git/objects/39/dec0a7d5ff21373eacc04b3bdb45ae21bc5d09
    creating: /home/pi/files/drivers/.git/objects/61/
    extracting: /home/pi/files/drivers/.git/objects/61/3f91add03da189c0fd5334cbccbbf720060079
    creating: /home/pi/files/drivers/.git/objects/6e/
    extracting: /home/pi/files/drivers/.git/objects/6e/bd8c4cc4d3e73319f0b11790d417da1ec690fa
    creating: /home/pi/files/drivers/.git/objects/72/
    extracting: /home/pi/files/drivers/.git/objects/72/a55b6b421184c4fb69411ba3d0150e6c337a88
    creating: /home/pi/files/drivers/.git/objects/91/
    extracting: /home/pi/files/drivers/.git/objects/91/2472f26e4f6c5a9ad30357f7a47d9a3085a1d9
    creating: /home/pi/files/drivers/.git/objects/92/
    extracting: /home/pi/files/drivers/.git/objects/92/cb4b634d343b2fda1752788c459aa21b5e00b2
    creating: /home/pi/files/drivers/.git/objects/a7/
    extracting: /home/pi/files/drivers/.git/objects/a7/52b118ac3c4bc0714022c869ce41093bce9710
    creating: /home/pi/files/drivers/.git/objects/b4/
    extracting: /home/pi/files/drivers/.git/objects/b4/28445756a9e7994114e7aee3a9ea1b5b2ac994
    creating: /home/pi/files/drivers/.git/objects/d2/
    extracting: /home/pi/files/drivers/.git/objects/d2/8dab4b9effcd5d766bb76fa2e2d92de7dcd4f1
    creating: /home/pi/files/drivers/.git/objects/e7/
    inflating: /home/pi/files/drivers/.git/objects/e7/2ad9f81c73973b86bd7992c0f331039a8192bf
    creating: /home/pi/files/drivers/.git/objects/f0/
    extracting: /home/pi/files/drivers/.git/objects/f0/9393322edaf3f9356d5ab816db40e21d78f7aa
    creating: /home/pi/files/drivers/.git/refs/
    creating: /home/pi/files/drivers/.git/refs/heads/
    extracting: /home/pi/files/drivers/.git/refs/heads/master
    inflating: /home/pi/files/drivers/99-quectel-modem.rules
    inflating: /home/pi/files/drivers/Makefile
    creating: /home/pi/files/drivers/drivers/
    creating: /home/pi/files/drivers/drivers/net/
    creating: /home/pi/files/drivers/drivers/net/usb/
    inflating: /home/pi/files/drivers/drivers/net/usb/qmi_wwan.c
    creating: /home/pi/files/drivers/drivers/usb/
    creating: /home/pi/files/drivers/drivers/usb/serial/
    inflating: /home/pi/files/drivers/drivers/usb/serial/option.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/qcserial.c
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb-wwan.h
    inflating: /home/pi/files/drivers/drivers/usb/serial/usb_wwan.c
    Installing udhcpc
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    udhcpc is already the newest version (1:1.30.1-4).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    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 -o -name *.ur-safe | xargs rm -rf
    make -C /lib/modules/4.19.50-v7+/build M=/home/pi/files/drivers modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.19.50-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
    Building modules, stage 2.
    MODPOST 4 modules
    CC /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.mod.o
    LD [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/option.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/option.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/qcserial.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.ko
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.50-v7+’
    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 -o -name *.ur-safe | xargs rm -rf
    make -C /lib/modules/4.19.50-v7+/build M=/home/pi/files/drivers modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.19.50-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
    Building modules, stage 2.
    MODPOST 4 modules
    CC /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.mod.o
    LD [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/option.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/option.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/qcserial.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.ko
    CC /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.mod.o
    LD [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.ko
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.50-v7+’
    cp /home/pi/files/drivers/drivers/usb/serial/option.ko /lib/modules/4.19.50-v7+/kernel/drivers/usb/serial/
    cp /home/pi/files/drivers/drivers/usb/serial/usb_wwan.ko /lib/modules/4.19.50-v7+/kernel/drivers/usb/serial/
    cp /home/pi/files/drivers/drivers/usb/serial/qcserial.ko /lib/modules/4.19.50-v7+/kernel/drivers/usb/serial/
    cp /home/pi/files/drivers/drivers/net/usb/qmi_wwan.ko /lib/modules/4.19.50-v7+/kernel/drivers/net/usb/
    modprobe -r option qcserial qmi_wwan
    depmod
    Change directory to /home/pi/files/quectel-CM
    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 were guarded by the ‘if’
    return 0;
    ^~~~~~
    main.c: In function ‘qmidevice_detect’:
    main.c:401:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~
    main.c:401:13: note: ‘snprintf’ output between 11 and 520 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idVendor”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:408:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~
    main.c:408:13: note: ‘snprintf’ output between 12 and 521 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s/idProduct”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:422:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name);
    ^~
    main.c:422:13: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/net”, dir, ent->d_name ;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:448:50: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~
    main.c:448:13: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/GobiQMI”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:450:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~
    main.c:450:17: note: ‘snprintf’ output between 14 and 523 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usbmisc”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:452:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~
    main.c:452:21: note: ‘snprintf’ output between 10 and 519 bytes into a destination of size 255
    snprintf(subdir, sizeof(subdir), “%s/%s:1.4/usb”, dir, ent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:471:58: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 27 [-Wformat-truncation=]
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~
    main.c:471:17: note: ‘snprintf’ output between 6 and 261 bytes into a destination of size 32
    snprintf(qmifile, sizeof(qmifile), “/dev/%s”, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:474:55: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~
    main.c:474:17: note: ‘snprintf’ output between 9 and 518 bytes into a destination of size 255
    snprintf(subdir2, sizeof(subdir), “%s/%s/uevent”,subdir, subent->d_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:526:54: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:526:17: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/usb%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:532:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 46 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~
    main.c:532:21: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/eth%s”, &ent->d_name[strlen(“qcqmi”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c:523:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 45 [-Wformat-overflow=]
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~
    main.c:523:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 64
    sprintf(net_path, “/sys/class/net/wwan%s”, &ent->d_name[strlen(“cdc-wdm”)]);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    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[] = {
    ^~~~~~~~~~
    udhcpc.c: In function ‘udhcpc_start’:
    udhcpc.c:144:71: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 110 [-Wformat-truncation=]
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~ ~~~~~~~~~~~~~~~~

    udhcpc.c:144:17: note: ‘snprintf’ output between 19 and 146 bytes into a destination of size 128
    snprintf(shell_cmd, sizeof(shell_cmd), “echo 0x%08x > %s”, profile->ipv4.Address, BRIDGE_IPV4_FILE);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After reboot please follow commands mentioned below
    go to /home/pi/files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]
    Press ENTER key to reboot
    Using username “pi”.
    Authenticating with public key “imported-openssh-key”
    Linux raspberrypi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Mon Jul 8 19:52:29 2019
    [email protected]:~ $ cd files/quectel-CM/
    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s ndo
    [07-08_19:54:52:750] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [07-08_19:54:52:751] ./quectel-CM profile[1] = ndo///0, pincode = (null)
    [07-08_19:54:52:753] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules
    [email protected]:~/files/quectel-CM $

  18. NOTE: new kernel come out on PI 3 and 4. The qmi tools need to be recompiled against new kernel to work again. Re-execute the procedure described in this Sixfab tutorial.

  19. I followed the tutorial and am getting the following output. Im using the IOT Shield.

    [email protected]:~/files/quectel-CM $ sudo ./quectel-CM -s h2g2
    [07-22_12:59:32:468] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.45
    [07-22_12:59:32:469] ./quectel-CM profile[1] = h2g2///0, pincode = (null)
    [07-22_12:59:32:472] Cannot find qmichannel((null)) usbnet_adapter((null)) for Quectel modules

      1. Yes it is connected and powered up. It does not seem to have the correct drivers. Here is my kernel: 4.19.57-v7+
        The output of the install:

        [email protected]:~ $ sudo ./qmi_install.sh
        Clear Files
        Change directory to /home/pi
        Downloading source files
        –2019-07-22 15:22:10– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/quectel-CM.zip
        Resolving github.com (github.com)… 140.82.114.3
        Connecting to github.com (github.com)|140.82.114.3|:443… connected.
        HTTP request sent, awaiting response… 302 Found
        Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip [following]
        –2019-07-22 15:22:10– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/quectel-CM.zip
        Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.184.133
        Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.184.133|:443… connected.
        HTTP request sent, awaiting response… 200 OK
        Length: 66876 (65K) [application/zip]
        Saving to: ‘quectel-CM.zip’

        quectel-CM.zip 100%[=============================================================================================>] 65.31K –.-KB/s in 0.09s

        2019-07-22 15:22:11 (754 KB/s) – ‘quectel-CM.zip’ saved [66876/66876]

        Archive: quectel-CM.zip
        creating: /home/pi/files/quectel-CM/
        inflating: /home/pi/files/quectel-CM/util.h
        inflating: /home/pi/files/quectel-CM/util.c
        inflating: /home/pi/files/quectel-CM/udhcpc.c
        inflating: /home/pi/files/quectel-CM/quectel-qmi-proxy.c
        inflating: /home/pi/files/quectel-CM/QmiWwanCM.c
        inflating: /home/pi/files/quectel-CM/QMIThread.h
        inflating: /home/pi/files/quectel-CM/QMIThread.c
        inflating: /home/pi/files/quectel-CM/MPQMUX.h
        inflating: /home/pi/files/quectel-CM/MPQMUX.c
        inflating: /home/pi/files/quectel-CM/MPQMI.h
        inflating: /home/pi/files/quectel-CM/MPQCTL.h
        inflating: /home/pi/files/quectel-CM/Makefile
        inflating: /home/pi/files/quectel-CM/main.c
        inflating: /home/pi/files/quectel-CM/GobiNetCM.c
        inflating: /home/pi/files/quectel-CM/dhcpclient.c
        inflating: /home/pi/files/quectel-CM/default.script
        Checking Kernel
        4.19.57-v7+ based kernel found
        Downloading source files
        –2019-07-22 15:22:11– https://github.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/raw/master/tutorials/QMI_tutorial/src/4.19.1.zip
        Resolving github.com (github.com)… 140.82.114.3
        Connecting to github.com (github.com)|140.82.114.3|:443… connected.
        HTTP request sent, awaiting response… 302 Found
        Location: https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip [following]
        –2019-07-22 15:22:12– https://raw.githubusercontent.com/sixfab/Sixfab_RPi_3G-4G-LTE_Base_Shield/master/tutorials/QMI_tutorial/src/4.19.1.zip
        Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.184.133
        Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.184.133|:443… connected.
        HTTP request sent, awaiting response… 200 OK
        Length: 101553 (99K) [application/zip]
        Saving to: ‘drivers.zip’

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

        2019-07-22 15:22:12 (776 KB/s) – ‘drivers.zip’ saved [101553/101553]

        Archive: drivers.zip
        creating: /home/pi/files/drivers/
        creating: /home/pi/files/drivers/.git/
        extracting: /home/pi/files/drivers/.git/COMMIT_EDITMSG
        extracting: /home/pi/files/drivers/.git/HEAD
        inflating: /home/pi/files/drivers/.git/config
        inflating: /home/pi/files/drivers/.git/description
        creating: /home/pi/files/drivers/.git/hooks/
        inflating: /home/pi/files/drivers/.git/hooks/applypatch-msg.sample
        inflating: /home/pi/files/drivers/.git/hooks/commit-msg.sample
        inflating: /home/pi/files/drivers/.git/hooks/fsmonitor-watchman.sample
        inflating: /home/pi/files/drivers/.git/hooks/post-update.sample
        inflating: /home/pi/files/drivers/.git/hooks/pre-applypatch.sample
        inflating: /home/pi/files/drivers/.git/hooks/pre-commit.sample
        inflating: /home/pi/files/drivers/.git/hooks/pre-push.sample
        inflating: /home/pi/files/drivers/.git/hooks/pre-rebase.sample
        inflating: /home/pi/files/drivers/.git/hooks/pre-receive.sample
        inflating: /home/pi/files/drivers/.git/hooks/prepare-commit-msg.sample
        inflating: /home/pi/files/drivers/.git/hooks/update.sample
        inflating: /home/pi/files/drivers/.git/index
        creating: /home/pi/files/drivers/.git/info/
        inflating: /home/pi/files/drivers/.git/info/exclude
        creating: /home/pi/files/drivers/.git/logs/
        inflating: /home/pi/files/drivers/.git/logs/HEAD
        creating: /home/pi/files/drivers/.git/logs/refs/
        creating: /home/pi/files/drivers/.git/logs/refs/heads/
        inflating: /home/pi/files/drivers/.git/logs/refs/heads/master
        creating: /home/pi/files/drivers/.git/objects/
        creating: /home/pi/files/drivers/.git/objects/03/
        extracting: /home/pi/files/drivers/.git/objects/03/5c2935335b6c52c0815f35c9d1575f5c29a59f
        creating: /home/pi/files/drivers/.git/objects/19/
        extracting: /home/pi/files/drivers/.git/objects/19/5ba83612ad35f67e55c282e64ea5b637313113
        creating: /home/pi/files/drivers/.git/objects/25/
        extracting: /home/pi/files/drivers/.git/objects/25/926acedbfa6265c542319e1938b3bdd90ee485
        creating: /home/pi/files/drivers/.git/objects/39/
        extracting: /home/pi/files/drivers/.git/objects/39/dec0a7d5ff21373eacc04b3bdb45ae21bc5d09
        creating: /home/pi/files/drivers/.git/objects/61/
        extracting: /home/pi/files/drivers/.git/objects/61/3f91add03da189c0fd5334cbccbbf720060079
        creating: /home/pi/files/drivers/.git/objects/6e/
        extracting: /home/pi/files/drivers/.git/objects/6e/bd8c4cc4d3e73319f0b11790d417da1ec690fa
        creating: /home/pi/files/drivers/.git/objects/72/
        extracting: /home/pi/files/drivers/.git/objects/72/a55b6b421184c4fb69411ba3d0150e6c337a88
        creating: /home/pi/files/drivers/.git/objects/91/
        extracting: /home/pi/files/drivers/.git/objects/91/2472f26e4f6c5a9ad30357f7a47d9a3085a1d9
        creating: /home/pi/files/drivers/.git/objects/92/
        extracting: /home/pi/files/drivers/.git/objects/92/cb4b634d343b2fda1752788c459aa21b5e00b2
        creating: /home/pi/files/drivers/.git/objects/a7/
        extracting: /home/pi/files/drivers/.git/objects/a7/52b118ac3c4bc0714022c869ce41093bce9710
        creating: /home/pi/files/drivers/.git/objects/b4/
        extracting: /home/pi/files/drivers/.git/objects/b4/28445756a9e7994114e7aee3a9ea1b5b2ac994
        creating: /home/pi/files/drivers/.git/objects/d2/
        extracting: /home/pi/files/drivers/.git/objects/d2/8dab4b9effcd5d766bb76fa2e2d92de7dcd4f1
        creating: /home/pi/files/drivers/.git/objects/e7/
        inflating: /home/pi/files/drivers/.git/objects/e7/2ad9f81c73973b86bd7992c0f331039a8192bf
        creating: /home/pi/files/drivers/.git/objects/f0/
        extracting: /home/pi/files/drivers/.git/objects/f0/9393322edaf3f9356d5ab816db40e21d78f7aa
        creating: /home/pi/files/drivers/.git/refs/
        creating: /home/pi/files/drivers/.git/refs/heads/
        extracting: /home/pi/files/drivers/.git/refs/heads/master
        inflating: /home/pi/files/drivers/99-quectel-modem.rules
        inflating: /home/pi/files/drivers/Makefile
        creating: /home/pi/files/drivers/drivers/
        creating: /home/pi/files/drivers/drivers/net/
        creating: /home/pi/files/drivers/drivers/net/usb/
        inflating: /home/pi/files/drivers/drivers/net/usb/qmi_wwan.c
        creating: /home/pi/files/drivers/drivers/usb/
        creating: /home/pi/files/drivers/drivers/usb/serial/
        inflating: /home/pi/files/drivers/drivers/usb/serial/option.c
        inflating: /home/pi/files/drivers/drivers/usb/serial/qcserial.c
        inflating: /home/pi/files/drivers/drivers/usb/serial/usb-wwan.h
        inflating: /home/pi/files/drivers/drivers/usb/serial/usb_wwan.c
        Installing udhcpc
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        udhcpc is already the newest version (1:1.22.0-19).
        0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
        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 -o -name *.ur-safe | xargs rm -rf
        make -C /lib/modules/4.19.57-v7+/build M=/home/pi/files/drivers modules
        make[1]: Entering directory ‘/usr/src/linux-headers-4.19.57-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
        Building modules, stage 2.
        MODPOST 4 modules
        CC /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.mod.o
        LD [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/option.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/option.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/qcserial.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.ko
        make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.57-v7+’
        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 -o -name *.ur-safe | xargs rm -rf
        make -C /lib/modules/4.19.57-v7+/build M=/home/pi/files/drivers modules
        make[1]: Entering directory ‘/usr/src/linux-headers-4.19.57-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
        Building modules, stage 2.
        MODPOST 4 modules
        CC /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.mod.o
        LD [M] /home/pi/files/drivers/./drivers/net/usb/qmi_wwan.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/option.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/option.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/qcserial.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/qcserial.ko
        CC /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.mod.o
        LD [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.ko
        make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.57-v7+’
        cp /home/pi/files/drivers/drivers/usb/serial/option.ko /lib/modules/4.19.57-v7+/kernel/drivers/usb/serial/
        cp /home/pi/files/drivers/drivers/usb/serial/usb_wwan.ko /lib/modules/4.19.57-v7+/kernel/drivers/usb/serial/
        cp /home/pi/files/drivers/drivers/usb/serial/qcserial.ko /lib/modules/4.19.57-v7+/kernel/drivers/usb/serial/
        cp /home/pi/files/drivers/drivers/net/usb/qmi_wwan.ko /lib/modules/4.19.57-v7+/kernel/drivers/net/usb/
        modprobe -r option qcserial qmi_wwan
        depmod
        Change directory to /home/pi/files/quectel-CM
        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 follow commands mentioned below
        go to /home/pi/files/quectel-CM and run sudo ./quectel-CM -s [YOUR APN]

  20. Hello there, how do I connect using PAP with a username and password?
    How do I change the existing config that you have outlined in your tutorial to use a different apn with username and password including auto connect?
    Thanks

    1. Usage: ./quectel-CM [-s [apn [user password auth]]] [-p pincode]

      Example: ./quectel-CM -s 3gnet carl 1234 0 -p 1234

      For existing config you can edit /usr/src/qmi_reconnect.sh according to your configuration.

  21. Hi Saeed,

    In step 11 guide says “Make sure the module is disconnected before running the installer script”… What does it mean disconnected?
    a. Remove the shield altogether?
    b. Remove Quectel from its slot on the shield but leave the shield on the rpi
    c. Keep shield and Quectel module on the rpi but remove (unplug) usb cable that goes from rpi to the shield.

    Another question
    Is there a way to use the shield without using the usb cable at all? Usb cable connection totally contradicts the use of a shield.

    Thanks

  22. Hello guys i would like to add something about using this tutorial on RPi 4. Do not attach the shield until step 14. It was the only way i could make this setup work

  23. I’ve got this device working but I’m struggling to work out how to get information regarding signal strength from the device. I’ve searched far and wide on Google but can’t find anything that works for me. Ideally I’d like to log this to a file.
    Thank you in advance for your help.

  24. I followed all the steps in the tutorial and everything seemed to be working fine up until step 14.
    After I type the command: sudo ./quectel-CM -s internet, I get and endless loop of messages that reads something like this:
    [09-23_20:00:35:740] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
    [09-23_20:00:35:740] requestSetOperatingMode(1)
    [09-23_20:00:35:773] requestSetOperatingMode(0)
    [09-23_20:00:37:277] requestRegistrationState2 MCC: 0, MNC: 0, PS: Detached, DataCap: UNKNOW
    [09-23_20:00:38:909] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UMTS
    [09-23_20:00:38:941] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UMTS
    [09-23_20:00:38:973] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UMTS
    [09-23_20:00:40:607] requestRegistrationState2 MCC: 310, MNC: 410, PS: Detached, DataCap: UMTS
    [09-23_20:00:40:669] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: UMTS
    [09-23_20:00:40:734] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: UMTS
    [09-23_20:00:51:742] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
    [09-23_20:00:56:797] requestRegistrationState2 MCC: 310, MNC: 410, PS: Attached, DataCap: UMTS
    [09-23_20:00:56:862] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe



    and on and on
    Any suggestions where I might have gone wrong?
    Thank you.

    1. Hello.
      This command gets into endless looop…
      You can check your connection by pinging in a new ternimal.
      ping -I wwan0 google.com

      1. But if I am understanding correctly, this is the command that I need to execute to get connected to LTE. If its execution fails, it means I am not connected, right?
        In other words, how can I make “sudo ./quectel-CM -s internet” work? shouldn’t this or something like this be executed before I can ping something?

  25. On kernel 4.19.75-v7+, RPI3+, I get error when “make” 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 -o -name *.ur-safe | xargs rm -rf
    make -C /lib/modules/4.19.75-v7+/build M=/home/pi/files/drivers modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.19.75-v7+’
    CC [M] /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.o
    /bin/sh: 1: scripts/genksyms/genksyms: Exec format error
    make[2]: *** [scripts/Makefile.build:310: /home/pi/files/drivers/./drivers/usb/serial/usb_wwan.o] Error 2
    make[1]: *** [Makefile:1519: _module_/home/pi/files/drivers] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.19.75-v7+’
    make: *** [Makefile:10: modules] Error 2
    What’s wrong?
    It was working perfectly with 4.19.66 kernel.
    Dome

Leave a Reply

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