Using qmicli with a Sierra Wireless EM7455
Aleksander Morgado
aleksander at aleksander.es
Mon Jun 22 07:25:19 UTC 2020
Hey,
>
> This is about getting a Sierra Wireless EM7455 Qualcomm Snapdragon X7
> LTE-A modem connected to the cellular network.
>
> The modem came together with the Lenovo T470p it is built into. I am
> using current Arch Linux.
>
What kernel version are you using? Being it Arch Linux, I would assume
it's newer than 4.5, but we should confirm that first. EM7455 requires
raw-ip support in the kernel, so the kernel must be newer than 4.5.
Also, what libqmi version are you using?
> My resources for the proceeding I am reporting about here are: I
> started out at [1]
> https://wiki.archlinux.org/index.php/ThinkPad_mobile_Internet. I then
> tried to follow step-by-step the commands in the script mentioned in
> [1]: [2] https://github.com/penguin2716/qmi_setup. Googling for my
> error message I ended up with during following [2] led me to [3]
> https://lists.freedesktop.org/archives/libqmi-devel/2017-March/002193.html
> and [4] https://bugzilla.redhat.com/show_bug.cgi?id=1379406. After
> this the libqmi-devel mailing list came to my attention, so I am
> asking now here for advice. I am not using any front-end tool; I would
> like to use qmicli and qmi-network directly.
>
Could you please let us know what your error message is? Please don't
make me click all those links to try to guess what your issue is ;)
> Normally I am figuring out things like this on my own, and I skimmed
> through the Google results for EM7455 with
> `site:lists.freedesktop.org` carefully, but I couldn't find a definite
> answer for my problems. I noticed that at least the majority of the
> Google results mentioned are messages sent to
> modemmanager-devel at lists.freedesktop.org, but since I am intending to
> get along without frontends aside of, say, `qmi-network`, I am turning
> to the libqmi-devel list here.
>
> This is with kernel modules `qmi-wwan` and `qcserial` loaded properly;
> the `$ modprobe qmi-wwan` step resulted in Journal output (the other
> modprobe call went along silently):
>
> Jun 19 14:56:16 T470p kernel: usbcore: registered new interface driver qmi_wwan
>
> Here is the checklist I extracted from [2] to connect (all commands to
> be run as root):
>
> $ ifconfig <dev> up
You shouldn't do this. You should better not ifup the network
interface until after the network has been started, because otherwise
it may not allow you to change the net interface to raw-ip in the
kernel.
> $ qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode online
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.
> $ qmi-network /dev/cdc-wdm0 start
> $ <start dhcpcd>
>
> I am running into trouble in the second command. I tried to ignore the
> problem and ran the third command, which also failed.
>
> The call of `qmicli` in the abovementioned list failed with:
>
> error: couldn't set operating mode: QMI protocol error (60): 'InvalidTransition'
>
> I then inspected `$ qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode`:
>
> [/dev/cdc-wdm0] Operating mode retrieved:
> Mode: 'low-power'
> Reason: 'unknown'
> HW restricted: 'no'
>
Ok, if the modem was in low-power mode and it didn't allow you to put
it into online mode, please run:
$ sudo qmicli -d /dev/cdc-wdm0 --dms-set-fcc-authentication
> I tried to set the operation mode to 'offline' and then to 'reset',
> which made me end up in the 'low-power' mode again, with quite a lot
> of output in the Journal which I am omitting here. Notice that the
> 'reset' step resulted in output:
>
> [/dev/cdc-wdm0] Operating mode set successfully
> error: couldn't close: Transaction timed out
>
> while the transition to 'offline' emitted:
>
> [/dev/cdc-wdm0] Operating mode set successfully
>
> In the desperate situation I found myself in I attempted to run `$
> qmi-network /dev/cdc-wdm0 start` even though the device wasn't in the
> 'online' mode. This resulted in output:
>
Nah, don't even try that.
> 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.
The problem getting online is legit though, you may still need the
qmicli --dms-set-fcc-authentication run BEFORE mbimcli
--set-radio-state=on.
> Expected link layer protocol not retrieved: kernel unsupported
> Updating device link layer protocol with 'qmicli -d /dev/cdc-wdm0
> --wda-set-data-format=802-3 '...
> New device link layer protocol retrieved: raw-ip
> Starting network with 'qmicli -d /dev/cdc-wdm0
> --wds-start-network=apn='internet.telekom',username='telekom',password='telekom'
> --client-no-release-cid '...
> error: couldn't start network: QMI protocol error (14): 'CallFailed'
> call end reason (12): (null)
> verbose call end reason (0,0): [(null)] (null)
> Saving state at /tmp/qmi-network-state-cdc-wdm0... (CID: 51)
> error: network start failed, no packet data handle
> error: couldn't release client: QMI protocol error (7): 'InvalidClientId'
> Clearing state at /tmp/qmi-network-state-cdc-wdm0...
>
> which I am providing here mostly for completeness.
>
> The APN settings are correct. I succeeded to connect the modem in
> Windows 10 on the same machine with the APN settings as given in the
> log.
>
> During these hours I spent searching for keywords related to my
> problem I quite often ran across the following options to `qmicli`:
> `--device-open-mbim` and `--dms-set-fcc-authentication`. I am guessing
> that these might help since the former might be needed to talk to the
> EM7455 while the latter one might be used during authentication with
> the network. However, I don't feel confident enough to try any of
> these without having checked back with someone more knowledgeable than
> me about this things.
>
please switch to using the MBIM tools and see if you get more success
on your testing :)
--
Aleksander
https://aleksander.es
More information about the libqmi-devel
mailing list