# SPDX-License-Identifier: LicenseRef-SierraWireless-Proprietary
# SPDX-FileCopyrightText: 2026 Sierra Wireless, Inc.
1. Description
==============

fw-crash-info (the application) is a tool application/utility that retrieves firmware crash dump information 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

2.3 Build "pkgs"
See readme.txt under "pkgs" folder


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

  All actively shipping products based on Qualcomm chipsets.


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

  $cd tools/fw-crash-info/
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.

Note on armv7l platforms (e.g. Raspberry Pi as reference):
  - Build via release/scripts: Use bin/fw-crash-inforpi (pre-built from MBPL package).
  - Local build (make without CPU=): Produces bin/fw-crash-infohostarmv7l. Use this
    binary when building manually on an armv7l host. "make clean" removes it
    (intended behavior). Run "make" to regenerate.

To build with more debug information in out, use "debug=1" option.  For example,
  $make debug=1

Note: fw-crash-info is built with PIE (Position Independent Executable) enabled by default. 
To build with it disabled, run the make with "NOPIE=1".

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

None of the command line options are mandatory.  The program can detect the modem and interface automatically.

To check available user command options:
./bin/<appName> -h (or --help)
  Where appName is the CPU specific target binary.

App usage: 

  fw-crash-info [[[-m|-q] [-d <QMI/MBIM device path>]]|[-r]] [-o filename] [-V] [-h]

  -d  --device <QMI/MBIM device path>
        Specifies the QMI or the MBIM device path

  -q  --qmi
        Use direct QMUX interface (QMI over PCIe, or RmNet over USB)

  -m  --mbim
        Use MBIM interface (Over PCIe, or MBIM over USB)

  -r  --router
        Use QMUX Router

  -Q  --qrtr
        Use Qualcomm IPC Router.

  -o  --output <filename>
        Path and name of the file Firmware Crash Info is saved to
        If not specified, default to "FwCrashInfo_xxx.log", where xxx is the timestamp when the log is saved

  -V  --version
        Show version information

  -h  --help
        This option prints the usage instructions


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

Automatic mode (default)
  sudo ./fw-crash-infohostx86_64

Router mode (qmux-router is required to be running)
  ./fw-crash-infohostx86_64 -r

MBIM mode
  sudo ./fw-crash-infohostx86_64 -m

QMI mode
  sudo ./fw-crash-infohostx86_64 -q
