summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2016-07-20 11:37:45 -0500
committerDan Williams <dcbw@redhat.com>2016-07-20 11:40:42 -0500
commit803caab80a8aea7bcdb846aa2b61cdd0bf794360 (patch)
tree9b73bf17aed8c571d6d00485f19da55d4d10c786
parentf137268ce12daaf56b79e508d6cba5e543feac36 (diff)
downloadModemManager-803caab80a8aea7bcdb846aa2b61cdd0bf794360.tar.gz
libqcdm: add HDR Pilot Sets V2 log item structures
Apparently I was looking at this in 2012: https://blogs.gnome.org/dcbw/2012/11/14/got-evdo-help-me-out/ So why not at least get the structures into libqcdm and figure out a rough correlation between pilot energy and EC/IO.
-rw-r--r--libqcdm/src/log-items.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/libqcdm/src/log-items.h b/libqcdm/src/log-items.h
index 6a0a9ab5c..71f0f1e08 100644
--- a/libqcdm/src/log-items.h
+++ b/libqcdm/src/log-items.h
@@ -90,6 +90,56 @@ struct DMLogItemCdmaReversePowerControl {
} __attribute__ ((packed));
typedef struct DMLogItemCdmaReversePowerControl DMLogItemCdmaReversePowerControl;
+/* DM_LOG_ITEM_EVDO_PILOT_SETS_V2 */
+struct EvdoPilotSetsV2PilotRecord {
+ u_int16_t pilot_pn;
+ /* HDR pilot energy doesn't appear to be in the same units as 1x pilot
+ * energy (eg, -0.5 dBm increments). Instead, you can approximate EC/IO
+ * by using this formula empirically derived from simultaneous AT!ECIO
+ * and HDR Pilot Sets V2 results from a Sierra modem:
+ *
+ * EC/IO = (pilot_energy / -50) + 1
+ */
+ u_int16_t pilot_energy;
+ union {
+ struct {
+ u_int16_t mac_index;
+ u_int8_t unknown1;
+ u_int8_t unknown2;
+ u_int16_t window_center;
+ } Active;
+ struct {
+ u_int16_t channel_number;
+ u_int8_t unknown1;
+ u_int8_t unknown2;
+ u_int16_t window_center;
+ } Candidate;
+ struct {
+ u_int16_t channel_number;
+ u_int16_t window_center;
+ u_int8_t unknown1; // Offset?
+ u_int8_t unknown2; // Age?
+ } Remaining;
+ };
+} __attribute__ ((packed));
+typedef struct EvdoPilotSetsV2PilotRecord EvdoPilotSetsV2PilotRecord;
+
+/* DM_LOG_ITEM_EVDO_PILOT_SETS_V2 */
+struct DMLogItemEvdoPilotSetsV2 {
+ u_int8_t pn_offset;
+ u_int8_t active_set_count;
+ u_int8_t active_set_window;
+ u_int16_t active_set_channel;
+ u_int8_t unknown1;
+ u_int8_t candidate_set_count;
+ u_int8_t candidate_set_window;
+ u_int8_t remaining_set_count;
+ u_int8_t remaining_set_window;
+ u_int8_t unknown2;
+
+ EvdoPilotSetsV2PilotRecord records[];
+} __attribute__ ((packed));
+typedef struct DMLogItemEvdoPilotSetsV2 DMLogItemEvdoPilotSetsV2;
/* DM_LOG_ITEM_WCDMA_TA_FINGER_INFO */
struct DMLogItemWcdmaTaFingerInfo {