Skip to content
Snippets Groups Projects

Draft: Implement initial functionality

Closed Martin Matějek requested to merge dev into master
@@ -192,6 +192,14 @@ class WWanCmd(BaseCmdLine):
just whether SIM card is 'working' or not.
"""
try:
# There are two utilities to fetch information from QMI modem - 'qmicli' and 'uqmi'.
# 'qmicli' is more recent and it looks like it is actively
# maintained, but at the moment it can produce only text output.
# 'uqmi' is older and it could get stuck while trying to fetch SIM
# state informations on certain modems. But it produces json output.
#
# Therefore I decided to go with 'uqmi' and set timeout for its
# process, in case it gets stuck.
stdout, _ = WWanCmd._run_command_and_check_retval(
["/sbin/uqmi", "-d", ctl_device, "--uim-get-sim-state"],
expected_retval=0, timeout=20