NetworkManager missing wwan plugins in yocto project

Hi Toradex,

I have included the NetworkManager and removed the ConnMan in yocto project by adding below lines in local.conf file.

Remove connman

MAGE_INSTALL_remove = ” connman”
IMAGE_INSTALL_remove = ” connman-client”
IMAGE_INSTALL_remove = ” connman-gnome”

Add NetworkManager

IMAGE_INSTALL_append = ” networkmanager ”
IMAGE_INSTALL_append = ” modemmanager”

I want to use NetworkManager and ModemManager for modem auto connection. But this is not happening because of missing wwan plug in NetworkManager.

Networkmanager-wwan plugin was missing in final image. Log messages are attached for your reference.

Please help on this.
Thank you

Hello,

Can you please post more details on software version you are using?

Also which modem are you trying to connect and interface you are using?

What are the sequence of steps you are following ?

Please also share the output of below commands

mmcli -m 0

nmcli c

check below article for more information

link text

It is for Torizon but same can be used if you have custom image with network manager and modemmanager.

Best Regards

Ritesh Kumar

Hello,

Q: Can you please post more details on software version you are using?
Reply: NetworkManager version – > 1.22.10,
ModemManager version – > 1.12.12,
Kernel version → 5.4.77

Q:Also which modem are you trying to connect and interface you are using?
Reply: Quectel EC25-E

What are the sequence of steps you are following ?
Reply:
1.Identifying the wwan interface is managed or not.
root@apalis-imx6:~# nmcli d
DEVICE TYPE STATE CONNECTION
eth1 ethernet connected Wired connection 1
eth2 ethernet unavailable –
can0 can unmanaged –
can1 can unmanaged –
eth0 ethernet unmanaged –
usb0 ethernet unmanaged –
lo loopback unmanaged –
wwan0 wwan unmanaged –

root@apalis-imx6:~# nmcli -p
eth1: connected to Wired connection 1
	"Microchip LAN7500"
	ethernet (smsc75xx), 00:1E:C0:E0:89:FD, hw, mtu 1500
	ip4 default
	inet4 192.168.126.223/22
	route4 0.0.0.0/0
	route4 192.168.124.0/22
	inet6 fe80::7473:5bc3:5e0c:1bfb/64
	route6 fe80::/64
	route6 ff00::/8

eth2: unavailable
	"Microchip SMSC9512/9514"
	ethernet (smsc95xx), 00:1E:C0:E1:09:7D, hw, mtu 1500

wwan0: unavailable
	"Quectel EC25"
	wwan (qmi_wwan), CA:94:10:9D:E4:CA, plugin missing, hw, mtu 1500

2.As you can see wwan0 is showing as unmanaged and plug-in is missing,so i have run a 
  command("nmcli dev set wwan0 managed yes") to set as managed one.
3.Now wwan interface is showing as unavailable.

root@apalis-imx6:~# nmcli d 
DEVICE  TYPE      STATE        CONNECTION         
eth1    ethernet  connected    Wired connection 1 
eth2    ethernet  unavailable  --                 
wwan0   wwan      unavailable  --                 
can0    can       unmanaged    --                 
can1    can       unmanaged    --                 
eth0    ethernet  unmanaged    --                 
usb0    ethernet  unmanaged    --                 
lo      loopback  unmanaged    --    

root@apalis-imx6:~# nmcli con add type gsm  con-name Modem ifname wwan0 apn airtelgprs.com
Warning: There is another connection with the name 'Modem'. Reference the connection by its uuid 'a6f15d26-06c3-4409-ac56-012c035f193f'
Connection 'Modem' (a6f15d26-06c3-4409-ac56-012c035f193f) successfully added.
root@apalis-imx6:~# 
root@apalis-imx6:~# 
root@apalis-imx6:~# 
root@apalis-imx6:~# 
root@apalis-imx6:~# cat /etc/NetworkManager/system-connections/
Modem-a6f15d26-06c3-4409-ac56-012c035f193f.nmconnection  cell1
Modem.nmconnection                                       
root@apalis-imx6:~# cat /etc/NetworkManager/system-connections/Modem-a6f15d26-06c3-4409-ac56-012c035f193f.nmconnection 
[connection]
id=Modem
uuid=a6f15d26-06c3-4409-ac56-012c035f193f
type=gsm
interface-name=wwan0
permissions=

[gsm]
apn=airtelgprs.com

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

[proxy]

root@apalis-imx6:~# nmcli c
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  977d1334-9847-382d-b222-97576edbe592  ethernet  eth1   
Modem               1862ec1c-3987-4bee-ab37-a15a3caea24a  gsm       --     
Modem               a6f15d26-06c3-4409-ac56-012c035f193f  gsm       --     
Wired connection 2  1bcc27b2-2e81-3e7f-822c-be806b287235  ethernet  --     
root@apalis-imx6:~# nmcli d
DEVICE  TYPE      STATE        CONNECTION         
eth1    ethernet  connected    Wired connection 1 
eth2    ethernet  unavailable  --                 
wwan0   wwan      unavailable  --                 
can0    can       unmanaged    --                 
can1    can       unmanaged    --                 
eth0    ethernet  unmanaged    --                 
usb0    ethernet  unmanaged    --                 
lo      loopback  unmanaged    --                 

Q:Please also share the output of below commands
mmcli -m 0
nmcli c
Reply:
root@apalis-imx6:~# mmcli -m 0
--------------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: ba3997d4bf1e6db67a476314710c02cfb3f58eb7
--------------------------------
Hardware | manufacturer: QUALCOMM INCORPORATED
| model: QUECTEL Mobile Broadband Module
| firmware revision: EC25EFAR06A08M4G
| carrier config: default
| h/w revision: 10000
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 860548045586564
--------------------------------
System | device: /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1.2
| drivers: option1, qmi_wwan
| plugin: Quectel
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net),
| ttyUSB1 (gps), ttyUSB3 (at)
--------------------------------
Status | lock: sim-pin2
| unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: registered
| power state: on
| access tech: gsm
| signal quality: 100% (recent)
--------------------------------
Modes | supported: allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 4g; preferred: 4g
| allowed: 2g, 4g; preferred: 2g
| allowed: 3g, 4g; preferred: 3g
| allowed: 3g, 4g; preferred: 4g
| allowed: 2g, 3g, 4g; preferred: 4g
| allowed: 2g, 3g, 4g; preferred: 3g
| allowed: 2g, 3g, 4g; preferred: 2g
| current: allowed: 2g, 3g, 4g; preferred: 4g
--------------------------------
Bands | supported: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3,
| eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40,
| eutran-41
| current: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3,
| eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40,
| eutran-41
--------------------------------
IP | supported: ipv4, ipv6, ipv4v6
--------------------------------
3GPP | imei: 860548045586564
| operator id: 40449
| operator name: airtel
| registration: home
--------------------------------
3GPP EPS | ue mode of operation: csps-2
--------------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0

root@apalis-imx6:~# nmcli c
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  977d1334-9847-382d-b222-97576edbe592  ethernet  eth1   
Wired connection 2  1bcc27b2-2e81-3e7f-822c-be806b287235  ethernet  --

Hello,

Q: Can you please post more details on software version you are using?
Reply: NetworkManager version – > 1.22.10,
ModemManager version – > 1.12.12,
Kernel version → 5.4.77

Q:Also which modem are you trying to connect and interface you are using?
Reply: Quectel EC25-E

What are the sequence of steps you are following ?
Reply:
1.Identifying the wwan interface is managed or not.

root@apalis-imx6:~# nmcli d

DEVICE  TYPE      STATE        CONNECTION         
eth1    ethernet  connected    Wired connection 1 
eth2    ethernet  unavailable  --                 
can0    can       unmanaged    --                 
can1    can       unmanaged    --                 
eth0    ethernet  unmanaged    --                 
usb0    ethernet  unmanaged    --                 
lo      loopback  unmanaged    --                 
wwan0   wwan      unmanaged    --   

root@apalis-imx6:~# nmcli -p

eth1: connected to Wired connection 1
	"Microchip LAN7500"
	ethernet (smsc75xx), 00:1E:C0:E0:89:FD, hw, mtu 1500
	ip4 default
	inet4 192.168.126.223/22
	route4 0.0.0.0/0
	route4 192.168.124.0/22
	inet6 fe80::7473:5bc3:5e0c:1bfb/64
	route6 fe80::/64
	route6 ff00::/8

eth2: unavailable
	"Microchip SMSC9512/9514"
	ethernet (smsc95xx), 00:1E:C0:E1:09:7D, hw, mtu 1500

wwan0: unavailable
	"Quectel EC25"
	wwan (qmi_wwan), CA:94:10:9D:E4:CA, plugin missing, hw, mtu 1500

2.As you can see wwan0 is showing as unmanaged and plug-in is missing,so i have run a 
  command("nmcli dev set wwan0 managed yes") to set as managed one.
3.Now wwan interface is showing as unavailable.

root@apalis-imx6:~# nmcli d 

DEVICE  TYPE      STATE        CONNECTION         
eth1    ethernet  connected    Wired connection 1 
eth2    ethernet  unavailable  --                 
wwan0   wwan      unavailable  --                 
can0    can       unmanaged    --                 
can1    can       unmanaged    --                 
eth0    ethernet  unmanaged    --                 
usb0    ethernet  unmanaged    --                 
lo      loopback  unmanaged    --    

root@apalis-imx6:~# nmcli con add type gsm  con-name Modem ifname wwan0 apn airtelgprs.com

Warning: There is another connection with the name 'Modem'. Reference the connection by its uuid 'a6f15d26-06c3-4409-ac56-012c035f193f'
Connection 'Modem' (a6f15d26-06c3-4409-ac56-012c035f193f) successfully added.

                                  
root@apalis-imx6:~# cat /etc/NetworkManager/system-connections/Modem-a6f15d26-06c3-4409-ac56-012c035f193f.nmconnection 
[connection]
id=Modem
uuid=a6f15d26-06c3-4409-ac56-012c035f193f
type=gsm
interface-name=wwan0
permissions=

[gsm]
apn=airtelgprs.com

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

[proxy]

root@apalis-imx6:~# nmcli c

NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  977d1334-9847-382d-b222-97576edbe592  ethernet  eth1   
Modem               1862ec1c-3987-4bee-ab37-a15a3caea24a  gsm       --     
Modem               a6f15d26-06c3-4409-ac56-012c035f193f  gsm       --     
Wired connection 2  1bcc27b2-2e81-3e7f-822c-be806b287235  ethernet  --  

root@apalis-imx6:~# nmcli d
DEVICE  TYPE      STATE        CONNECTION         
eth1    ethernet  connected    Wired connection 1 
eth2    ethernet  unavailable  --                 
wwan0   wwan      unavailable  --                 
can0    can       unmanaged    --                 
can1    can       unmanaged    --                 
eth0    ethernet  unmanaged    --                 
usb0    ethernet  unmanaged    --                 
lo      loopback  unmanaged    --                 

Q:Please also share the output of below commands
mmcli -m 0
nmcli c
Reply:
root@apalis-imx6:~# mmcli -m 0

  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
	   |            device id: ba3997d4bf1e6db67a476314710c02cfb3f58eb7
  --------------------------------
  Hardware |         manufacturer: QUALCOMM INCORPORATED
	   |                model: QUECTEL Mobile Broadband Module
	   |    firmware revision: EC25EFAR06A08M4G
	   |       carrier config: default
	   |         h/w revision: 10000
	   |            supported: gsm-umts, lte
	   |              current: gsm-umts, lte
	   |         equipment id: 860548045586564
  --------------------------------
  System   |               device: /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1.2
	   |              drivers: option1, qmi_wwan
	   |               plugin: Quectel
	   |         primary port: cdc-wdm0
	   |                ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net), 
	   |                       ttyUSB1 (gps), ttyUSB3 (at)
  --------------------------------
  Status   |                 lock: sim-pin2
	   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
	   |                state: registered
	   |          power state: on
	   |          access tech: gsm
	   |       signal quality: 100% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
	   |                       allowed: 3g; preferred: none
	   |                       allowed: 4g; preferred: none
	   |                       allowed: 2g, 3g; preferred: 3g
	   |                       allowed: 2g, 3g; preferred: 2g
	   |                       allowed: 2g, 4g; preferred: 4g
	   |                       allowed: 2g, 4g; preferred: 2g
	   |                       allowed: 3g, 4g; preferred: 3g
	   |                       allowed: 3g, 4g; preferred: 4g
	   |                       allowed: 2g, 3g, 4g; preferred: 4g
	   |                       allowed: 2g, 3g, 4g; preferred: 3g
	   |                       allowed: 2g, 3g, 4g; preferred: 2g
	   |              current: allowed: 2g, 3g, 4g; preferred: 4g
  --------------------------------
  Bands    |            supported: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3, 
	   |                       eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40, 
	   |                       eutran-41
	   |              current: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3, 
	   |                       eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40, 
	   |                       eutran-41
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 860548045586564
	   |          operator id: 40449
	   |        operator name: airtel
	   |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0


root@apalis-imx6:~# nmcli c

NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  977d1334-9847-382d-b222-97576edbe592  ethernet  eth1   
Wired connection 2  1bcc27b2-2e81-3e7f-822c-be806b287235  ethernet  --

Hi,
What is the debug output you get whenever you connect your modem?

Hi @shreyas.

Thanks for the information, we are trying to reproduce the issue, allow us some time to get back to you

Hi @sahil.tx ,
Any update on this issue.
Thank you

Hi Narayanaswamyn,

This requires you to add support for modem for networkmanager as this is not by default enable from network manager recipe.

One can try to add same as below

through local.conf add below lines

PACKAGECONFIG_append_pn-networkmanager = " modemmanager ppp"

Alternatively create bbappend file for networkmanger recipe and patch your changes.
You can take reference from below recipe which is for our Torizon OS

Please check section 5.1.5 in yocto refrence mannual for more information
https://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html

Best Regards

Ritesh kumar