Running MobileInsight on the Desktops

Besides the mobile version, we also offer the desktop version for MobileInsight. MobileInsight currently supports Linux/macOS/Windows.

Step 1: Download and Install

Prerequisites

  1. Install Python 3.

  2. Install the following Python libraries:

    pip install pyserial crcmod xmltodict
    
  3. To run MobileInsight-core GUI, install wxPython and matplotlib.

Install mobileinsight-core

Download mobileinsight-core source code here, and follow the below instructions to install it:

cd mobileinsight-core
./install-macos.sh # macOS and OS X
./install-ubuntu.sh # Ubuntu and Debian

Alternatively, you can download all-in-one container from our GitHub and install it by following the instructions here.

Now, you are ready to run three main functions on the desktop: (a) use GUI for offline view and analysis, (b) run online monitoring and analysis, and (c) run scripts to perform analysis you define. .. Let $PATH-TO-CORE=/path/to/mobileinsight-core/.

Step 2: Use GUI for offline view and analysis

MobileInsight provides a user-friendly, platform-independent GUI to analyze your log files which are collected by MobileInsight app (download from here). It currently supports MobileInsight *.mi2log and Qualcomm *.qmdl logs. To run it:

mi-gui

You will see the GUI below. Then you can load the logs and perform filtering and analysis.

_images/mobileinsight-gui.png

Step 3: Run online monitoring and analysis

MobileInsight also supports collecting runtime cellular logs when you connect the phone to the desktop machine.

Step 3a: Configure the Phone connection to the Desktop

There are three steps:

  1. Enable the diagnostic mode on the phone. Note that this procedure is phone-specific. Here are a collection of instructions on differnet phone models.

  2. Connect the phone to the desktop machine with the USB cable. For some phones, you may need othe USB drivers should be installed.

  3. Figure out the COM port for the phone’s diagnostic mode, which would be used for monitoring the network (see examples here).

    • On Linux: the usbserial module should be loaded first. After connecting the device to the laptop, first run lsusb to get phone’s vendor and product hex code (Samsung in the following example):

      # lsusb
      Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 001 Device 003: ID 04e8:681c Samsung Electronics Co., Ltd
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      

      Then load usbserial as follows:

      modprobe usbserial vendor=0x04e8 product=0x681c
      

      Typically the serial port would be listed, typically as /dev/ttyUSBX (X=0,1,2,…).

    • On macOS: the new devices can be found in /dev/tty.X. For example, for Samsung series, the corresponding port is typically /dev/tty.SAMSUNG_VSP. Some phone models require installing the corresponding usb drivers first.

    For some phones, there may be more than one port listed. You may try each port to test if it generates diagnostic logs.

Step 3b: Run monitor/analysis script on the desktop

We offer an example code in <path-to-mobileinsight>/examples/monitor-example.py to support online monitoring. Assuming the phone’s port is /dev/tty.X, and the baudrate is 9600), we run it:

python monitor-example.py /dev/tty.X 9600

If successful, it will save cellular logs to monitor-example.mi2log in the same directory, and dump the messages on screen in the following format (press Ctrl-C to stop the monitoring):

1435219131.01 [INFO] WCDMA_RRC_Serv_Cell_Info
<dm_log_packet>
        <pair key="type_id">WCDMA_RRC_Serv_Cell_Info</pair>
        <pair key="timestamp">2015-06-28 23:37:59.130003</pair>
        <pair key="Uplink RF channel number">9763</pair>
        <pair key="Download RF channel number">10713</pair>
        <pair key="Cell ID">42602391</pair>
        <pair key="UTRA registration area (overlapping URAs)">11</pair>
        <pair key="Allowed Call Access">0</pair>
        <pair key="PSC">3504</pair>
        <pair key="PLMN">460-0115</pair>
        <pair key="LAC">46345</pair>
        <pair key="RAC">1</pair>
</dm_log_packet>
1435219131.76 [INFO] WCDMA_RRC_OTA_Packet
...
1435219135.51 [INFO] LTE_RRC_OTA_Packet
...

Step 4. Run customized analysis tasks

In MobileInsight, cellular network monitoring/analysis codes are written in Python. We provide some example scripts in <path-to-mobileinsight>/examples and you can define your own analysis tasks on demand. The tutorial to run more examples can be found here.

Next Step

Now you have learnt how to use MobileInsight Desktop, you can read more topics:

  1. Read the tutorials.

  2. Learn how to write your own code on the desktop.