Age | Commit message (Collapse) | Author |
|
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
This command is needed in the qmi proto handler to check if the plmn
is already set to 'auto'.
The reason for this is, that setting the plmn to 'auto' will implicitly
lead to a (delayed) network re-registration, which could further lead
to some timing related issues in the qmi proto handler.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
|
|
Signed-off-by: Bjørn Mork <bjorn@mork.no>
cmake: no need for the json-c dependency
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
When the utility sends a request it expects a response type message,
but does not explicitly check for it. When a device stays idle for
some time, it switches into a sleep mode, and notifies the utility with an
identification type message. In some configurations the device only sends
this identification message when triggered by the utility, in this case by
the request message. What the utility gets is two messages at the same time -
an identification and a response. When it tries to decode former it obviously
fails, because it is not what it expected.
Signed-off-by: Tautvydas Belgeras <tautvydas.b@8devices.com>
|
|
The char *arg passed to uqmi_add_command was not assigned to cmd[idx].arg.
Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
|
|
QMI_CMD_DONE is not working properly with 'sync' command.
We must use QMI_CMD_REQUEST.
Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
|
|
Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [add command line help]
|
|
Use a common buffer that has enough headroom for the MBIM header.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Some modems require the specification of a profile index which
determines the APN and the IP family used for the connection.
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Some modem firmwares do not use the APN selected in the Start
Network command. Moreover, it is marked optional in the QMI
specification.
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Change the current ip-family option to set the IP Family Preference
TLV in the Start Network command, and add a separate set-ip-family
option for the Set IP Family command. This is done to match how
the autoconnect and set-autoconnect options work.
Older modems don't support the Set IP Family command, and they
should use the IP Family Preference TLV. On the other hand, newer
modems, e.g., from Huawei, don't respect that TLV, and require the
use of the separate Set IP Family command.
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
All MBIM integer fields are 32bit little endian. So we need to convert
then all on big endian systems.
Fixes: e69bf24b00d8 ("uqmi: add support for MBIM devices with QMI service")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
Many newer modems from Sierra Wireless includes a feature known as
"FCC Authentication". The basic idea is that the radio is kept in
low power mode until the driver has told the firmware that it is
OK to switch it on. This is done with a vendor specific QMI DMS
request with no input or output TLVs.
The "Set FCC Authentication" request is required for any modem with
the feature enabled. Which includes most newer Lenovo branded Sierra
Wireless modems based on Qualcomm chipsets, like for example the
EM7455.
Sample session with an EM7455 in MBIM mode and the FCC Authentication
feature enabled:
$ umbim -d /dev/cdc-wdm0 -n radio
hwradiostate: on
swradiostate: off
$ uqmi -m -d /dev/cdc-wdm0 --fcc-auth
$ umbim -d /dev/cdc-wdm0 -t 2 radio
hwradiostate: on
swradiostate: on
Signed-off-by: Bjørn Mork <bjorn@mork.no>
|
|
Many Qualcomm based devices offer a QMI service when running in MBIM
mode. This is useful for a number of requests which have no MBIM
counterpart.
This implementation is very basic, simply wrapping the QMI requests
in an MBIM command. It is up to the user to make sure that the MBIM
command sequence is valid, using a mix of umbim and uqmi requests.
umbim must be used to send "OPEN" before uqmi can issue any MBIM
requests. Example:
1. use umbim to open the session, using the '-n' option:
$ umbim -d /dev/cdc-wdm0 -n caps
devicetype: 0003 - remote
cellularclass: 0001
voiceclass: 0001 - no-voice
simclass: 0002
dataclass: 003C
smscaps: 0003
controlcaps: 0001
maxsessions: 0008
deviceid: 0145820007xxxxx
firmwareinfo: SWI9X30C_02.08.02.00
hardwareinfo: EM7455
2. use uqmi to send an MBIM request, using the '-m' option:
$ uqmi -m -d /dev/cdc-wdm0 --get-serving-system
{
"registration": "registered",
"plmn_mcc": 242,
"plmn_mnc": 1,
"plmn_description": "TELENOR",
"roaming": false
}
3. use umbim to close the open session, using the '-t X' option:
$ umbim -d /dev/cdc-wdm0 -t 2 caps
devicetype: 0003 - remote
cellularclass: 0001
voiceclass: 0001 - no-voice
simclass: 0002
dataclass: 003C
smscaps: 0003
controlcaps: 0001
maxsessions: 0008
deviceid: 0145820007xxxxx
firmwareinfo: SWI9X30C_02.08.02.00
hardwareinfo: EM7455
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup, portability fixes]
|
|
The scripts gen-{header,code,error-list}.pl were called with
source-local paths what disallowed out of source builds.
Updated CMakeLists.txt to call the scripts with ${CMAKE_SOURCE_DIR}
prefix.
Signed-off-by: Dmitri Bachtin <dbachtin@init-ka.de>
|
|
It is a convention under CMake to suffix variables in the FIND_LIBRARY
calls with _LIBRARY. Added _library suffix to json, blobmsg_json and
ubox variables.
|
|
CMake will search for include paths via FIND_PATH() of the following
libraries: libubox, blobmsg_json and json. This allows to build uqmi
when the dependencies are in non-standard locations by specifying
respective _include_dir variables.
|
|
tautological
enum overflow behavior is undefined
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Dmitri Bachtin <dbachtin@init-ka.de>
|
|
Adding --get-current-settings switch which can be used to query
ip-settings among some other useful data obtained from remote end when
connected.
This is mainly useful with modems which do not provide a dhcp server for
nameserver or ip-information (especially in ipv6 networks).
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Tested-by: Matti Laakso <malaakso@elisanet.fi>
|
|
This patch adds support for (optionally) specifying ip family via a
command- line switch. The switch sends respective "Set IP Family" WDS
message to qmi-device before actually connecting.
Using this switch allows connecting to ipv6 enabled networks or networks
with dual-stack support with the appropriate hardware (dongle and FW
with ipv6 support) and configuration (AT+CGDCONT reporting ipv6 or
ipv4v6 capability).
Help text:
--ip-family <family>: Set ip-family for the connection (ipv4, ipv6, unspecified)
Usage example for ipv6:
uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid> --start-network <apn> --ip-family ipv6
Dual-stack usage example:
uqmi -d /dev/cdc-wdm0 --get-client-id wds
uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid-1> --start-network <apn> --ip-family ipv4
uqmi -d /dev/cdc-wdm0 --get-client-id wds
uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid-2> --start-network <apn> --ip-family ipv6
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Tested-by: Matti Laakso <malaakso@elisanet.fi>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Return proper length of encoded phone number with odd count of digits,
without this patch number is encoded in memory but length returned
by function is not incremented and sms cannot be send.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
If smsc number is not provided before sending sms then
operator's default stored on simcard will be used.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
According to json data Action field in Initiate Network Register
is mandatory. I get "Missing argument" from qmi without it.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
table in SMS
Escape code 0x1b is a prefix indicating that next character should be
represented from extension table, but it only applies to one character,
so switching it off is needed to read further characters correctly.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
For example we can use one option --new-pin with commands unblock-pin
and with change-pin, without that we need to invent new name
for every new command.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
If 7 bit message encoded on 8 bit cells has one last bit occupying
whole byte it need to be padded with 7 zero bits. To not mistake
these last 7 bits with a character with code 0 (@) we need to check
length from User Data Length field and not rely on actual length
of received data. An example can be message "abcdefg" encoded
as "61 f1 98 5c 36 9f 01", it is decoded as "abcdefg@".
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Message is presented as string of hexadecimal pairs in JSON output.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
It is preparation for supporting 8 bit and 16 bit encoding. Moving out
this code from decode_7bit_field() allows to reuse it in caller
function where other than 7 bit decoding will take place.
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Signed-off-by: Sławomir Demeszko <s.demeszko@wireless-instruments.com>
|
|
Added complementary blobmsg_close_table() before returning from function
on error.
|