And here comes more useful information, after I started everything from scratch.
/etc/network/config
now contains:
config interface 'wwan'
option device '/dev/cdc-wdm0'
option proto 'mbim'
option apn 'tel.hitsmobile.es'
ifstatus wwan0
shows:
root@OpenWrt:~# ifstatus wwan
{
"up": false,
"pending": true,
"available": true,
"autostart": true,
"dynamic": false,
"proto": "mbim",
"data": {
},
"errors": [
{
"subsystem": "mbim",
"code": "NO_REGISTRATION"
}
]
}
This comes from having logread -f
running.
Sat Aug 13 14:39:17 2022 daemon.notice netifd: wwan (20539): mbim[20539] Reading capabilities
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): devicetype: 0002 - removable
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): cellularclass: 0001
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): voiceclass: 0001 - no-voice
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): simclass: 0002
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): dataclass: 8000001F
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): smscaps: 0003
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): controlcaps: 0001
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): maxsessions: 0001
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): deviceid: 860112020327997
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): firmwareinfo: V3.0
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): hardwareinfo: CH1K5150M
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): mbim[20539] Checking pin
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): Pin Unlocked
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): mbim[20539] Checking subscriber
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): readystate: 0001 - initialized
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): simiccid: 89345XXXXXXXXXXXXXX
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): subscriberid: 214XXXXXXXXXXXX
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): mbim[20539] Register with network
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): nwerror: 0000 - unknown
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): registerstate: 0004 - roaming
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): registermode: 0001 - automatic
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): availabledataclasses: 0020 - lte
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): currentcellularclass: 0001 - gsm
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): provider_id: 21401
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): provider_name: Voda ES
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): roamingtext: (null)
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): mbim[20539] Subscriber registration failed
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): sessionid: 0
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): activationstate: 0003 - deactivated
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): voicecallstate: 0000 - none
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): nwerror: 0000 - unknown
Sat Aug 13 14:39:18 2022 daemon.notice netifd: wwan (20539): iptype: 0000 - default
In this case, the device LED keeps blinking in purple.
So we don't reach the "registered" state.
Now, if I call ifdown wwan
and then call:
root@OpenWrt:~# mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
APN: tel.hitsmobile.es
APN auth protocol: unset
APN user: unset
APN password: unset
mbim-proxy: no
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close'...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '2140XXXXXXXXXXX' SIM ICCID: '8934XXXXXXXXXXXXXXXX' Ready info: 'none' Telephone numbers: (0) 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '3'
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=3 --no-close'...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'roaming' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '21401' Provider name: 'Voda ES' Roaming text: 'unknown' Registration flags: 'none' [/dev/cdc-wdm0] Session not closed: TRID: '4'
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close'...
[/dev/cdc-wdm0] Successfully attached to packet service [/dev/cdc-wdm0] Packet service status: Network error: 'unknown' Packet service state: 'attached' Available data classes: 'lte' Uplink speed: '0 bps' Downlink speed: '0 bps' [/dev/cdc-wdm0] Session not closed: TRID: '5'
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='tel.hitsmobile.es' --no-open=5 --no-close'...
Network started successfully
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 7)
And in this case, the LED stays purple and doesn't blink. However mbin-network
calls /usr/bin/mbimcli
and not /sbin/umbim
Now, running the umbim
calls manually, lands me with the command registration
exiting with an error, even if... it seems the registration worked and the SIM is in roaming mode?
root@OpenWrt:~# umbim -d /dev/cdc-wdm0 registration; echo $?
nwerror: 0000 - unknown
registerstate: 0004 - roaming
registermode: 0001 - automatic
availabledataclasses: 0020 - lte
currentcellularclass: 0001 - gsm
provider_id: 21401
provider_name: Voda ES
roamingtext: (null)
4
Could it be umbim
does not handle roaming mode while mbimcli
does?