Using qmicli with a Sierra Wireless EM7455

Friedrich Romstedt friedrichromstedt at
Wed Jun 24 16:07:14 UTC 2020

Dear Aleksander,

Am Di., 23. Juni 2020 um 18:43 Uhr schrieb Aleksander Morgado
<aleksander at>:
> > > > > 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?
> It means running control commands, nothing to do with the data traffic.

OK, I just wondered why I should need multiple processes being able to
run commands.

> > > > 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.
> Oh, yeah, this could be due to the implicit MBIM close run by mbimcli
> after each command, unless you tell mbimcli not to do so. If you look
> at the mbim-network sources you'll see the --no-close and
> --no-open=TRID balancing to avoid this.
> I believe you won't have these issues as soon as you run with the
> mbim-proxy, because the proxy takes care of that, if I'm not mistaken.
> Could  you retry your testing using the proxy? i.e. add PROXY=yes in
> the mbim-network profile, and then issue all your manual mbimcli
> commands with the additional "-p" option.

I tried mbim-proxy, and this message reaches you via the cellular network.

With using the proxy, I was able to retrieve the IP information (IP,
Gateway, DNS, MTU) by running

$ mbimcli -p -d /dev/cdc-wdm0 --query-ip-configuration

which I implemented manually after having shut down the WiFi connection, using:

$ ip address add <IP>/<CIDR suffix> broadcast + dev <DEV>


$ ip route add default via <IP> dev <DEV>

For the moment, I've set the DNS addresses manually in
`/etc/resolv.conf` (while no other link was connected).

I tried using `dhcpcd` on the network device prior to this manual
approach, but running `dhcpcd` failed by time-out.

The MTU setting recommended by the `--query-ip-configuration` run
(1500) was already in place:

$ cat /sys/class/net/<DEV>/mtu

After having configured the system with these steps, my cellular
internet connection turned out functional.

The output of `$ mbimcli -p -d /dev/cdc-wdm0 --get-signal-state`
however I don't understand:

[/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'

This is the only question left unanswered.

> You could also run ModemManager to avoid needing all these low level
> setup and tricks... :) I know a lot of people use mbim-network and
> qmi-network, but these are too simple, they don't scale well.

I'd like to do the low-level plumbing a few times until I feel
acquainted with the way things actually are run.

However, I agree that it is a little tedious. Maybe I should have a
look at the ModemManager effort.

Thanks a lot for having helped me out so much. There are a couple of
hints I probably never would have been able to substitute by studying
the matter on my own.

Until later,

More information about the libqmi-devel mailing list