Changes between Version 158 and Version 159 of wireless/modem


Ignore:
Timestamp:
06/19/17 11:36:49 (10 days ago)
Author:
tharvey
Comment:

added additional Ubuntu support info

Legend:

Unmodified
Added
Removed
Modified
  • wireless/modem

    v158 v159  
    7474 
    7575 
    76 [=#software] 
    77 == Software Support == 
    78 There are various software packages that exist for configuring modems depending on the type of modem. There are basically two different classifications of modems based on how they are configured: 
    79  * AT commands - configured manually or by packages such as [http://comgt.sourceforge.net/ comgt] 
    80  * QMI protocol - configured via Quallcom Messaging Interface supported by the [http://www.freedesktop.org/wiki/Software/libqmi/ libqmi] 
     76[=#control] 
     77== Modem Control == 
     78Unlike typical ethernet network interfaces, modem's require additional configuration and control to perform the following types of details before moving on to configuring a network interface: 
     79 * Dialing - in the old days for dial-up modems 
     80 * SIM pin control and unlocking (security) 
     81 * Network provider registration 
     82 * Data Protocol selection 
     83 
     84Once all of the above is complete a modem driver will provide a network interface to the Linux OS: 
     85 * IP over ethernet 
     86 * raw IP 
     87 * IP over serial (sometimes via PPP daemon) 
     88 
     89And once you finally have an IP networking interface up and running from the modem, you can use the standard IP configuration tools within Linux (like !NetworkManager or the lower-level tools such as ip, route, ifconfig, etc) 
     90 
     91Over the years various different modem control protocols have been developed: 
     92 * AT commands (text commands and responses typically preceded by 'AT' and terminated with a CR (carriage return or 0x0d) 
     93 * QMI - Qualcomm Modem Interface (A binary protocol used for modern Qualcomm based modems) 
     94 * MBIM - Mobile Interface Broadband Model (A new standard by the USB Implementers Forum specifying a new MBIM USB device model with multiple IP connections over a single USB interface without the need of 802.3 frames and a new MBIM control protocol 
     95 
     96 
     97[=#at] 
     98=== AT commands === 
     99If your modem/firmware/driver provides an AT command control interface you will have a serial device which you send AT commands and receive responses. While many modems share common AT commands, each modem/manufacturer typically has their own set of extensions. 
     100 
     101You can use any typical terminal program such as 'screen', 'minicom', 'picocom' or even simply stty/echo/cat to communicate. Be aware of translations that may occur based on your terminal and/or configuration of these terminal programs. For example, modem AT interpreters expect to receive commands terminated by a CR (carriage return, hex 0x0d code) and will not respond if your terminal program is translating CR's to LF's (beware of using screen within a screen session for example, which will do this). 
     102 
     103Modems should auto-baud meaning they should support a variety of baudrates. Typical settings would be 57600baud, 8 data bits, 1 stop bit, no parity (8N1). 
     104 
     105Some examples (assuming /dev/ttyUSB0 is your modem's control interface) 
     106* screen 
     107{{{#!bash 
     108screen /dev/ttyUSB0 57600 
     109}}} 
     110* minicom 
     111{{{#!bash 
     112minicom --device /dev/ttyUSB0 --baudrate 57600 
     113}}} 
     114* picocom 
     115{{{#!bash 
     116picocom /dev/ttyUSB0 --baud 57600 
     117}}} 
     118* stty/cat/echo: 
     119{{{#!bash 
     120stty -F /dev/ttyUSB0 ignbrk -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 
     121cat /dev/ttyUSB0 & 
     122echo -e "ATI\n" > /dev/ttyUSB0 
     123}}} 
     124 
     125 
     126[=#mbim] 
     127=== Mobile Interface Broadband Model (MBIM) === 
     128Mobile Interface Broadband Model (MBIM) is a new standard by the USB Implemented Forum. It specifies a new MBIM USB device model providing multiple IP connections over a single USB interface without the need of 802.3 frames (which was the case for ECM and NCM) and a new MBIM control protocol to talk to modem devices. 
     129 
     130The libmbim library is a protocol support library much like libqmi is for QMI and has a {{{mbimcli}}} and {{{mbim-network}}} as well. Since libqmi-1.16.0 and libmbim-1.14.0 there is support for QMI-over-MBIM as well but not clear what is using this. !ModemManager is using libmbim directly as that is what vendors expect/test 
     131 
     132Useful Examples: 
     133 * show status (useful for verifying SIM): 
     134{{{#!bash 
     135mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status # should show "Ready state: 'initialized'" 
     136}}} 
     137 * radio state (should show 'on') 
     138{{{#!bash 
     139mbimcli -d /dev/cdc-wdm0 --query-radio-state # should show on 
     140}}} 
     141   - if not use '--set-radio-state=on' 
     142 * enable FCCAuth (required on many Sierra Wireless devices) 
     143{{{#!bash 
     144qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-set-fcc-authentication 
     145}}} 
     146 * verify signal state: 
     147{{{#!bash 
     148mbimcli -d /dev/cdc-wdm0 --query-signal-state # RSSI=99 is no signal 
     149}}} 
     150- Network 
     151{{{#!bash 
     152mbimcli -d /dev/cdc-wdm0 --query-preferred-providers 
     153mbimcli -d /dev/cdc-wdm0 --query-home-provider 
     154mbimcli -d /dev/cdc-wdm0 --query-visible-providers 
     155mbimcli -d /dev/cdc-wdm0 --query-registration-state 
     156[/dev/cdc-wdm0] Registration status: 
     157                 Network error: 'unknown' 
     158                Register state: 'home' 
     159                 Register mode: 'automatic' 
     160        Available data classes: 'lte' 
     161        Current cellular class: 'gsm' 
     162                   Provider ID: '310260' 
     163                 Provider name: 'Project Fi' 
     164                  Roaming text: 'unknown' 
     165            Registration flags: 'packet-service-automatic-attach' 
     166}}} 
     167- connect: 
     168 * using mbim-network 
     169{{{#!bash 
     170echo "APN=h2g2" > /etc/mbim-network.conf 
     171mbim-network /dev/cdc-wdm0 start 
     172Loading profile at /etc/mbim-network.conf... 
     173    APN: h2g2 
     174    APN auth protocol: unset 
     175    APN user: unset 
     176    APN password: unset 
     177    mbim-proxy: no 
     178Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close '... 
     179[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '310260970524563' SIM ICCID: '8901260971105245631' Ready info: 'unknown' Telephone numbers: (1) '15309030245' [/dev/cdc-wdm0] Session not closed: TRID: '3' 
     180Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 3) 
     181Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=3 --no-close '... 
     182[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'home' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '310260' Provider name: 'Project Fi' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '4' 
     183Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4) 
     184Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close '... 
     185Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 5) 
     186Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='h2g2' --no-open=5 --no-close '... 
     187Network started successfully 
     188Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 7) 
     189}}} 
     190 * or manually 
     191{{{#!bash 
     192mbimcli -d /dev/cdc-wdm0 --connect=apn='h2g2' --no-open=5 --no-close 
     193}}} 
     194 
     195Notes: 
     196- MBIM modems do not implement DHCP shim functionality. You need to get the IP details for the interface with 'mbimcli --query-ip-configuration=<session id>' and apply those to the interface and update routing manually 
     197 
     198References: 
     199- https://sigquit.wordpress.com/2013/02/06/an-introduction-to-libmbim/ 
     200 
     201 
     202[=#qmi] 
     203=== Qualcomm MSM Interface (QMI) === 
     204The Qualcomm MSM Interface (QMI) is a modem control protocol that appears in many modern Qualcomm based modems. 
     205  
     206QMI defines different services: 
     207 - DMS: Device Management - load device info 
     208 - NAS: Network Access - register in the network 
     209 - WDS: - request data connections 
     210 - PDS: - setup GPS location reporting 
     211 - UIM: - manage internals of the user identity module 
     212 
     213The libqmi library is a protocol support library much like libmem is for MBIM and has a {{{qmicli}}} and {{{qmi-network}}} command-line tool as well. Since libqmi-1.16.0 and libmbim-1.14.0 there is support for QMI-over-MBIM as well but not clear what is using this. ModemManager is using libqmi to control QMI based modems. 
     214 
     215If not using a higher level manager which utilizes libqmi such as !ModemManager, you can use libqmi directly: 
     216 * Example connect to Google Fi network: 
     217{{{#!bash 
     218root@ventana:~# echo "APN=h2g2" > /etc/qmi-network.conf 
     219root@ventana:~# qmi-network /dev/cdc-wdm0 start 
     220Loading profile at /etc/qmi-network.conf... 
     221    APN: h2g2 
     222    APN user: unset 
     223    APN password: unset 
     224    qmi-proxy: no 
     225Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-format '... 
     226Device link layer protocol retrieved: raw-ip 
     227Getting expected data format with 'qmicli -d /dev/cdc-wdm0 --get-expected-data-format'... 
     228Expected link layer protocol retrieved: 802-3 
     229Updating kernel link layer protocol with 'qmicli -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip'... 
     230Kernel link layer protocol updated 
     231Starting network with 'qmicli -d /dev/cdc-wdm0 --wds-start-network=apn='h2g2'  --client-no-release-cid '... 
     232Saving state at /tmp/qmi-network-state-cdc-wdm0... (CID: 35) 
     233Saving state at /tmp/qmi-network-state-cdc-wdm0... (PDH: 62482624) 
     234Network started successfully 
     235root@ventana:~# qmicli -d /dev/cdc-wdm0   --client-no-release-cid --client-cid=35 --wds-get-current-settings 
     236[/dev/cdc-wdm0] Current settings retrieved: 
     237           IP Family: IPv4 
     238        IPv4 address: 100.69.157.123 
     239    IPv4 subnet mask: 255.255.255.248 
     240IPv4 gateway address: 100.69.157.124 
     241    IPv4 primary DNS: 10.177.0.34 
     242  IPv4 secondary DNS: 10.177.0.210 
     243                 MTU: 1500 
     244             Domains: none 
     245[/dev/cdc-wdm0] Client ID not released: 
     246        Service: 'wds' 
     247            CID: '35' 
     248root@ventana:~# ifconfig wwan0 100.69.157.123 netmask 255.255.255.248 
     249root@ventana:~# route add default gw 100.69.157.124 wwan0 
     250root@ventana:~# echo "nameserver 10.177.0.34" > /etc/resolv.conf 
     251root@ventana:~# echo "nameserver 10.177.0.210" >> /etc/resolv.conf 
     252root@ventana:~# ping www.google.com 
     253}}} 
     254 
     255References: 
     256 * libqmi - http://www.freedesktop.org/wiki/Software/libqmi/ 
     257 * An introduction to libqmi - http://sigquit.wordpress.com/2012/08/20/an-introduction-to- * 
    81258 
    82259 
     
    84261=== Gateworks BSP Support === 
    85262Gateworks supports multiple Board Support Packages. The following table shows details on modem support for each: 
    86 ||= BSP                          =||= Product Families =||= AT   =||= QMI =||= Drivers =||= Notes =|| 
    87 || OpenWrt                        || All                || comgt  ||  uqmi || Many      || || 
    88 || [wiki:Yocto Yocto]             || Ventana            || manual ||  No   || Minimal   || || 
    89 || [wiki:Android]                 || Ventana            || No     ||  No   || None      || [http://trac.gateworks.com/wiki/Android#CellularModemNetworking See Freescale information] || 
    90 || [wiki:ventana/ubuntu Ubuntu]   || Ventana            ||        ||       ||          || [https://wiki.ubuntu.com/ConnMan/Hardware/3G] || 
    91 || [wiki:ventana/debian Debian ]  || Ventana            ||        ||       ||          || [https://wiki.debian.org/Modem/3G] || 
     263||= BSP                          =||= Product Families =||= AT   =||= QMI =||= MBIM =||= Drivers =||= Notes =|| 
     264|| [wiki:Android]                 || Ventana            || No     ||  No   || No     || None      || [http://trac.gateworks.com/wiki/Android#CellularModemNetworking See Freescale information] || 
     265|| [wiki:Yocto Yocto]             || Ventana            || manual ||  No   || No     || Minimal   || || 
     266|| OpenWrt                        || All                || comgt  ||  uqmi || umbim  || Many      || || 
     267|| [wiki:ventana/ubuntu Ubuntu]   || Ventana            || !ModemManager || libqmi || libmbim || Many || [https://wiki.ubuntu.com/ConnMan/Hardware/3G] || 
     268|| [wiki:ventana/debian Debian ]  || Ventana            || !ModemManager || libqmi || libmbim || Many || [https://wiki.debian.org/Modem/3G] || 
    92269 
    93270If you are looking for additional support please contact support@gateworks.com 
    94271 
    95  
    96 [=#comgt] 
    97 === comgt === 
    98 The {{{comgt}}} package (http://comgt.sourceforge.net/) supports configuration of various cellular modems that use AT commands such as the Sierra Wireless, Novatel, and Option modems. The package includes a {{{chat}}} application and some {{{chat}}} scripts that assist with common connection commands. Once connected to a network provider, the {{{pppd}}} application is used to create a network interface for TCP/IP over the serial channel. 
    99  
    100 For more detail regarding {{{comgt}}} and examples see the [#openwrt OpenWrt section] below 
    101  
    102 [=#libqmi] 
    103 === libqmi === 
    104 QMI is a binary protocol designed to replace the AT command based communication with modems, and is available in devices with Qualcomm chipsets from multiple vendors (Novatel, Huawei, Sierra Wireless, ZTE, and Qualcomm). The protocol defines different ‘services‘, each of them related to different actions that may be requested to the modem. For example, the ‘DMS’ (Device Management) service provides actions to load device information; while the ‘NAS’ (Network Access) service provides actions to register in the network. Similarly, other services will allow the user to request data connections (WDS), setup GPS location reporting (PDS), or manage internals of the user identity module (UIM service). The user needs to handle the creation of ‘clients’ for those services by allocating/deallocating ‘client IDs’ using the generic always-on ‘control’ (CTL) service. 
    105  
    106 While libqmi provides a library and a cli application for communicating to a QMI device, a kernel device driver is necessary to expose a {{{/dev/cdc-wdm}}} interface as well as a kernel driver that exposes a network device. An example of this is the  'qcserial' driver and the 'qmi_wwan' driver. 
    107  
    108 Example configuration: 
    109 {{{#!bash 
    110 echo "APN=<YOURAPNNAME>" > /etc/qmi-network.conf 
    111 qmi-network /dev/cdc-wdm0 start 
    112 udhcpc -i wwan0 
    113 }}} 
    114   * After connection is established you likely will want to run a background script that detects connection drop and re-establishes a connection 
     272[=#ubuntu] 
     273== Ubuntu Cellular Modem Support (libqmi/libmbim/modemmanager) == 
     274 
     275[=#modemmanager] 
     276=== !ModemManager === 
     277!ModemManager is a package containing a background service/daemon and a command-line-interfalce (mmcli) that can be used to configure and connect modems. 
     278 
     279Note that after starting the service (if manually started) it does take 20 to 30 seconds to finish modem detection. 
     280 
     281Example usage: 
     282- List detected modems 
     283{{{#!bash 
     284root@ventana:~# mmcli --list-modems 
     285 
     286No modems were found 
     287 
     288root@ventana:~# mmcli --list-modems 
     289 
     290Found 1 modems: 
     291        /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated] MC7455 
     292 
     293}}} 
     294- Show details for the first modem: 
     295{{{#!bash 
     296root@ventana:~# mmcli --modem 0 
     297 
     298/org/freedesktop/ModemManager1/Modem/0 (device id '86bde2905ff6f63bbefcfa457fe8f9221b76e968') 
     299  ------------------------- 
     300  Hardware |   manufacturer: 'Sierra Wireless, Incorporated' 
     301           |          model: 'MC7455' 
     302           |       revision: 'SWI9X30C_02.08.02.00 r5428 CARMD-EV-FRMWR2 2016/01/06 20:38:53' 
     303           |      supported: 'gsm-umts 
     304           |                  lte 
     305           |                  gsm-umts, lte' 
     306           |        current: 'gsm-umts, lte' 
     307           |   equipment id: '359072060290422' 
     308  ------------------------- 
     309  System   |         device: '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.2' 
     310           |        drivers: 'qmi_wwan, qcserial' 
     311           |         plugin: 'Sierra' 
     312           |   primary port: 'cdc-wdm0' 
     313           |          ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net), wwan1 (net), cdc-wdm1 (qmi)' 
     314  ------------------------- 
     315  Numbers  |           own : '18057812000' 
     316  ------------------------- 
     317  Status   |           lock: 'sim-pin2' 
     318           | unlock retries: 'sim-pin (3), sim-pin2 (10), sim-puk (10), sim-puk2 (10)' 
     319           |          state: 'disabled' 
     320           |    power state: 'on' 
     321           |    access tech: 'unknown' 
     322           | signal quality: '0' (cached) 
     323  ------------------------- 
     324  Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none' 
     325           |        current: 'allowed: 2g, 3g, 4g; preferred: none' 
     326  ------------------------- 
     327  Bands    |      supported: 'u2100, u1800, u1900, u17iv, u850, u900, eutran-i, eutran-ii, eutran-iii, eutran-iv, eutran-v, eutran-vii, eutran-viii, eutran-xii, eutran-xiii, eutran-xx, eutran-xxv, eutran-xli' 
     328           |        current: 'u2100, u1800, u1900, u17iv, u850, u900, eutran-i, eutran-ii, eutran-iii, eutran-iv, eutran-v, eutran-vii, eutran-viii, eutran-xii, eutran-xiii, eutran-xx, eutran-xxv, eutran-xli' 
     329  ------------------------- 
     330  IP       |      supported: 'ipv4, ipv6, ipv4v6' 
     331  ------------------------- 
     332  3GPP     |           imei: '359072060290555' 
     333           |  enabled locks: 'none' 
     334           |    operator id: 'unknown' 
     335           |  operator name: 'unknown' 
     336           |   subscription: 'unknown' 
     337           |   registration: 'unknown' 
     338  ------------------------- 
     339  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0' 
     340 
     341  ------------------------- 
     342  Bearers  |          paths: 'none' 
     343 
     344}}} 
     345 * Note the above shows a Sierra Wireless MC7455 modem supporting 'gsm-umts', 'lte' networks, using QMI control protocol (qmi_wwan driver) on /dev/cdc-wdm0, with a SIM that has been read however the radio is disabled 
     346- If the SIM has PIN locking enabled and its state is 'locked' under the Status section above you can enter the SIM pin with {{{mmcli --pin=<PIN>}}} 
     347{{{#!bash 
     348root@ventana:~# mmcli --pin=1234 
     349successfully sent PIN code to the SIM 
     350}}} 
     351 * Some additional commands for handling SIM PINs are '--enable-pin', '--disable-pin', '--change-pin=<NEW_PIN>', '--puk=<PUK>' to enable PIN locking, disable PIN locking, changing the PIN, and unlocking a PUK-locked ([https://en.wikipedia.org/wiki/Personal_unblocking_code Personal unblocking code]) SIM. 
     352- Enable first modem: 
     353{{{#!bash 
     354root@ventana:~# mmcli --modem 0 --enable 
     355successfully enabled the modem 
     356}}} 
     357 * Now a status will show the following different info under status 
     358{{{#!bash 
     359  ------------------------- 
     360  Status   |           lock: 'sim-pin2' 
     361           | unlock retries: 'sim-pin (3), sim-pin2 (10), sim-puk (10), sim-puk2 (10)' 
     362           |          state: 'registered' 
     363           |    power state: 'on' 
     364           |    access tech: 'umts' 
     365           | signal quality: '26' (recent) 
     366 
     367}}} 
    115368 
    116369References: 
    117  * libqmi - http://www.freedesktop.org/wiki/Software/libqmi/ 
    118  * An introduction to libqmi - http://sigquit.wordpress.com/2012/08/20/an-introduction-to- * 
     370 * https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/configure-cellular-connections 
     371 
     372 
     373[=#modemmanager-ppa] 
     374=== Installing pre-built latest stable libqmi/libmbim/modemmanager via PPA === 
     375Aleksander Morgado (https://aleksander.es), a key developer behind the !ModemManager, libqmi, and libmbim projects that provide modem support on Ubuntu provides up-to-date Ubuntu PPA's for 14.04 trusty and 16.04 xenial. Instructions on how to add the PPA feeds and update the packages exist there: 
     376 - [https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-xenial modemmanager/libqmi/libmbim PPA xenial] 
     377 - [https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-trusty modemmanager/libqmi/libmbim PPA trusty] 
     378 
     379Xenial: 
     380{{{#!bash 
     381apt-get install software-properties-common # contains add-apt-repository 
     382add-apt-repository ppa:aleksander-m/modemmanager-xenial 
     383apt-get update 
     384apt-get install modemmanager libqmi-utils libmbim-utils 
     385}}} 
     386 
     387Trusty: 
     388{{{#!bash 
     389add-apt-repository ppa:aleksander-m/modemmanager-trusty 
     390apt-get update 
     391apt-get install libqmi-utils libmbim-utils 
     392}}} 
     393 
     394 
     395[=#building-from-source] 
     396=== Building libqmi/libmbim/modemmanager from source === 
     397You can also build the latest modemmanager, libqmi, libmbim easily from source on an Ubuntu system. It is recommended to use stable releases which you can easily do from the PPA's provided above however if you wish to debug, contribute patches, or try patches from the various mailing lists you will need to build from the git repo sources. 
     398 
     399For example the following was done on Ubuntu 16.04 (xenial): 
     400* libqmi: 
     401{{{#!bash 
     402apt-get install build-essential git pkg-config automake autoconf intltool libtool gtk-doc-tools 
     403apt-get install libglib2.0-dev libgudev-1.0-dev 
     404git clone git://anongit.freedesktop.org/libqmi && cd libqmi && ./autogen.sh 
     405make 
     406make install 
     407ldconfig 
     408cd .. 
     409}}} 
     410 - you can find the latest 'stable' release from https://www.freedesktop.org/software/libqmi/ (untar and run configure) 
     411* libmbim: 
     412{{{#!bash 
     413apt-get install build-essential git pkg-config automake autoconf intltool libtool gtk-doc-tools 
     414apt-get install libglib2.0-dev libgudev-1.0-dev 
     415git clone git://anongit.freedesktop.org/libmbim/libmbim && cd libmbim && ./autogen.sh 
     416make 
     417make install 
     418ldconfig 
     419cd .. 
     420}}} 
     421 - you can find the latest 'stable' release from https://www.freedesktop.org/software/libmbim/ (untar and run configure) 
     422* modemmanager: 
     423{{{#!bash 
     424git clone git://anongit.freedesktop.org/ModemManager/ModemManager && cd ModemManager && ./autogen.sh 
     425make 
     426make install 
     427ldconfig 
     428cd .. 
     429}}} 
     430 - you can find the latest 'stable' release from https://www.freedesktop.org/software/ModemManager/ (untar and run configure) 
     431 
     432Notes: 
     433 - if you are building and installing from source you should remove all other packages that install libmbim or libqmi: 
     434{{{#!bash 
     435apt-get purge libmbim-glib-dev llibmbim-glib-doc libmbim-glib4 libmbim-glib4-dbg libmbim-proxy libmbim-utils 
     436apt-get purge libqmi-glib-dev libqmi-glib-doc libqmi-glib1 libqmi-glib1-dbg libqmi-proxy libqmi-utils 
     437}}} 
     438 
     439 
     440[=#troubleshooting] 
     441=== Troubleshooting Modem support on Ubuntu === 
     442Because modem technology is constantly changing it is often best to try to get it working on the most modern Linux system possible with up to date kernel drivers and libraries. Often this is easily accomplished with Ubuntu under the following circumstances: 
     443 - use the latest mainline Linux kernel if you can, otherwise use the most recent available Ubuntu kernel 
     444 - use the latest !ModemManager, libqmi, and libmbim PPA's (see above) 
     445 
     446Use !ModemManager to see if your modem is detected and attempt connecting. Querying a modem with !ModemManager will also tell you what control interfaces exist and what type of control they use which is critical to understanding the requirements for your modem. 
     447 
     448Troubleshooting steps: 
     449 * Determine what devices you have present and what drivers are being used to possibly support them: 
     450{{{#!bash 
     451root@ventana:~# lsusb 
     452Bus 001 Device 003: ID 1199:9071 Sierra Wireless, Inc.  
     453Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub 
     454Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
     455root@ventana:~# dmesg | egrep -ie qualcom\|mbim\|sierra\|wdm 
     456[   11.253539] usb 1-1.2: Product: Sierra Wireless MC7455 Qualcomm® Snapdragon™ X7 LTE-A 
     457[   11.253546] usb 1-1.2: Manufacturer: Sierra Wireless, Incorporated 
     458[   11.378483] usbcore: registered new interface driver cdc_wdm 
     459[   11.395365] usbserial: USB Serial support registered for Qualcomm USB modem 
     460[   11.397829] qcserial 1-1.2:1.0: Qualcomm USB modem converter detected 
     461[   11.398318] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB0 
     462[   11.400563] qcserial 1-1.2:1.2: Qualcomm USB modem converter detected 
     463[   11.402218] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB1 
     464[   11.404332] qcserial 1-1.2:1.3: Qualcomm USB modem converter detected 
     465[   11.406082] usb 1-1.2: Qualcomm USB modem converter now attached to ttyUSB2 
     466[   11.408664] qmi_wwan 1-1.2:1.8: cdc-wdm0: USB WDM device 
     467[   11.412510] qmi_wwan 1-1.2:1.10: cdc-wdm1: USB WDM device 
     468}}} 
     469  - Note that the 'usbcore: registered' messages simply indicate a driver is loaded not that it has detected a supported device 
     470   - if qmi_wwan detects your modem it speaks QMI (example above) 
     471   - if cdc_mbim detects your modem it speaks MBIM 
     472  - you can also look at what driver module is bound to a device (QMI example): 
     473{{{#!bash 
     474root@ventana:~# ls -l /sys/class/usbmisc/cdc-wdm0/device/driver/ | grep module 
     475lrwxrwxrwx 1 root root    0 Mar  7 22:20 module -> ../../../../module/qmi_wwan 
     476}}} 
     477 * Use !ModemManager to see what ports and driver are detetcted/supported: 
     478{{{#!bash 
     479root@ventana:~# mmcli --modem 0 | grep  -i -E ports\|driver 
     480           |        drivers: 'qmi_wwan, qcserial' 
     481           |          ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net), wwan1 (net), cdc-wdm1 (qmi)' 
     482}}} 
     483  - here we see that the modem in the system is supported by the 'qcserial' driver and the 'qmi_wwan' driver, it speaks 'qcdm', 'at', and 'qmi' control protocols, and it uses the 'wwan0' network device for data 
     484 * Check PIN status, power state, registration state, and signal quality by looking at the 'Numbers' and 'Status' section of !ModemManager output: 
     485{{{#!bash 
     486root@ventana:~# mmcli --modem 0 
     487... 
     488  ------------------------- 
     489  Numbers  |           own : '18052959083' 
     490  ------------------------- 
     491  Status   |           lock: 'sim-pin2' 
     492           | unlock retries: 'sim-pin (3), sim-pin2 (10), sim-puk (10), sim-puk2 (10)' 
     493           |          state: 'registered' 
     494           |    power state: 'on' 
     495           |    access tech: 'umts' 
     496           | signal quality: '31' (recent) 
     497  ------------------------- 
     498  Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none' 
     499           |        current: 'allowed: 2g, 3g, 4g; preferred: none' 
     500  ------------------------- 
     501... 
     502}}} 
     503 
     504Getting help: 
     505- When asking for help make sure to provide the following details: 
     506 * Modem make/model 
     507 * Output of lsusb showing modem 
     508 * Output of {{{mmcli --modem 0}}} to show detected modem details 
     509 * Output of {{{dmesg | egrep -ie qualcom\|mbim\|sierra\|wdm}}} to show driver messages 
     510 * Output of {{{uname -r}}} to show kernel version 
     511 * Output of {{{qmicli --version}}} and {{{mbimcli --version}}} to show what versions you have 
     512- for QMI: post to libqmi-devel with details 
     513 * Add Output of {{{qmicli --dms-get-{manufacturer,model,revision,capabilities} }}} 
     514     - revision is firmware 
     515     - capabilities shows if SIM is supported 
     516     - capabilities shows networks 
     517- for MBIM: post to libmbim-devel with details 
     518 
    119519 
    120520 
     
    11271527 * [http://www.att.com/edo/mmt/matching-tools-form.jsp AT&T Module Picker] 
    11281528 * [http://http://ei.att.com/modules/ATT_Approved_3G_4G_Modules.xlsx AT&T Reference Sheet] 
    1129  
    1130 == Ubuntu Configuration == 
    1131  1. Install software tools 
    1132 {{{ 
    1133 apt-get install modemmanager network-manager uuid 
    1134 }}} 
    1135  1. Verify modem is detected 
    1136 {{{ 
    1137 root@ventana-trusty:~# mmcli -L 
    1138  
    1139 Found 1 modems: 
    1140         /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated] MC7700 
    1141  
    1142 }}} 
    1143  1. Create file /etc/NetworkManager/system-connections/MyModem where MyModem is any name you want and uuid is gathered from the uuid command on the console. Adjust the apn and other parameters. 
    1144  
    1145 {{{ 
    1146 [connection] 
    1147 id=Sierra 
    1148 uuid=e41589fa-8c12-11e6-9a79-00d012e1f102 
    1149 type=gsm 
    1150 autoconnect=false 
    1151   
    1152 [ipv4] 
    1153 method=auto 
    1154   
    1155 [gsm] 
    1156 number=*99# 
    1157 apn=m2m.com.attz 
    1158 [serial] 
    1159 baud=115200 
    1160  
    1161 }}} 
    1162  
    1163  2. Enable modem: 
    1164 {{{ 
    1165 mmcli -m 0 -e 
    1166 }}} 
    1167  3. Disable eth0 if desired to avoid ping confusion 
    1168 {{{ 
    1169 ifconfig eth0 down 
    1170 }}} 
    1171  4. Bring up modem interface 
    1172 {{{ 
    1173 nmcli con up id Sierra 
    1174 }}} 
    1175  5. Verify internet IP 
    1176 {{{ 
    1177 root@ventana-trusty:~# ifconfig 
    1178 lo        Link encap:Local Loopback   
    1179           inet addr:127.0.0.1  Mask:255.0.0.0 
    1180           inet6 addr: ::1/128 Scope:Host 
    1181           UP LOOPBACK RUNNING  MTU:65536  Metric:1 
    1182           RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
    1183           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
    1184           collisions:0 txqueuelen:0  
    1185           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 
    1186  
    1187 wwan0     Link encap:Ethernet  HWaddr 7a:40:eb:02:01:07   
    1188           inet addr:10.61.195.91  Bcast:10.61.195.255  Mask:255.255.255.0 
    1189           inet6 addr: fe80::7840:ebff:fe02:107/64 Scope:Link 
    1190           UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1 
    1191           RX packets:13 errors:0 dropped:0 overruns:0 frame:0 
    1192           TX packets:24 errors:0 dropped:5 overruns:0 carrier:0 
    1193           collisions:0 txqueuelen:1000  
    1194           RX bytes:2192 (2.1 KB)  TX bytes:3478 (3.4 KB) 
    1195  
    1196 }}}