title: Script to connect multiple USB 3G modem
body: <p>I am trying to connect multiple USB 3G modem (two, in my case) programatically in Ubuntu 12.04. I can do it graphically through the Network Manager, but I'd like to replicate the process on the command line.</p>
  
  <p>Here is the process that I am trying to emulate.</p>
  
  <ol>
  <li>Connect two 3G dongles, both huawei, Model No: E173Bu-1 (Service provider: Airtel) and Model No: E173u-1(Service Provider: MTNL).</li>
  <li>The connections that I configured shouldn't have "connect automatically" checked in the Network Manager GUI.</li>
  <li>Now, from the Network Manager GUI, I am able to connect to both of them manually one after the other.</li>
  <li>I could see <code>ppp0</code> and <code>ppp1</code> connections established when I run <code>ifconfig</code> and also the routing table populated appropriately.</li>
  </ol>
  
  <p>So far, so good.</p>
  
  <p>When I connect two 3G dongles, the connections shouldn't have "connect automatically" checked in the Network Manager GUI.</p>
  
  <p>From the command line, I tried the following command: <code>$ nmcli con up id "Airtel"</code></p>
  
  <p>It gave the following error:</p>
  
  <pre><code>$ nmcli con up id "Airtel"
  Active connection state:
  activating Active connection path:
  /org/freedesktop/NetworkManager/ActiveConnection/2 state: unknown
  Error: Connection activation failed.
  </code></pre>
  
  <p>I tried it again, and got this error:</p>
  
  <pre><code>$ nmcli con up id "Airtel"
  </code></pre>
  
  <blockquote>
    <p>** (process:3184): WARNING **: Could not initialize NMActiveConnection /org/freedesktop/NetworkManager/ActiveConnection/3: Method "GetAll"
    with signature "s" on interface "org.freedesktop.DBus.Properties"
    doesn't exist</p>
    
    <p>Active connection state: unknown Active connection path:
    /org/freedesktop/NetworkManager/ActiveConnection/3</p>
    
    <p>** (process:3184): WARNING **: Could not create object for /org/freedesktop/NetworkManager/ActiveConnection/3: Method "GetAll"
    with signature "s" on interface "org.freedesktop.DBus.Properties"
    doesn't exist</p>
  </blockquote>
  
  <p>The exact same thing happens if I try the same for the connection "MTNL."</p>
  
  <hr>
  
  <p>The first time I try gives the decent looking first error. i.e.,</p>
  
  <pre><code>$ nmcli con up id "Airtel"
  
  Active connection state: activating
  Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
  state: unknown
  Error: Connection activation failed.
  </code></pre>
  
  <p>and on successive tries i keep getting the wierd looking error. i.e.,</p>
  
  <pre><code>$ nmcli con up id "Airtel"
  </code></pre>
  
  <blockquote>
    <p>** (process:3184): WARNING **: Could not initialize NMActiveConnection /org/freedesktop/NetworkManager/ActiveConnection/3: Method "GetAll"
    with signature "s" on interface "org.freedesktop.DBus.Properties"
    doesn't exist</p>
    
    <p>Active connection state: unknown Active connection path:
    /org/freedesktop/NetworkManager/ActiveConnection/3</p>
    
    <p>** (process:3184): WARNING **: Could not create object for /org/freedesktop/NetworkManager/ActiveConnection/3: Method "GetAll"
    with signature "s" on interface "org.freedesktop.DBus.Properties"
    doesn't exist</p>
  </blockquote>
  
  <p>I am using Ubuntu 12.04 on an Asus Eee PC seashell series notebook. (I only need a solution for this configuration only).</p>