User Tools

Site Tools


project:sdr:tetra:sniffutils

Tetra sniffutils

You can find useful scripts in the sniff-utils directory.

cdp

cdp is a MPlayer wrapper that adds support for ACELP in the .cdata.bz2 format.

Usage: cdp list_of_filenames.cdata.bz2

cdpp

cdpp is a cdp wrapper that automatically plays files in current directory (and flags the ones that were played). Minimum file size can be given (default is 10k) to skip short uninteresting transmissions.

Usage: cdpp [minimum file size in kB]

dedup.sh

dedup.sh removes duplicate recordings from different BTSs. Currently two files are regarded to be “duplicate” if:

  • they were recorded less than 2 seconds apart AND
  • more than 90 % of traffic frames are the same.

Usage: dedup.sh directory_you_want_to_purge

(the directory is the one that contains the .cdata.bz2 files)

retune.sh

retune.sh checks on which channels there was no traffic in the last 4 days. It then replaces these channels with other channels that have the best signal.

Example:

$ bash retune.sh localhost 3333 21,22,20,28,41,27,6,25,9,40 0
Obtaining list of sniffed data frames, this may take a while...
FDMA scan... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100%...
21 (chan id 0) is OK
22 (chan id 1) is OK
20 (chan id 2) is OK
28 (chan id 3) is OK
41 (chan id 4) is OK
27 (chan id 5) is not OK
21 has good SNR, but we are already sniffing it
41 has good SNR, but we are already sniffing it
20 has good SNR, but we are already sniffing it
28 has good SNR, but we are already sniffing it
25 has good SNR, but we are already sniffing it
6 has good SNR, but we are already sniffing it
40 has good SNR, but we are already sniffing it
chosen 51 instead.
6 (chan id 6) is OK
25 (chan id 7) is OK
9 (chan id 8) is not OK
chosen 58 instead.
40 (chan id 9) is OK
Old FCL string: 21,22,20,28,41,27,6,25,9,40
New FCL string: 21,22,20,28,41,51,6,25,58,40

The last parameter, demodulator offset, should be 30 for your second SDR (tetra2.py). (yes, we know that this is a terrible hack)

run.sh

run.sh spawns a screen with tetra-run.sh. You can for example add it to your /etc/rc.local.

tetra-run.sh

tetra-run.sh spawns all the fun! Check Tetra sniffer HOWTO to see how to set it up!

tetra-monitor.sh

tetra-monitor.sh checks if any file has been recorded in the last 20 minutes.

If not, it automatically restarts the sniffer and sends an e-mail.

It is to be run from cron, for example with the following command:

15,20,30,40,50,59 *   *  *   *    ~/tetra-monitor.sh > /dev/null 2> /dev/null
project/sdr/tetra/sniffutils.txt · Last modified: 2016/12/26 05:35 by jenda