aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli
Commit message (Collapse)AuthorAgeFilesLines
* qmicli,wds: only need to initialize enum member fields in structAleksander Morgado2017-03-221-8/+3
| | | | | | | | When doing member initializations when the struct variable is declared, only initialize the enum fields to valid enum values, the remaining fields will be initialized to zero. This is a different approach to the fix done in 4c678418.
* wds: added WDS Bind Mux Data Port messageCarlo Lobrano2017-02-282-0/+161
| | | | | | | | | | | | | | This message is used to bind a muxed data port to a controller device. The Muxed data port has to be managed by qmi_wwan driver. The Muxed data port is identified by: - mux_id: the numeric ID given to qmi_wwan once created - interface number: the interface number of the qmi controller device on the modem Once the binding is completed, all the commands sent (and I expect also received, but I could not test it) using the same Client ID are for the binded data port instead of the real one.
* wda: extended wda set format message to enable QMUXCarlo Lobrano2017-02-283-12/+272
| | | | | | | | | | | | | | | | | | | | | | Added the following configurable values: - upload datagram protocol - download datagram protocol - download datagram max size - download max datagrams - endpoint type - endpoint interface number According to last GobiNet from CodeAura project, it is necessary to set the following values to enable multiple data connection through one controller device: - upload datagram protocol = QMAP - download datagram protocol = QMAP - download datagram max size = 32 (it seems working even without setting it) - download max datagrams = 32768 (it seems working even without setting it) - endpoint type = HSUSB (it seems working even without setting it) - endpoint interface number = this depends on the modem, but it seems working even without setting it
* qmicli,helpers: make sure flags are reset before parsing the stringAleksander Morgado2017-02-151-0/+4
| | | | | | | We OR each flag value found in the output directly, so make sure that output is clear before adding any new flag. Reported-by: Paul Gildea <gildeap@tcd.ie>
* qmicli: add support for --nas-get-operator-nameDan Williams2017-02-144-1/+418
|
* qmicli,uim: split SIM power on/off operations in two separate actionsAleksander Morgado2017-02-131-54/+61
| | | | | The actions map to different QMI messages, and we try to keep one action per QMI message.
* uim: added SIM power on/off functionalityKasper Holtze2017-02-131-0/+153
|
* build: update copyright yearsAleksander Morgado2017-02-1013-14/+14
|
* qmicli: by default close before exitingAleksander Morgado2017-02-091-1/+16
| | | | | Otherwise the MBIM channel will be kept open and the next MBIM commands won't succeed.
* qmicli: support automatic mode (QMI/MBIM) detection by defaultAleksander Morgado2017-02-081-1/+18
| | | | | | | | The default, if nothing specified, is the 'auto mode', which can also be explicitly selected with --device-open-auto. The user may also select an explicit mode with --device-open-mbim or --device-open-qmi.
* glib: remove invocations of g_type_init()Ben Chan2017-02-031-2/+0
| | | | | | | g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by libqmi is 2.36, calling g_type_init() isn't necessarily in the libqmi code.
* qmicli,dms: fix enum cast in qmicli_read_hp_device_mode_from_stringBen Chan2017-02-031-1/+1
|
* dms: disable all HP device modes that we're not so sure aboutAleksander Morgado2017-01-291-1/+1
| | | | We just leave 'fastboot', which is the one required for firmware update.
* dms: new 'SWI Get Current Firmware'Aleksander Morgado2017-01-291-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | This is a vendor-specific message with id 0x5556. E.g. for a Dell DW5570: [/dev/cdc-wdm1] Successfully retrieved current firmware: Model: MC8805 Boot version: SWI9X15C_01.08.16.02 r15159 carmd-fwbuild1 2013/05/16 17:41:33 AMSS version: SWI9X15C_01.08.16.02 r15159 carmd-fwbuild1 2013/05/16 17:41:33 SKU ID: 1101798 Package ID: 1101798_9902617_SWI9X15C_01.08.16.02_00_Dell_001.005_000 Carrier ID: 12 Config version: unknown And for a MC7455: [/dev/cdc-wdm1] Successfully retrieved current firmware: Model: MC7455 Boot version: SWI9X30C_02.14.03.00 AMSS version: SWI9X30C_02.14.03.00 SKU ID: 1102476 Package ID: unknown Carrier ID: 202 Config version: 000.008_000
* qmicli: allow skipping CID release after successful operationAleksander Morgado2017-01-2911-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | E.g. if the command requested will end up power cycling the device and therefore not even supporting the cid release operation, as in the "HP Change Device Mode" command. [22 ene 2017, 18:42:23] [Debug] [/dev/cdc-wdm1] sent generic request (translated)... <<<<<< QMUX: <<<<<< length = 16 <<<<<< flags = 0x00 <<<<<< service = "ctl" <<<<<< client = 0 <<<<<< QMI: <<<<<< flags = "none" <<<<<< transaction = 2 <<<<<< tlv_length = 5 <<<<<< message = "Release CID" (0x0023) <<<<<< TLV: <<<<<< type = "Release Info" (0x01) <<<<<< length = 2 <<<<<< value = 02:02 <<<<<< translated = [ service = 'dms' cid = '2' ] [22 ene 2017, 18:42:23] [Debug] [/dev/cdc-wdm1] sending message as MBIM... error: couldn't release client: MBIM error: Transaction timed out
* dms: renamed DMS 0x5556 to 'HP Change Device Mode'Aleksander Morgado2017-01-293-33/+56
| | | | | | | | Also, define a new QmiDmsHpDeviceMode enumeration with the modes found out of the HPlt4120. Note this command is flagged as 'HP' because it only applies to HP devices, at least only to the HPlt4120.
* qmicli: enable MBIM logs and traces if MBIM_QMUX enabledAleksander Morgado2017-01-292-0/+13
|
* qmicli,dms: define VALIDATE_UNKNOWN just onceAleksander Morgado2017-01-231-30/+3
|
* qmicli: add missing EOL when printing error message releasing CIDAleksander Morgado2017-01-231-1/+1
|
* qmicli,dms: fix typos and poorly formated text messagesAleksander Morgado2017-01-191-2/+2
|
* dms: add support for 'Set firmware id'Aleksander Morgado2017-01-161-0/+48
| | | | | | This command is the one used by Sierra modems to get into Boot & Hold mode, and very likely has a set of TLVs that we don't know about. For now, just an empty message.
* qmicli,dms: new '--dms-get-software-version' operationAleksander Morgado2017-01-161-0/+52
|
* qmicli,dms: implement '--dms-get|set-boot-image-download-mode'Aleksander Morgado2017-01-163-0/+156
|
* qmicli: use G_SOURCE_CONTINUE to reset the unix signal handlerAleksander Morgado2016-11-301-7/+6
|
* qmicli,helpers: fix uninitialized variablesAleksander Morgado2016-11-281-2/+2
|
* qmicli,helpers: more strict approach validating the unique id stringAleksander Morgado2016-11-281-4/+27
| | | | | | | | | We don't want e.g. an array that has some printable ASCII bytes, then NUL bytes and then some more printable ASCII bytes. We require a totally valid ASCII string, suffixed with NUL bytes if the string is shorter than 16 bytes. Plus, we avoid g_str_is_ascii(), which is only available in GLib 2.40.0.
* qmicli,dms: firmware image unique id seems to be ASCIIAleksander Morgado2016-11-283-6/+31
| | | | But just in case leave the raw-hex printable string fallback if it isn't.
* qmicli,dms: implement --dms-get-firmware-preferenceAleksander Morgado2016-11-281-0/+75
|
* qmicli,dms: error if missing fields in --dms-set-firmware-preferenceAleksander Morgado2016-11-281-0/+5
|
* qmicli,dms: improve output when setting firmware preferenceAleksander Morgado2016-11-281-28/+38
|
* qmicli,dms: plug memleaks when setting firmware preferenceAleksander Morgado2016-11-281-23/+44
| | | | Not a big deal, because qmicli exits after the operation, but anyway.
* qmicli: use g_clear_object() to cleanup cancellable after async operationAleksander Morgado2016-11-251-4/+2
|
* qmicli: use g_unix_signal_add() to setup signalsAleksander Morgado2016-11-251-15/+17
| | | | So that we can safely call GLib/GIO functions from within the signal handlers.
* qmicli: fix second ctrl+c handling in qmicliAleksander Morgado2016-11-251-1/+1
| | | | | A single ctrl+c cancels the GCancellable, and the second ctrl+c should have stopped the GMainLoop, but that was never happening.
* qmicli,pdc: print ongoing messages instead of debugAleksander Morgado2016-11-231-2/+2
|
* qmicli,pdc: use correct identifier to print gsizeAleksander Morgado2016-11-231-1/+1
| | | | | | qmicli-pdc.c: In function 'load_config_input_create_chunk': qmicli-pdc.c:1022:14: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'gsize {aka unsigned int}' [-Werror=format=] g_debug ("Uploaded %lu of %lu\n", config_file->offset, full_size);
* qmicli: avoid converting to dB invalid SINR valuesAleksander Morgado2016-11-171-16/+46
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=92106
* pdc: minor fixes in qmicli loggingAliaksandr Barouski2016-10-261-6/+4
|
* pdc: use NOT_PROVISIONED to detect 'no configs'Aliaksandr Barouski2016-10-261-1/+2
| | | | | changed logic a bit to support situation when there is no config activated. In this case indication generated with error NOT_PROVISIONED.
* pdc: 2s of timeout to wait for configs listAleksander Morgado2016-10-261-0/+26
| | | | | | There won't be any indication if no configs are available. Based on a patch from Aliaksandr Barouski <alex.borovsky@gmail.com>.
* qmicli: minor fix in comment textAleksander Morgado2016-10-261-1/+1
|
* qmicli,pdc: refactor coding style and fix invalid freesAleksander Morgado2016-10-261-515/+423
| | | | | Mostly coding style fixes, although the patch also fixes several allocation issues when freeing GSlices.
* qmicli: remove unused helpersAleksander Morgado2016-10-262-50/+0
|
* qmicli: refactor qmicli_read_binary_array_from_string() helperAleksander Morgado2016-10-262-27/+77
| | | | | | The original implementation actually had some bugs when freeing the output array in error conditions. Also, use g_ascii_xdigit_value() instead of custom conversions.
* pdc: new PDC service implementationAliaksandr Barouski2016-10-266-0/+1539
| | | | Added calls for configure hp4120 LTE modem
* dms: new 'Change Device Download Mode' commandAleksander Morgado2016-10-241-0/+79
| | | | | | Based on a patch from Aliaksandr Barouski <alex.borovsky@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=96465
* qmicli/nas: add --nas-get-rf-band-infoDan Williams2016-10-111-0/+73
|
* wds: add Go Dormant, Go Active, and Get Dormancy StatusDan Williams2016-10-061-0/+149
|
* qmicli: fix handling of unspecified ip_type in --wds-start-networkDan Williams2016-10-051-1/+1
| | | | | | | | QMI_WDS_IP_FAMILY_UNSPECIFIED = 8 but ip_type gets initialized to 0, so the "IP Family Preference" was always being sent with an unrecognized value. Fixes: 81c21379 qmicli: add support for IP type to --wds-start-networ
* qmicli,dms: report offline reason for LOW_POWER mode tooDan Williams2016-09-261-1/+1
| | | | | If the device cannot exit low-power mode it sometimes reports a reason, like pri-image-misconfiguration.