summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-09-26dms: implement "Get Firmware Preference" request/responseAleksander Morgado
2012-09-26qmi-codegen: don't issue the array element clear function on 'Input' arraysAleksander Morgado
When an array is required to be passed in an input TLV, the user who created it is responsible for freeing it. Therefore, we should not dump the static array element clear function in these cases, or these unused methods will end up breaking the compilation.
2012-09-26libqmi-glib,tests: new tests to check parsing valid/invalid QMI messagesAleksander Morgado
2012-09-26message: document the sectionAleksander Morgado
2012-09-26message: `QmiMessage' objects are always validAleksander Morgado
We make sure that every `QmiMessage' object out there is valid according to our now internal message_check(). Therefore, it's pointless to run the validity checks in getters, so remove those.
2012-09-26message: the `QmiMessage' is now a `GByteArray'Aleksander Morgado
Why have our own ref-counted byte array when we can use the default glib one?
2012-09-26message: use a modifiable `GByteArray' in `qmi_message_new_from_raw ()'Aleksander Morgado
Passing a modifiable `GByteArray' allows us to run the validity check as soon as we create the `QmiMessage', given that we can remove the read chunk of data from the input buffer directly. This removal takes place both when the QMI message is valid and invalid.
2012-09-26message: improve header readabilityAleksander Morgado
2012-09-26message: cleanup `QmiMessage' content gettersAleksander Morgado
2012-09-26message: cleanup `QmiMessage' life cycle helpersAleksander Morgado
2012-09-26message: don't expose implementation helper methodsAleksander Morgado
Don't expose methods which aren't needed out of the QmiMessage implementation.
2012-09-26message: swapped buffer/length variables in `qmi_message_get_tlv_printable()'Aleksander Morgado
2012-09-26message: renamed `qmi_message_tlv_foreach()' to `qmi_message_foreach_raw_tlv()'Aleksander Morgado
2012-09-26message: renamed `qmi_message_tlv_add()' to `qmi_message_add_raw_tlv()'Aleksander Morgado
Also swapped length and buffer variables; it no longer follows the 'TLV' name (type,length,value), but it's more consistent with other interfaces where buffer is given first and then the length.
2012-09-26message: renamed `qmi_message_tlv_get()' to `qmi_message_get_raw_tlv()'Aleksander Morgado
Also made it return directly a pointer to the raw data buffer.
2012-09-26libqmi-glib,utils: use constant buffer pointer when reading variablesAleksander Morgado
The contents of the input buffer are never modified when reading variables from it, so better use a constant pointer in the methods doing it. What it does change is the pointer to the current position in the constant buffer.
2012-09-25libqmi-glib,tests: add suffixes to end of literalsShawn J. Goff
The compiler doesn't know the type of literals and may try to fit it into a slot that is too small. This adds suffixes to the long long and unsigned long long literals.
2012-09-24qmi-message: fix minimum size of buffer needed to read a QMI messageAleksander Morgado
The buffer must contain *at least* the initial 1-byte marker plus the length reported by the QMUX header. The minimum size check was wrong for 2 bytes, which could cause errors when trying to decode a message without all bytes. Can easily be triggered using 1 for the BUFFER_SIZE in QmiDevice.
2012-09-24dms: new 'unknown' operating modeAleksander Morgado
Modems seem to report 0xFF when the operating mode is unknown or if it cannot be retrieved.
2012-09-24dms: rename the 'resetting' operating mode to 'reset'Aleksander Morgado
This mode is not just used for notiying a transition, it can also be used to wake up the modem from an 'offline' state: $ sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=offline [/dev/cdc-wdm0] Operating mode set successfully $ sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode [/dev/cdc-wdm0] Operating mode retrieved: Mode: 'offline' Reason: 'unknown' HW restricted: 'no' $ sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=reset [/dev/cdc-wdm0] Operating mode set successfully $ sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode [/dev/cdc-wdm0] Operating mode retrieved: Mode: 'online' HW restricted: 'no'
2012-09-24qmi-codegen: fix error reporting when failed parsing JSONAleksander Morgado
If we get an error parsing a JSON file we really want to have the exact line number where the error happened, so don't just skip the comment lines and substitute them with an empty line instead so that the line numbers don't change.
2012-09-24qmi-codegen: ensure helper methods get always generatedAleksander Morgado
For those variables which are containers of other variables (struct, sequence and array), ensure we call `emit_helper_methods()' in order to generate variable specific dispose() helpers and such. This fixes the case of nested arrays of structs (arrays of structs with arrays of structs whithin).
2012-09-24use $PKG_CONFIGMike Frysinger
The build system sets up this variable for us, so use it rather than hardcoding "pkg-config" which might be the wrong one. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-09-19qmi-codegen: for strings, use 'size-prefix-format' instead of ↵Aleksander Morgado
'length-prefix-size' Use the new 'size-prefix-format' property to specify whether the length prefix variable is a 'guint8' or a 'guint16'. We therefore consolidate the way how this length prefix variable is specified in both arrays and strings. So, instead of: "length-prefix-size" : "16" We now just do: "size-prefix-format" : "guint16"
2012-09-19qmi-codegen: for arrays, use a new 'size-prefix-format' instead of 'array-size'Aleksander Morgado
The 'array-size' property was used to define an implicit variable to be found at the beginning of every array. This property expected a dictionary with one single 'format' key. Instead of this setup, create a new 'size-prefix-format' property which directly expects the format string of the variable to be used as array-length indicator. So, instead of: "array-size" : { "format" : "guint16" } We can now just use: "size-prefix-format" : "guint16" Also, remove the explicit size definitions when the format is "guint8", as that is the default already when none specified and the array is not of fixed size.
2012-09-19qmi-codegen: fix invalid `g_array_unref()' calls in generated codeAleksander Morgado
2012-09-18qmi-device: plug memleak, always need to free input containersAleksander Morgado
2012-09-18qmi-codegen: fix printable indicationsAleksander Morgado
2012-09-18qmi-codegen: fix memleak in generated codeAleksander Morgado
The contents of the containers were not being freed properly.
2012-09-18pds: NMEA string length is given as a 16 bit uint in the extended versionAleksander Morgado
This seems quite useless, as we know that the maximum NMEA trace length is 200 characters, but anyway.
2012-09-18pds: implement "Get/Set Auto Tracking State" requests/responsesAleksander Morgado
2012-09-18pds: implement "Get/Set GPS Service State" requests/responsesAleksander Morgado
2012-09-18pds: new TODO to include parsing all TLVs in the "Event Report" indicationAleksander Morgado
The GPS module can give us already processed information in addition to the raw NMEA traces, including GPS/UTC date, latitude/longitude, DOPs... Add a TODO task to process these additional TLVs, which will require changes in the codegen in order to handle single-precision and double-precision float number reading.
2012-09-18pds: start implementing "Event Report" indicationAleksander Morgado
Currently just some of the TLVs with the raw NMEA traces.
2012-09-18pds: implement "Set Event Report" request/responseAleksander Morgado
2012-09-18pds: setup generation of the PDS service supportAleksander Morgado
Including "PDS Reset".
2012-09-18libqmi-glib: include comment description for all known servicesAleksander Morgado
2012-09-18qmi-codegen: allow nesting arraysAleksander Morgado
2012-09-13device: rename variable 'link' to 'link_protocol'Ben Chan
This patch renames variable 'link' to 'link_protocol' in order to avoid collision with the 'link' symbol exported by unistd.h, which causes the following compilation error: qmi-device.c: In function 'process_open_flags': qmi-device.c:1513:32: error: declaration of 'link' shadows a global declaration [-Werror=shadow]
2012-09-12docs: clean more filesDan Williams
If the sections and types files aren't cleaned, adding a function to libqmi-glib, regenerating the docs, then removing that function doesn't regenerate the docs for some reason, meaning the scanner won't link due to the function-not-found error: docs/reference/libqmi-glib/libqmi-glib-sections.txt:qmi_wds_authentication_preference_get_type docs/reference/libqmi-glib/libqmi-glib.types:qmi_wds_authentication_preference_get_type docs/reference/libqmi-glib/libqmi-glib-scan.c:extern GType qmi_wds_authentication_preference_get_type (void); docs/reference/libqmi-glib/libqmi-glib-scan.c: object_types[i++] = qmi_wds_authentication_preference_get_type (); Make sure 'make clean' regenerates this stuff so we don't have link errors.
2012-09-08wds: remove `QmiWdsAuthenticationPreference'Aleksander Morgado
Use the more generic `QmiWdsAuthentication' flags instead, which match properly.
2012-09-08wds: implement "Get Current Settings" request/responseDan Williams
2012-09-08qmi-codegen: handle string arraysDan Williams
Like these: struct { uint8 num_instances; struct { uint8 length; char data[]; }; };
2012-09-08qmi-codegen: handle fixed-size arraysDan Williams
Like IPv6 addresses.
2012-09-08wds: Extended Technology Preference is a guint16Dan Williams
Not a guint8; flattened Gobi API says: enum eQMIWDSExtendedTechPrefs:UINT16 { ... } Plus the values are wrong, so fix that.
2012-09-08qmi-codegen: handle variable-sized string length prefix fieldsDan Williams
Most string lengths are UINT8, but some (WDS Get Current Settings PCSCF Domain Name List, for example) are UINT16.
2012-09-08ctl: implement Set Data Format commandDan Williams
2012-09-07wms: "Send From Memory Storage" only introduced in 1.2 it seemsAleksander Morgado
2012-09-06wms: 'Message ID' TLV is supposed to be mandatory, but it really may not beAleksander Morgado
See the following ModemManager logs: ModemManager[7942]: [/dev/cdc-wdm0] Sending message... <<<<<< QMUX: <<<<<< length = 47 <<<<<< flags = 0x00 <<<<<< service = "wms" <<<<<< client = 16 <<<<<< QMI: <<<<<< flags = "none" <<<<<< transaction = 16 <<<<<< tlv_length = 35 <<<<<< message = "Raw Send" (0x0020) <<<<<< TLV: <<<<<< type = "Raw Message Data" (0x01) <<<<<< length = 32 <<<<<< value = 06:1D:00:00:01:00:09:81:36:39:53:39:F6:00:00:12:C8:37:3B:0C:42:BE:D9:61:D0:30:2C:0F:8F:DF:EC:30 <<<<<< translated = [ format = '6' raw_data = '{ [0] = '0 ' [1] = '1 ' [2] = '0 ' [3] = '9 ' [4] = '129 ' [5] = '54 ' [6] = '57 ' [7] = '83 ' [8] = '57 ' [9] = '246 ' [10] = '0 ' [11] = '0 ' [12] = '18 ' [13] = '200 ' [14] = '55 ' [15] = '59 ' [16] = '12 ' [17] = '66 ' [18] = '190 ' [19] = '217 ' [20] = '97 ' [21] = '208 ' [22] = '48 ' [23] = '44 ' [24] = '15 ' [25] = '143 ' [26] = '223 ' [27] = '236 ' [28] = '48 '}' ] ModemManager[7942]: [/dev/cdc-wdm0] Received message... >>>>>> QMUX: >>>>>> length = 19 >>>>>> flags = 0x80 >>>>>> service = "wms" >>>>>> client = 16 >>>>>> QMI: >>>>>> flags = "response" >>>>>> transaction = 16 >>>>>> tlv_length = 7 >>>>>> message = "Raw Send" (0x0020) >>>>>> TLV: >>>>>> type = "Result" (0x02) >>>>>> length = 4 >>>>>> value = 00:00:00:00 >>>>>> translated = SUCCESS
2012-09-06wms: implement "Send From Memory Storage" request/responseAleksander Morgado