[Gta04-owner] Modem logs

Denis 'GNUtoo' Carikli GNUtoo at no-log.org
Mon Nov 5 18:21:57 CET 2012


Hi,

I found a way to get the modem logs:

Open an ssh shell and do:
serial_forward -n /dev/ttyHS_Diagnostic -p 8022 -t raw

hg clone https://code.google.com/p/qcombbdbg/

Apply that patch:
$ hg diff
diff -r b47921522aaf scripts/diagtaskclient.rb
--- a/scripts/diagtaskclient.rb	Thu Aug 16 00:59:05 2012 +0200
+++ b/scripts/diagtaskclient.rb	Mon Nov 05 18:18:22 2012 +0100
@@ -25,6 +25,7 @@
 
 require 'fcntl'
 require 'hexdump'
+require 'net/telnet'
 
 module CRC
   
@@ -283,8 +284,13 @@
   attr_accessor :asynchronous
 
   def initialize(tty, logger = STDERR)
-    fd = IO::sysopen(tty, Fcntl::O_RDWR | Fcntl::O_NOCTTY |
Fcntl::O_NONBLOCK)
-    @tty = IO.open(fd)
+    if tty == "telnet" 
+      @tty = Net::Telnet::new("Host" => "192.168.7.2","Port" => 8022,
"Binmode" =>true, "Telnetmode" => false)
+    else
+      fd = IO::sysopen(tty, Fcntl::O_RDWR | Fcntl::O_NOCTTY |
Fcntl::O_NONBLOCK)
+      @tty = IO.open(fd)
+    end
+
     @logger = logger
     @asynchronous = false
     @force_sync = true
@@ -293,7 +299,7 @@
     #  raise DiagTaskClientError, "Cannot switch to diagnostic mode"
     #end
 
-    flush_input
+#    flush_input
   end
 
   def enter_full_sync_mode
diff -r b47921522aaf scripts/tools/dbgupload.rb
--- a/scripts/tools/dbgupload.rb	Thu Aug 16 00:59:05 2012 +0200
+++ b/scripts/tools/dbgupload.rb	Mon Nov 05 18:18:22 2012 +0100
@@ -34,7 +34,7 @@
 DEBUGGER_PATH = "../../src/qcombbdbg"
 
 TTY = ARGV[0] || '/dev/ttyHS2'
-abort "Cannot find TTY device #{TTY}, exiting." unless File.exists? TTY
+abort "Cannot find TTY device #{TTY}, exiting." unless File.exists?
TTY or TTY == "telnet" 
 @diag = DiagTaskClient.new(TTY)
 
@@ -69,7 +69,8 @@
 # Get firmware version
 #
 STDERR.print "[*] Querying firmware revision... "
-version = @diag.get_extended_build_id[:mob_sw_rev]
+version = "2.5.13Hd"
+#version = @diag.get_extended_build_id[:mob_sw_rev]
 STDERR.puts "Found #{version}"
 
 unless DEVICE_OFFSETS.include?(version)
diff -r b47921522aaf src/preloader/Makefile
--- a/src/preloader/Makefile	Thu Aug 16 00:59:05 2012 +0200
+++ b/src/preloader/Makefile	Mon Nov 05 18:18:22 2012 +0100
@@ -1,5 +1,5 @@
 TARGET=preloader
-PREFIX=arm-unknown-linux-gnueabi
+PREFIX=arm-oe-linux-gnueabi
 AS:=$(PREFIX)-as
 CC:=$(PREFIX)-gcc
 ifdef GCC_VERSION
diff -r b47921522aaf src/qcombbdbg/Makefile
--- a/src/qcombbdbg/Makefile	Thu Aug 16 00:59:05 2012 +0200
+++ b/src/qcombbdbg/Makefile	Mon Nov 05 18:18:22 2012 +0100
@@ -1,5 +1,5 @@
 TARGET=qcombbdbg
-PREFIX=arm-unknown-linux-gnueabi
+PREFIX=arm-oe-linux-gnueabi-
 AS:=$(PREFIX)-as
 CC:=$(PREFIX)-gcc
 ifdef GCC_VERSION

cd scripts/tools/
./show_msm_messages.rb telnet

And you'll see the modem logs...

It may help in debugging modem issues.

PS: SHR lacks ruby so that's why I used telnet...

Denis.


More information about the Gta04-owner mailing list