Using qmicli with a Sierra Wireless EM7455

Friedrich Romstedt friedrichromstedt at gmail.com
Tue Jun 23 16:01:24 UTC 2020


Hello Aleksander,

Am Di., 23. Juni 2020 um 09:18 Uhr schrieb Aleksander Morgado
<aleksander at aleksander.es>:
>
> > > The call of `qmicli` in the abovementioned list failed with:
> > >
> > > error: couldn't set operating mode: QMI protocol error (60): 'InvalidTransition'
> >
> > where the "call of qmicli in the abovementioned list" was:
> >
> > $ qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode online
>
> For that specific issue, the --dms-set-fcc-authentication should be
> what was needed.

In fact this command is sufficient (and needed) to make the following
`--set-radio-state on` step succeed.

> > > I would advice to always use the "-p" option when running qmicli
> > > commands, and also configure PROXY=yes in the qmi-network profile
> > > you're using. But for your initial assessment it may not be strictly
> > > necessary.
> >
> > Why should I do so?
>
> If you run your QMI commands through the qmi-proxy (or your MBIM
> commands through the mbim-proxy), you can have multiple processes
> running commands at the same time, as long as they all use the proxy.

What means "running commands here"? Does it have influence on the data traffic?

> > > > Loading profile at /etc/qmi-network.conf...
> > > >     APN: internet.telekom
> > > >     APN user: telekom
> > > >     APN password: telekom
> > > >     qmi-proxy: no
> > > > Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-format '...
> > > > Device link layer protocol retrieved: raw-ip
> > > > Getting expected data format with 'qmicli -d /dev/cdc-wdm0
> > > > --get-expected-data-format'...
> > > > error: cannot get expected data format: Expected data format not
> > > > retrieved properly: Failed to open file
> > > > '/sys/class/net/wwp0s20f0u5i12/qmi/raw_ip': No such file or directory
> > > > [19 Jun 2020, 16:15:15] -Warning ** [/dev/cdc-wdm0] MBIM device wasn't
> > > > explicitly closed
> > >
> > > Ohhhhhhhh! Your EM7455 is running in MBIM mode, not in QMI mode!
> > > Time to switch to mbimcli and mbim-network :D Please try with those.
> > > Until now you have been running QMI commands "over MBIM", which is why
> > > you didn't notice major problems. Now you can also ignore all the
> > > comments above regarding the raw-ip requirement, that is a QMI thing
> > > only.
> >
> > Should I send further messages to libmbim-devel at lists.freedesktop.org then?
>
> Whatever you prefer, but you're very close to having everything ready anyway :D

OK, so I'll keep sending to libqmi-devel for simplicity and to avoid
fragmenting the conversation.

> The output of mbim-network shows you're registered, which is what you need.

Normally I would agree, but see below.

> Here's your command output; see inline.
>
> > Command: mbim-network /dev/cdc-wdm0 start
> >
> > Loading profile at /etc/mbim-network.conf...
> >     APN: internet.telekom
> >     APN auth protocol: PAP
> >     APN user: telekom
> >     APN password: telekom
> >     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: 'xxxxxxxxxxxxxxx' SIM ICCID: 'xxxxxxxxxxxxxxxxxxxx' Ready info: 'none' Telephone numbers: (1) '+xxxxxxxxxxxxx' [/dev/cdc-wdm0] Session not closed: TRID: '3'
> > Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 3)
>
> This is good, your SIM is ready to be used.

So far, everything looks indeed good ...

> > 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: 'home' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '26201' Provider name: 'Telekom.de' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '4'
> > Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
>
> This is good, you're already registered in your home network. What
> does mbimcli --query-signal-state say about the access technology in
> use?

I obtained as result for `--query-signal-state`:

[/dev/cdc-wdm0] Signal state:
              RSSI [0-31,99]: '8'
         Error rate [0-7,99]: '99'
    Signal strength interval: '5'
              RSSI threshold: '2'
        Error rate threshold: 'unspecified'

You find this in log d06 within the attached archive.

> > Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close '...
> > Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 5)
> > Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='internet.telekom',auth='PAP',username='telekom',password='telekom' --no-open=5 --no-close '...
> > Network started successfully
> > Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 7)
>
> This is good, the network connection to the APN you specified is now
> up. The only thing missing is setting up the network interface with
> the required IP settings.
>
> I truly don't remember whether your modem supports DHCP to setup the
> network interface, because by default we don't do that in
> ModemManager, given that not all MBIM modems have a DHCP server
> running inside. Instead, what we do in MM, and what you should
> probably do is use mbimcli --query-ip-configuration to retrieve what
> are the IP settings to configure in the network interface.
> mbim-network doesn't do that for you so far.

I could run neither `mbimcli -d /dev/cdc-wdm0 --query-signal-state`
nor `mbimcli -d /dev/cdc-wdm0 --query-ip-configuration` successfully.
Whenever I issued any of these commands, it caused my connection
apparently to be terminated. You can find detailed logs of everything
I did in the archive attached. The commands have been run in the order
of their log file names. The `e*` series was run after a complete
system shutdown and restart, after I was unsuccessful within the `d*`
series.

It's wonderful to have you for assistance here.

Best wishes,
Friedrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2020-06-23_1720 Friedrich.tar.gz
Type: application/gzip
Size: 2050 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20200623/552f1b6c/attachment.gz>


More information about the libqmi-devel mailing list