Giter Site home page Giter Site logo

qmi_setup's Introduction

Overview

This is a simple shellscript to make the internet connection with your QMI (Qualcomm MSM Interface) supported wwan device like Sierra Wireless Inc. Gobi 3000. QMI supported devices are listed in the source of Linux kernel (check drivers/net/usb/qmi_wwan.c with your device id). These devices are also listed at http://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/ but not the all devices there.

Type following command to start, stop and restart the internet connection, and check your device status.

% sudo ./qmi_setup.sh start
Password: 
[/dev/cdc-wdm0] Operating mode set successfully
Loading profile...
    APN: mopera.net
Starting network with 'qmicli -d /dev/cdc-wdm0 --wds-start-network=mopera.net  --client-no-release-cid'...
Saving state... (CID: 14)
Saving state... (PDH: 19777600)
Network started successfully
dhcpcd[23821]: version 5.6.4 starting
dhcpcd[23821]: wwp0s29u1u4: sending IPv6 Router Solicitation
dhcpcd[23821]: wwp0s29u1u4: broadcasting for a lease
dhcpcd[23821]: wwp0s29u1u4: offered 1.67.135.xx from 1.67.135.xx
dhcpcd[23821]: wwp0s29u1u4: acknowledged 1.67.135.xx from 1.67.135.xx
dhcpcd[23821]: wwp0s29u1u4: checking for 1.67.135.xx
dhcpcd[23821]: wwp0s29u1u4: sending IPv6 Router Solicitation
dhcpcd[23821]: wwp0s29u1u4: leased 1.67.135.xx for 7200 seconds
dhcpcd[23821]: forked to background, child pid 23863
% sudo ./qmi_setup.sh status
Password: 
Loading profile...
    APN: mopera.net
Loading previous state...
    Previous CID: 14
    Previous PDH: 19777600
Getting status with 'qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status --client-cid=14 --client-no-release-cid'...
Status: connected
Signal strength is Good (-79 dBm)
% sudo ./qmi_setup.sh stop
Password: 
Loading profile...
    APN: mopera.net
Loading previous state...
    Previous CID: 14
    Previous PDH: 19777600
Stopping network with 'qmicli -d /dev/cdc-wdm0 --wds-stop-network=19777600 --client-cid=14'...
Network stopped successfully
Clearing state...
$ sudo ./qmi_setup.sh status
Password: 
Loading profile...
APN: mopera.net
Getting status with 'qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status '...
Status: disconnected
Signal strength is Good (-79 dBm)

Tested environment

  • ThinkPad X220 (4286-CTO)
  • Gentoo/Linux, Linux Kernel 3.9.6
  • Sierra Wireless, Inc. Gobi 3000 wireless wan module (FRU 60Y3257) I recommend to check if your wwan module works fine for your mobile broadband provider with Windows especially if you imported the device from other country. You may have to initialize your device for your region.
  • NTT Docomo UIM card (Xi LTE SIM)

Requirements

  • You have to prepare the kernel modules
    • qmi_wwan (CONFIG_USB_NET_QMI_WWAN)
    • qcserial (CONFIG_USB_SERIAL_QUALCOMM)
  • QMI commands qmicli and qmi-network cmmand are required. Install them.
  • APN settings APN settings are written to /etc/qmi-network.conf. In my environment, I put only a line.
    % cat /etc/qmi-network.conf
    APN=mopera.net
        

For more detailed information

You can see the script source or ask Google.

qmi_setup's People

Contributors

penguin2716 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qmi_setup's Issues

(archlinux) ERROR while getting interface flags

wwp0s29u1u4: ERROR while getting interface flags: No such device error: couldn't create QmiDevice: Couldn't query file info: Error when getting information for file “/dev/cdc-wdm0”: No such file or directory your wwan device may be RFKilled?

As i've read from the archlinux wiki article you should activate the modem from windows... Which i didnt. Is there any way to acrivate it without installing windows in dual boot or something, if so what should I do?

MBIM error: NoDeviceSupport

$ sudo qmi_setup.sh start
[11 10月 2022, 23:52:56] -Warning ** [/dev/cdc-wdm0] MBIM error: NoDeviceSupport
error: couldn't create client for the 'dms' service: CID allocation failed in the CTL client: Transaction timed out
your wwan device may be RFKilled?
[ble: exit 1]

This is my ip link:

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wwp0s20f0u2i1: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 5e:8e:f2:6a:45:88 brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 38:f3:ab:4c:6e:f5 brd ff:ff:ff:ff:ff:ff
4: wlp9s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 1c:99:57:c6:bc:ea brd ff:ff:ff:ff:ff:ff
5: enp0s13f0u2u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:e0:4c:78:32:00 brd ff:ff:ff:ff:ff:ff

This is my qmi_setup.sh

https://github.com/Firestar-Reimu/Arch-and-Manjaro-KDE-Installation/blob/master/Profile/qmi_setup.sh

$ sudo qmi-network cdc-wdm0 start
Loading profile at /etc/qmi-network.conf...
    APN: bjlenovo12.njm2apn
    APN user: unset
    APN password: unset
    qmi-proxy: no
    IP_TYPE: unset
    PROFILE: unset
Checking data format with 'qmicli -d cdc-wdm0 --wda-get-data-format '...
error: couldn't create QmiDevice: Couldn't query file info: Error when getting information for file “/home/firestar/cdc-wdm0”: No such file or directory
Device link layer protocol not retrieved: WDA unsupported
Starting network with 'qmicli -d cdc-wdm0 --wds-start-network=apn='bjlenovo12.njm2apn'  --client-no-release-cid '...
error: couldn't create QmiDevice: Couldn't query file info: Error when getting information for file “/home/firestar/cdc-wdm0”: No such file or directory
error: network start failed, client not allocated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.