Sierra Wireless

Question:

Can I use a Sierra Wireless Modem on Linux Machines (direct IP modems)?
Answer:

Yes, but these instructions are not supported and are provided to the Linux user community as a courtesy. These instructions and associated drivers, scripts, and executable files are provided by Sierra Wireless "AS IS" without warranty of any kind.

The drivers provided in the Download section below are freeware; you can redistribute them and/or modify them under the terms of the
GNU General Public License as published by the Free Software Foundation.

This guide is for owners of Sierra Wireless modems who would like to use it on a computer running the Linux operating system. Only a limited number of kernels are supported as listed in the table below.


*Note
: Sierra Wireless submits driver updates and patches to the public Linux distribution found at www.kernel.org.


**Note:
Ubuntu 9.10 distribution is not supported with Sierra Wireless modems. Ubuntu 9.04 and 10.4 distributions are supported with all Sierra Wireless modems listed in this KB article.


The Sierra Wireless sierra_net.c driver presents certain models of Sierra Wireless modems to the operating system as Network Interface Cards (NICs). The data communication interface between host and modem transfers packets which carry Ethernet frames over the USB bus and utilizes the high-speed USB bandwidth more efficiently. It greatly increases data throughput especially when combined with other mechanisms that optimize the bus usage for user packets.

Please note that sierra_net DirectIP driver requires USB Sierra Wireless driver version 1.7.0 or higher. Use command modinfo sierra to verify the version.


Supported Modems

  • AirPrime MC8700 minicard
  • AirPrime MC8790 minicard*
  • AirPrime MC870x
  • AirPrime MC8801
  • AirPrime MC7700
  • AirPrime SL808x*
  • AirPrime SL809x*

  • * With direct IP firmware, these modems support PID 68A3 and 68AA.


     
    Driver Downloads


    Note:
    If you don't want to install the latest Direct IP drivers below, you can still use your Sierra Wireless Modem modem with Linux. Starting from kernel ver. 2.6.25, most of Linux distributions include the Sierra Linux drivers and are equipped with the Network Manager application.

    Simply insert your modem and follow the prompts on your screen. Please refer to the KB article below for more details.

    How can I use Network Manager Application on Linux OS ?


    The Direct IP drivers for the most of Linux kernels are listed in the table below. Additional kernels are not supported at this time.


    Kernel version

    Driver Version

    2.6.20

    v1.26_1740

    2.6.21

    v1.26_1740

    2.6.22

    v1.26_1740

    2.6.23

    v1.26_1740

    2.6.24

    v1.26_1740

    2.6.25

    v1.26_1740

    2.6.26

    v1.26_1740

    2.6.27

    v1.26_1740

    2.6.28

    v1.26_1740

    2.6.29

    v1.26_1740

    2.6.30

    v1.26_1740

    2.6.31

    v1.26_1740

    2.6.32

    v3.2_1740

    2.6.33**

    v1.26_1740

    2.6.34**

    v1.26_1740

    2.6.35**

    v3.2_1740

    2.6.36**

    v3.2_1740

    2.6.38**

    v3.2_1740

    3.0.x**

    v3.2_1740



    **Note: Starting with kernel ver. 2.6.33  the sierra_net driver enumerates the DirectIP interface as “ wwan0” (instead of “usb0”) and is re-named from “DirectIP Driver for Sierra Wireless modems” to “USB-to-WWAN Driver for Sierra Wireless modems”. Because of this, Sierra Wireless DirectIP device has been re-named from “Sierra Wireless Direct IP Modem”  to “Sierra Wireless USB-to-WWAN Modem”.

     

    The drivers (and possibly other files, depending upon your kernel) are bundled together into one file. Once you have downloaded the file you can unpack the contents using the following procedure:

    1. Open a terminal window. The procedure for opening a terminal window varies from one Linux distribution to another. For example, on Ubuntu Linux you can select

    Applications >Accessories >Terminal

    2. Extract the tarfile's contents by typing the following commands: 


    a) Create a directory for the tarfile if you haven't already done so:

                # mkdir kernel-2.6.y


    b) Move the tar file you downloaded from this website into the new directory:

                # mv  v1.xx_kernel2.6.y.directIP.tar  kernel-2.6.y


    c) Extract the files into the new directory: 
    # tar -xvf v1.xx_kernel-2.6.y.directIP.tar 

    3. Your directory should now contain the files extracted from the image. You no longer require the downloaded tar file and can optionally keep it or delete it at your discretion.


    1.Downloaded file contents


    The file you have downloaded contains the following files:

    1. sierra.c
    This driver file manages your modem's serial USB interfaces and is required for direct IP operation. It contains a black list of interfaces which it must ignore. USB interfaces managed by this driver are exposed in your /dev/ directory as 
          /dev/ttyUSBn,


    where in most cases "n" ranges from 0 up to 6 or higher depending upon your product. This driver is mandatory for all Sierra Wireless USB-based products

    2. sierra_net.c
    This driver is specifically for Direct IP operation. It makes the Sierra Wireless modem appear to your Linux machine as one or more Ethernet-like devices, depending upon your modem's configuration. Installation of this driver is mandatory for Sierra Wireless Direct IP modems

    3. Makefile
    This file contains instructions your Linux computer needs to build and install the sierra.c and sierra_net.c drivers

    4. usbnet.h [1] , skb_compat.h [2]
    This file is required by the sierra_net.c driver and is provided as part of this download in the event that it is not available on your Linux computer. If the file is already resident on your computer, the make file will replace this unzipped copy in the directory where you have unzipped your driver with your pre-existing copy


    2. Driver Installation


    Preparation

    IMPORTANT! This article assumes you have a properly-configured USB modem, including a SIM card with an active account on it.


    Direct IP driver installation instructions

    The installation of these drivers is a two-step process consisting of compilation and then installation. The compilation step can be performed by anyone, however, the installation step can only be done by someone with appropriate authorization. In this case, appropriate authorization means having access to the sudo command or else having root account privileges.


    Compiling the driver

    To compile the sierra.c and sierra_net.c drivers, use the following step:

    1. Open a terminal window. The procedure for opening a terminal window varies from one Linux distribution to another. For example, on Ubuntu Linux you can select
    Applications->Accessories->Terminal

    2. Navigate to the directory in which you have unpacked your driver files
    # cd <directory path>

    3. Compile the drivers with the following command:
    # make

    4. When the command prompt returns your drivers should be successfully compiled and you should see no reports of errors from the make output

    5. Keep your terminal open for the next procedure - installing the driver


    Installing the driver using "root" privileges

    Now that the two driver files have been compiled, they need to be installed before you can use them. Installation of a driver module is straightforward; use the following steps:

    1. Ensure your Sierra Wireless modem is not plugged into your computer

    2. If you have root privileges, log in as root now:

    # su root

    When prompted, enter the password for the root account

    3. Install the drivers using the following command on your terminal window:

    # make install

    4. When the command prompt returns your drivers should be installed and ready for use.

    Note: if you see an error message of the form:

    FATAL: Module sierra is in use.
    make: *** [install_sierra] Error 1

    Then you have an application running that has at least 1 /dev/ttyUSB handle to the modem open. Please ensure all applications are stopped and re-install your drivers beginning from step 3, above.


    Installing the driver using "sudo"

    If you have sudo access you can use these steps to install the drivers

    1. Ensure your Sierra Wireless modem is not plugged into your computer

    2. You should have a terminal window open and you should have navigated to the directory in which you compiled your drivers

    3. Install the drivers using the following command:

    # sudo make install

    When prompted for your password, enter the password you normally use to log into your account

    4. When the command prompt returns your drivers should be installed and ready for use.

    Note: if you see an error message of the form:

    FATAL: Module sierra is in use.
    make: *** [install_sierra] Error 1

    Then you have an application running that has at least 1 /dev/ttyUSB handle to the modem open. Please ensure all applications are stopped and re-install your drivers beginning from step 3, above.

    Verify your installation

    Now that you have compiled and installed your drivers, you can use the following steps to verify the installation was successful.

    1. Open a terminal window

    2. Check the version numbers of your drivers using the following commands:

    # modinfo sierra   you should see v.1.7.x or later

    # modinfo sierra_net   you should see v.1.xx or later


    The driver's version number appears within the top few lines of the output from these commands

    3. Plug your modem into one of your computer's USB connections. Within a few seconds you should see several file handles appear in the /dev directory. Check this using the following command, issued from a terminal window:

    # ls /dev/ttyUSB*

    The response should look something like:

    /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3

    4. Check to see whether the modem's direct IP interface has been enumerated. From a terminal window enter the following command:

    # ifconfig

    The output should resemble the following with the "usb0" being the key piece of information, ignore the remainder of the printout for now.

    usb0 Link encap:Ethernet HWaddr 00:1e:37:21:9c:80
      inet addr:10.1.32.113 Bcast:10.1.32.255 Mask:255.255.255.0
      inet6 addr: fe80::21e:37ff:fe21:9c80/64 Scope:Link
      DOWN BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:14288 errors:0 dropped:0 overruns:0 frame:0
      TX packets:639 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:1674202 (1.5 MB) TX bytes:106755 (104.2 KB)
      Interrupt:21

    5. If your modem supports multiple direct IP interfaces you will see additional interfaces in step 4, numbered usb1, etc.

     

    3. Connecting to the Network

    At this point, your Sierra Wireless device should be detected. Computers using Linux Distributions like Ubuntu and Fedora can utilize Network Manager Native application to setup and make the connection to internet.  Advanced users can use command line to make the connection to internet

     

    * Your Sierra Wireless modem requires a valid SIM with an active account and you need  to know the APN (Access Point Name) as provided by  your Service provider

     

    Using Network Manager Application

     

    Basically, make a right click on Network manager icon which is the top row antenna icon, and enable Mobile Broadband.  It will step you through setting up a new mobile broadband connection.

     Please refer to the next KB article below for more details.


    How can I use Network Manager Application on Linux OS ?


    1. Connecting to modem


    Open a Linux terminal window connect to modem using command

     

        # minicom –s

    AT command port uses standard settings 115200 bps and 8 bits none parity, 1 stop bit (115200-8N1)
    Then, go to Serial port Setup and use :  /dev/ttyUSB2 or /dev/ttyUSB3 ** depending  of modem and firmware.   


    To verify modem is responding type ati5. It shows modem IMEI and Firmware. 

    Use command ATE1 to enable echo and see what you are typing.


    2. Setup the APN

        
    Verify if there is a profile created using command at+cgdcont?

     

    Most Branding cards have already a profile 1 created with standard APN. If there is not profile or SIM account uses a different APN. It is possible to modify or create a new profile using command

     

         at+cgdcont =<pid>,"IP","APN".


    Where “PID” is the profile id that identifies the profile, typically profile 1

    The modem should respond with "OK"

     

        Examples:

     

        AT&T:  at+cgdcont=1,”IP”,”broadband”

        Telstra: at+cgdcont=1,”IP”,”Telstra.internet”

        Rogers LTE:  at+cgdcont=1,”IP”,”lteinternet.apn “

        Rogers:  at+cgdcont=1,”IP”,”internet.com “

        Telus:  at+cgdcont=1,"IP","isp.telus.com"

        Bell: at+cgdcont=1,"IP","inet.bell.ca"

       
    Optional step:
    To change the Authentication method with the Carrier you can use the following commands:
    AT$QCPDPP=1,1,"password","username"

    3. Set Radio On                


    When using the modem in different computers it could inadvertently have set the Radio off. 
    To enable the Radio use command:  at+cfun =1.  After that, it should have power light on solid and Data light flashing. On CDMA modems use at!pcstate=1

     

    Note: To set the radio off use command at+cfun=0 as a result the two lights will be off.

    4.  Establishing a manual connection

    The following commands can be used to connect or disconnect on direct IP modems


    To manual connect:  at!scact=1,<pid>

    To manual disconnect:  at!scact=0,<pid>

     

        Example at!scact=1,1

     

    Optional : Setting Auto connect in default profile.


    Modem can auto connect after powering up or resets using the default profile.

     

    To set a default profile use the following command: at!scdftprof=<pid>

     

    You can enable Auto connect in default profile using command:  at!scprof=<pid>,"",1,0,0,0. 


    5. IP address obtained by carrier


    To check the IP address obtained by modem from the network use: at!scpaddr=<pid>


    For Example to Check IP address on profile 1 use command: at!scpaddr=1

     

    6.  Passing the IP on the computer


    Depending of the modem, it may not have the DHCP enabled by firmware. Network manager take care of this step, by using command line you may need to issue the next commands in another     Linux terminal window:

     

        #ifconfig wwan0 up **

        #ifup wwan0

        #ifconfig

     

        It will show wwan0 interface with same IP address s as shown in step 5.

     

        ** if it shows error "interface wwan0 not configured". We suggest adding the following lines in the interface file located: /etc/network/interfaces using any text editor  

                   

        auto wwan0

        iface wwan0 inet dhcp  


    7. Summary


    Summary of command s to create a Profile and make a manual connection using profile 3

     

        at+cfun=1 

        at+cgdcont=3,"IP","CustomAPN"

        at!scdftprof=3

        at!scprof=3,"",0,0,0,0

        at!scact=1,3

        at!scpaddr=3


    Summary of commands to create a Profile 3 and using Auto connect feature

     

        at+cfun=1 

        at+cgdcont=3,"IP","CustomAPN"

        at!scdftprof=3

        at!scprof=3," ",1,0,0,0


    8. Command to check modem status: at!gstatus?


    ______________________________________________________________________

    [1] Kernels 2.6.20 through 2.6.24 only
    [2] Kernels 2.6.20 and 2.6.21 only
    [3] Note, your APN may be different from the one indicated above which is for example purposes only. Contact your wireless service provider to find out what APN you should use. The APN only needs to be configured once.

Related Answers
Answer ID:
A000044-030711
Product Brand: AirPrime™ Intelligent Embedded
   Email
   Print
Was this helpful?