Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on MotoG5s Plus #68

Open
r00tb3 opened this issue Dec 27, 2019 · 2 comments
Open

Not working on MotoG5s Plus #68

r00tb3 opened this issue Dec 27, 2019 · 2 comments

Comments

@r00tb3
Copy link

r00tb3 commented Dec 27, 2019

Versions

  • OS: Ubuntu-18.04.1
  • Python version: 2.7.15
  • Python installation method: ubuntu repo

Description

I'm trying to decode and NAS messages over LTE using lte-nas-layer-example.py from the examples directory but no output on the terminal.

Code and Logs

                                  Python code for the same...

#!/usr/bin/python
# Filename: lte-measurement-example
import os
import sys

# Import MobileInsight modules
from mobile_insight.analyzer import *
from mobile_insight.monitor import OnlineMonitor

"""
This example shows how to LTE EMM/ESM layer information with LteNasAnalyzer
"""

if __name__ == "__main__":

    if len(sys.argv) < 3:
        print "Error: please specify physical port name and baudrate."
        print __file__, "SERIAL_PORT_NAME BAUNRATE"
        sys.exit(1)

    # Initialize a DM monitor
    src = OnlineMonitor()
    src.set_serial_port(sys.argv[1])  # the serial port to collect the traces
    src.set_baudrate(int(sys.argv[2]))  # the baudrate of the port

    dumper = MsgLogger()
    dumper.set_source(src)
    dumper.set_decoding(MsgLogger.XML)  # decode the message as xml

    nas_analyzer = LteNasAnalyzer()
    nas_analyzer.set_source(src)

    # save the analysis result. All analyzers share the same output file.
    dumper.set_log("nas-analyzer-example.txt")
    nas_analyzer.set_log("nas-analyzer-example.txt")

    # Start the monitoring
    src.run()
                        
                        Shell log from the terminal.

sudo python lte-nas-layer-example.py /dev/ttyUSB0 115200
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_ESM_OTA_Incoming_Packet
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_ESM_OTA_Outgoing_Packet
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_EMM_OTA_Incoming_Packet
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_EMM_OTA_Outgoing_Packet
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_EMM_State
[INFO] [OnlineMonitor]: Enable collection: LTE_NAS_ESM_State
PHY COM: /dev/ttyUSB0
PHY BAUD RATE: 115200

What am I doing wrong?

@moonsky219 pls help me solve this issue.

Regards.

@r00tb3 r00tb3 changed the title Decode SIB's & NAS messages. Not working on MotoG5s Plus Dec 27, 2019
@moonsky219
Copy link
Member

Please try to enable more messages or turn on/off airplane mode to trigger NAS messages. If neither helps, it could be related the device not support such way. You can try the MobileInsight app directly to collect traces.

@r00tb3
Copy link
Author

r00tb3 commented Dec 27, 2019

@moonsky219 Thanks for the response.

Please try to enable more messages or turn on/off airplane mode to trigger NAS messages.

I have tried that but nothing works, the thing is when I connect my smartphone to my laptop and put it on charging mode in developers option I'm able to see ttyUSB0 and after hitting the python script nothing happens.

When I switch to Mass Storage in dev options I'm not able to detect ttyUSB0 and the device's internal storage is mounted in this condition I'm unable to listen to ttyUSB0.

I've tried listening to DIAG messages using QCSuper it works like charm and I always get superuser access granted with QCSuper as it is able to listen to /dev/diag but could not accomplish some tasks as I could not decode asn1 messages manually over the terminal, I had to rely on Wireshark for decoding the messages.

If neither helps, it could be related to the device not support such way. You can try the MobileInsight app directly to collect traces.

I've tried the android app too but I'll have to reprogram the app for my needs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants