summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-27uqmi: add explicit check for message type when expecting a responseHEADmasterTautvydas Belgeras
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>
2018-05-24uqmi_add_command: fixed command argument assignmentCarlo Lobrano
The char *arg passed to uqmi_add_command was not assigned to cmd[idx].arg. Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>
2016-12-19uqmi: Change returned value to QMI_CMD_REQUEST for 'sync' command.Nickolay Ledovskikh
QMI_CMD_DONE is not working properly with 'sync' command. We must use QMI_CMD_REQUEST. Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
2016-12-09uqmi: Add sync command to release all cids.Nickolay Ledovskikh
Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> [add command line help]
2016-11-22mbim: fix memory corruption issuesFelix Fietkau
Use a common buffer that has enough headroom for the MBIM header. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-21nas: fix network scanMatti Laakso
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
2016-11-21wds: add option for specifying profile indexMatti Laakso
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>
2016-11-21wds: make APN optionalMatti Laakso
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>
2016-11-21wds: add a separate --set-ip-family optionMatti Laakso
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>
2016-11-21wds: fix set-autoconnect help textMatti Laakso
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
2016-11-04uim: add missing extra data for UIM PIN verify requestFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-04add UIM verify pin commandsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-04enable uim message functionsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-04data: update qmi-service-uim.json from libqmi gitFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-24uqmi: fix big endian bugs in MBIM codeBjørn Mork
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>
2016-08-23dms: add "Set FCC Authentication" requestBjørn Mork
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>
2016-08-23uqmi: add support for MBIM devices with QMI serviceBjørn Mork
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]
2015-11-22build: Support for out of source builds addedoldBachtin, Dmitri
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>
2015-11-22build: added _library suffix to lib variablesBachtin, Dmitri
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.
2015-11-22uqmi: search for ubox, blobmsg_json and json include pathsBachtin, Dmitri
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.
2015-11-22wds: cast pdp_type enum to int to avoid clang considering the range check ↵Felix Fietkau
tautological enum overflow behavior is undefined Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-11-22wds: make ipv6 address endian swap more portableFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-09-11uqmi: Added CMake option BUILD_STATIC for a static uqmi buildBachtin, Dmitri
Signed-off-by: Dmitri Bachtin <dbachtin@init-ka.de>
2015-08-13uqmi: Add get-current-settings command-line switchAntti Seppälä
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>
2015-08-13uqmi: Add IP family selection command-line switchAntti Seppälä
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>
2015-05-12add missing license headers (LGPL v2)Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-04-14Add command to get IMEI from the deviceFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-01-18Add command to specify preferred PLMNSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2015-01-09Add command for listing device capabilitiesSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2015-01-08Add missing option for getting tdma signal strengthSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-22Fix encoding phone number on sending smsSławomir Demeszko
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>
2014-12-22Making smsc number optionalSławomir Demeszko
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>
2014-12-22Fix improper length of sms message stored in User Data Length fieldSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-22Fix logical expression which is always trueSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-18Add mandatory field to Initiate Network RegisterSławomir Demeszko
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>
2014-12-18Fix improper characters after reading Escape code for switching extension ↵Sławomir Demeszko
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>
2014-12-18Added commands to change PIN codeSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-18Added shared struct to allow the same option names for different functionsSławomir Demeszko
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>
2014-12-18Added option for enabling and disabling protection of simcard by PINSławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-18Add support for 16-bit reference number in concatenated SMS.Sławomir Demeszko
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-12Fix character "@" added at end of received messagesSławomir Demeszko
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>
2014-12-12Added support for 8 bit and 16 bit encoded SMS messagesSławomir Demeszko
Message is presented as string of hexadecimal pairs in JSON output. Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-12Separation of decoding User Data Header from decoding 7 bit messageSławomir Demeszko
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>
2014-12-02Add --delete-message for deleting SMS messagesSławomir Demeszko
Signed-off-by: Sławomir Demeszko <s.demeszko@wireless-instruments.com>
2014-12-01SEGFAULT on reading Unicode sms messagesSławomir Demeszko
Added complementary blobmsg_close_table() before returning from function on error.
2014-11-25add wda commands for setting/getting wireless data modeFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-25suppress enum conversion warningsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-19fix indentationFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-18Fix improper part number in multipart SMS text messagesSławomir Demeszko
Received multipart SMS messages has part number always one too high.
2014-11-18Add command --get-msisdn for getting phone numberSławomir Demeszko