Estou tentando configurar uma conexão de modem gsm no Linux usando o NetworkManager.
Os detalhes do modem são os seguintes:
# mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id 'f45005b4e117e9572228e3e57af4ead9cc620063')
-------------------------
Hardware | manufacturer: 'Sierra Wireless, Incorporated'
| model: 'MC7304'
| revision: 'SWI9X15C_05.05.58.00 r27038 carmd-fwbuild1 2015/03/04 21:30:23'
| supported: 'gsm-umts
| lte
| gsm-umts, lte'
| current: 'gsm-umts, lte'
| equipment id: '356853056005343'
-------------------------
System | device: '/sys/devices/platform/ocp/47400000.usb/47401400.usb/musb-hdrc.0.auto/usb1/1-1'
| drivers: 'option1, qmi_wwan'
| plugin: 'Generic'
| primary port: 'cdc-wdm0'
| ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'sim-pin'
| unlock retries: 'sim-pin (3), sim-pin2 (0), sim-puk (10), sim-puk2 (10)'
| state: 'locked'
| power state: 'on'
| access tech: 'unknown'
| signal quality: '0' (cached)
-------------------------
Modes | supported: 'allowed: 2g, 3g, 4g; preferred: none'
| current: 'allowed: 2g, 3g, 4g; preferred: none'
-------------------------
Bands | supported: 'cdma-bc15-aws, dcs, egsm, pcs, g850, u2100, u1900, u800, u850, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx'
| current: 'cdma-bc15-aws, dcs, egsm, pcs, g850, u2100, u1900, u850, u900, eutran-i, eutran-iii, eutran-vii, eutran-viii, eutran-xx'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: 'none'
Eu então adiciono a conexão da seguinte forma:
# nmcli c add save yes type gsm ifname cdc-wdm0 con-name gsm autoconnect yes apn gprs.swisscom.ch user gprs password gprs
Connection 'gsm' (7acbdf27-9854-4f5a-a5d4-dbfde55e79a3) successfully added.
# nmcli c modify gsm gsm.pin ****
Depois, confirmo que a conexão foi registrada:
# nmcli con
NAME UUID TYPE DEVICE
gsm 7acbdf27-9854-4f5a-a5d4-dbfde55e79a3 gsm --
Wired connection 2 5059a1aa-9674-4e9f-8a6d-5ef5c5fb4389 802-3-ethernet --
Wired connection 1 76533211-9c38-411d-8e73-c0e2d58a267a 802-3-ethernet eth0
Então eu tento conectar:
# nmcli c up gsm
Error: Connection activation failed: Connection 'gsm' is not available on the device cdc-wdm0 at this time.
Aqui estão as entradas de registro resultantes:
Feb 27 15:27:29 amg NetworkManager[286]: <info> Auto-activating connection 'gsm'.
Feb 27 15:27:29 amg NetworkManager[286]: <info> Activation (cdc-wdm0) starting connection 'gsm'
Feb 27 15:27:29 amg NetworkManager[286]: <info> Activation (cdc-wdm0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 27 15:27:29 amg NetworkManager[286]: <info> Activation (cdc-wdm0) Stage 1 of 5 (Device Prepare) started...
Feb 27 15:27:29 amg NetworkManager[286]: <info> (cdc-wdm0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Feb 27 15:27:29 amg NetworkManager[286]: <info> (cdc-wdm0): device state change: prepare -> need-auth (reason 'none') [40 60 0]
Feb 27 15:27:29 amg NetworkManager[286]: <info> Activation (cdc-wdm0) Stage 1 of 5 (Device Prepare) complete.
Feb 27 15:27:29 amg NetworkManager[286]: <warn> No agents were available for this request.
Feb 27 15:27:29 amg NetworkManager[286]: <info> (cdc-wdm0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
Feb 27 15:27:29 amg NetworkManager[286]: <warn> Activation (cdc-wdm0) failed for connection 'gsm'
Feb 27 15:27:29 amg NetworkManager[286]: ** (NetworkManager:286): CRITICAL **: mm_modem_simple_disconnect: assertion 'MM_IS_MODEM_SIMPLE (self)' failed
Feb 27 15:27:29 amg NetworkManager[286]: <info> (cdc-wdm0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Feb 27 15:27:29 amg NetworkManager[286]: <info> (cdc-wdm0): deactivating device (reason 'none') [0]
Feb 27 15:28:05 amg NetworkManager[286]: <warn> Failed to activate 'gsm': Connection 'gsm' is not available on the device cdc-wdm0 at this time.
O que está errado? Eu desconfigurou alguma coisa? Ou há um passo adicional? Como posso investigar mais sobre o que está errado?
Parece que uma pista é essa linha: ** (NetworkManager:286): CRITICAL **: mm_modem_simple_disconnect: assertion 'MM_IS_MODEM_SIMPLE (self)' failed
, mas não tenho certeza do que isso significa.
Qualquer ajuda seria muito apreciada.
Tags networking linux networkmanager gsm