1. Description
==============

dm-logger (the application) is a utility that collect firmware logs from Sierra Wireless Modems based on Qualcomm chipsets.  


2. Prerequisities
=================

The application should only be used with drivers included in MBPL release packages.  It does not work with GobiNet and GobiSerial drivers distributed with legacy SLQS packages.

2.1 PCIe driver
The mhictrl driver should be used for SDX55 based modems in PCIe mode. The modem should be recognized as /dev/mhixxx modems which can be listed via command "ls /dev/mhi*".

2.2 USB driver
The following drivers should be used for modems in USB mode: 
- Network Driver: Open Source cdc_mbim driver (for the MBIM interface) or the qmi_wwan driver (included in the MBPL release packages for the RmNet interface)
- Serial Driver: Open Source qcserial driver (included in MBPL release packages)

Please note that GobiNet and GobiSerial drivers (if installed) should be removed or blacklisted from host system before launching the application.  These drivers were distributed with older SLQS releases and are no longer supported.

To blacklist Gobixxx drivers, add the following entries to "/etc/modprobe.d/blacklist-modem.conf" file and restart the Linux platform:

blacklist GobiNet
blacklist GobiSerial


3. Supported Modems
====================

  - Based on SDX55, Ex: EM9190/EM9191/EM7690, etc.
  - Based on 9X50,  Ex: EM7565/EM7511/EM74X1, etc.
  - Based on 9X30,  Ex: EM7455/EM7430, etc.
  - Based on 9X15,  Ex: EM7355/EM7305, etc.
  - Based on 9X07,  Ex: WP76xx


4. Build Instructions
=====================

  $cd tools/dm-logger/
For x86_64
  $make clean
  $make
For ARM64linaro
  $make clean CPU=arm64linaro
  $make CPU=arm64linaro
For ARM64
  $make clean CPU=arm64
  $make CPU=arm64
For Raspberry Pi ARM
  $make clean CPU=rpi
  $make CPU=rpi

The binaries should be built under the bin folder.


5. Command Options
==================

./<appName> -p port [-c config] [-s stop] [-o output] [-q] [-mf max_file_size] [-ml max_log_size] [-t connect_time_delay] [-r retries] [-i retry_interval] [-v|-d] [-V] [-h]

   -p port: device (e.g.: "/dev/ttyUSB1")
   -c config: configuration file - cfg or sqf format only
   -s stop: stop logging command sequence file - cfg or sqf format only
   -o output: log file name - default is "DmLogger.qmdl" if not specified
   -q: Retrieve QShrink database
   -mf max_file_size: maximum log file size - default is 2GB if not specified
   -ml max_log_size: maximum total log size - default is 2GB if not specified
   -t connect_time_delay: time delay after connect (in microsecond), default is 5
   -r retries: number fo retries writing to DM port, default is 500
   -i retry_interval: interval between retries writing to DM port (in microsecond), default is 1000
   -v: Enable verbose output information
   -d: Enable debug output, verbose is also turned on
   -V: Show version information
   -h: Show help information


6. Examples
===========

$sudo ./dm-loggerhostx86_64 -p /dev/mhitty0 -c filters/default_qxdm_plus_5G_v3.cfg -o log.qmdl -q


7. Notes, exceptions, etc.
==========================

1. Prior to Execution

Enter the following AT commands:
  at!entercnd="A710"
  at!custom="QXDMLOGENABLE", 1

2. Filter files

The following filter files are included:

  default_plus_rf.cfg
  default_qxdm_plus_5G_v3.cfg
  GNSS_Gen9_General_Sierra.cfg
  MBIM_QBI_QMI_debug_filter.cfg
  smart_transmit_logmask_v1.cfg
  thermal_debug_filter.cfg
  throughput_logmask.cfg

