Professional Documents
Culture Documents
Gsmdecode is used to decode the gsm messages from the gammu trace log and a Noki
a DCT3 mobile phone. Nokia used a simple remote logging facility for debugging t
heir DCT3 firmwares remotely, but apparently forgot to remove this when going in
to production. So you can enable it back with a special software described below
.
'''Hardware needed'''
* mobile phone Nokia 3310 (900/1800mhz) or 3390 (1900mhz)
* [http://www.cellphoneshop.net/usbdatcabfor.html F-BUS and M2BUS Auto switchin
g cable]
[[Image(nokia3310_nk-33.png)]]
'''Software needed'''
In Linux (for instance Ubuntu) we need to install gammu (from console):
{{{
sudo apt-get install gammu
sudo apt-get install dialog
}}}
Then we need to setup gammu:
{{{
gammu-config
}}}
Sometimes gammu-config doesn't work correctly and switches ''model'' and ''conne
ction'', so we must edit ~/.gammurc file:
{{{
nano ~/.gammurc
}}}
File must have the following content:
{{{
[gammu]
port = /dev/ttyS0
model = 6110
connection = mbus
synchronizetime = yes
logfile =
logformat = nothing
use_locking = yes
gammuloc =
}}}
Then we create subdirectory for data files...
{{{
mkdir ~/GSM
cd ~/GSM
}}}
...and either download and install Wireshark 1.1.2 or later [http://www.wireshar
k.org]
...or alternatively use gsmdecode; download source code of [http://wiki.thc.org/
gsm#head-bc727181581bac3b29b29f33fb1e14150ba12b82 gsmdecode-0.7bis.tar.gz] ([att
achment:gsmdecode-0.7bis.tar.gz direct download here]), extract it and compile i
t:
{{{
cd gsmdecode-0.7bis/
sudo apt-get install gcc g++ cpp gpp make automake
./configure
make all
}}}
According to THC wiki, ''gsmdecode'' has:
* SIM Toolkit support
* Concatenated SMS supported (e.g. sms longer than 140 octets).
* Service request support (e.g. *#100# requests).
* Other layer 3 support (long (23+ octet) RR messages, ...)
Now we need file ''nhm5_587.txt'' which helps us decode trace types and save it
to GSM subdirectory. File was found here:
* [http://arch.cihar.com/michal@cihar.com--2004-main/gammu--upstream--0/patch-2
9/gammu--upstream--0--patch-29.patches.tar.gz arch.cihar.com in tar.gz datafile]
* we need toopen datafile and find the following directory: /gammu upstream 0 patch-2
9.patches/new-files-archive/gammu/depend/dct3trac/
* there is a file ''nhm5_587.txt'', which needs to be saved into GSM subdirecto
ry.
However, you cah simply download file here:
* [attachment:nhm5_587.txt nhm5_587.txt]
'''How to connect the hardware'''
We need to open Nokia mobile phone, take out the battery, insert SIM card, inser
t battery into cable and then connect cable to the mobile phone.
The other part of the cable should be connected to computer (COM port - /dev/tty
S0), or we use USB to serial converter for instance USB-serial DB09 Aten (then w
e have emulated serial port under Linux - /dev/ttyUSB0).
Now we can switch on the mobile phone and start recording trace log.
[[Image(nokia_connect.png)]]
'''Possible bugs'''
1) The 3390b was not supported in gammu until today. The nokiadebug command woul
d quit without an error. [https://bugs.cihar.com/view.php?id=982 See this bug]
2) I'm currently receiving a segmentation fault (gammu 1.25.92) after making pho
ne calls. If I add a "break;" after case 0x22 and case 0x23 in gammu/depend/noki
a/dct3trac/wmx.c it is possible to prevent the crash from happening. It seems to
be related to decoding SIM commands. [https://bugs.cihar.com/view.php?id=983 He
re is the bug report]
'''Sample traces'''
''See sample traces in XML format in an attachments below. Sample traces are fro
m old website.''
* [attachment:call_1525.xml call_1525.xml] - mobile phone called the number 152
5 and stayed connected for 2-3 seconds. The xml file contains uplink and downlin
k traffic as sniffed by default DCT3 tracer.
* [attachment:call_init.xml call_init.xml] - call init
* [attachment:sms.xml sms.xml] - SMS trace log
* [attachment:sms2.xml sms2.xml] - SMS containing "abc"
* [http://wiki.thc.org/gsm/debugtrace other traces] - from old webpage