5

I am trying to configure a new unit with a cellular interface on ubuntu core 16.04. I have NMCLI package running on it. Before I added my connection I checked the Interfaces

# nmcli dev
DEVICE    TYPE      STATE         CONNECTION         
eth1      ethernet  connected     Wired connection 1 
wlan0     wifi      disconnected  --                 
eth0      ethernet  unavailable   --                 
cdc-wdm0  gsm       unavailable   --                 
lo        loopback  unmanaged     --     

I added my connection:

nmcli con add type gsm ifname cdc-wdm0 con-name MyConnection apn myapn.com

Finally I have tried bringing connection up by running:

nmclil con up MyConnection 
Error: Connection activation failed: No suitable device found for this connection

Also I have pasted the output of the Config applied:

# nmcli -p con show MyConnection

                  Connection profile details (MyConnection)

connection.id:                          MyConnection
connection.uuid:                        25dc3eec-ca8a-4861-bfcc-089d558972d4
connection.interface-name:              cdc-wdm0
connection.type:                        gsm
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.timestamp:                   0
connection.read-only:                   no
connection.permissions:                 
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        -1 (default)

ipv4.method:                            auto
ipv4.dns:                               
ipv4.dns-search:                        
ipv4.dns-options:                       (default)
ipv4.addresses:                         
ipv4.gateway:                           --
ipv4.routes:                            
ipv4.route-metric:                      -1
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-timeout:                      0
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)

ipv6.method:                            auto
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.dns-options:                       (default)
ipv6.addresses:                         
ipv6.gateway:                           --
ipv6.routes:                            
ipv6.route-metric:                      -1
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --

gsm.number:                             *99#
gsm.username:                           <hidden>
gsm.password:                           <hidden>
gsm.password-flags:                     0 (none)
gsm.apn:                                myapn.com
gsm.network-id:                         --
gsm.pin:                                <hidden>
gsm.pin-flags:                          0 (none)
gsm.home-only:                          no
gsm.device-id:                          --
gsm.sim-id:                             --
gsm.sim-operator-id:                    --

My question is how do I enable the unavailable device and why is it unavailable? What can I check to help me resolve my issue.

Any help would be great as I am only starting on Snappy.

Bart
  • 111
  • 1
  • 1
  • 6

2 Answers2

6

Ok, so I managed to resolve my own problem, the steps I took are as follows:

1) Check that the modem on my gateway is read by ubuntu core:

$ sudo mmcli -L

Found 1 modems:
    /org/freedesktop/ModemManager1/Modem/0 [Generic] MBIM [1519:0020]

2) Check that the SIM is read correctly:

$ sudo mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id 'd8b328efa783ca35a022d6b44b878981e67a5903')
  -------------------------
  Hardware |   manufacturer: 'Generic'
           |          model: 'MBIM [1519:0020]'
           |       revision: 'MOD_6260_V05.1412.00_R07_VCTCX'
           |      supported: 'gsm-umts'
           |        current: 'gsm-umts'
           |   equipment id: '014752000020933'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3'
           |        drivers: 'cdc_acm, cdc_mbim'
           |         plugin: 'Generic'
           |   primary port: 'cdc-wdm0'
           |          ports: 'cdc-wdm0 (mbim), wwan0 (net), ttyACM0 (at)'
  -------------------------
  Numbers  |           own : 'unknown'
  -------------------------
  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'gprs'
           | signal quality: '67' (cached)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g; preferred: none'
           |        current: 'allowed: 2g, 3g; preferred: none'
  -------------------------
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: '<censored>'
           |  enabled locks: 'fixed-dialing'
           |    operator id: '27203'
           |  operator name: 'IRL - METEOR'
           |   subscription: 'unknown'
           |   registration: 'home'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'

This is where I realised that my SIM has not been found in the Gateway and I have a damaged SIM, I have changed my SIM card and came up with the output above.

3) Configure the new APN or edit existing one. (I found it easier to add the connection anew)

Make sure you are in root (sudo su -)

a)Delete existing connection that was failing

 #nmcli con delete MyConnection

b)Create new connection

#nmcli con add type gsm ifname cdc-wdm0 con-name MyWorkingConnection apn MyNewApn.com

4) Add username and password to the new connection

#nmcli con edit MyWorkingConnection

At this point you will be in the nmcli> prompt. Type in help for list of commands to help you edit your connection. For me I needed to add username and password so I achieved that by typing in:

nmcli> set gsm.username data
nmcli> set gsm.password <passwordgoeshere>
nmcli> save
nmcli> quit

At this point my connection has established. I have found the command

#nmcli m

open in another session being useful to check the state of the interface changing.

Hope this helps some people!

Bart
  • 111
  • 1
  • 1
  • 6
0

Some modems require removing/disabling the internal battery, then shutting down the laptop for the modem to work with the new sim card, otherwise you will keep getting "invalid sim card", "invalid status"...

This is from docs of Thinkpad T460 using the LTE Huawei ME906s modem

To install or replace the micro SIM card, do the following: 1. Disable the built-in battery. See “Disabling the built-in battery” on page 121. 2. Remove the removable battery. See “Replacing the removable battery” on page 122...

You can disable internal battery (if you have one) from BOIS, else just removing the external battery should be enough

phoenixstudio
  • 1,776
  • 1
  • 14
  • 19