User Tools

Site Tools


project:sdr:tetra:howto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
project:sdr:tetra:howto [2016/08/28 08:16] – created jendaproject:sdr:tetra:howto [2018/10/22 23:49] (current) – [Requirements] update requisite to gcc8 jenda
Line 8: Line 8:
  
 {{ :project:sdr:tetra:tetra.png?direct&300 |}} {{ :project:sdr:tetra:tetra.png?direct&300 |}}
 +
 +<note important>We suspect there is a bug in airspy_rx with sample format 0. After several minutes, it sends us a NaN. The workaround (if you want to use Airspy) is to use osmosdr-input from [[:user:jenda:kukuruku]].</note>
  
 ===== Requirements ===== ===== Requirements =====
Line 20: Line 22:
  
   * gnuradio   * gnuradio
-  * lib32gcc-6-dev libc6-dev:i386 (or similar depending on GCC version and architecture)+  * lib32gcc-8-dev libc6-dev:i386 (or similar depending on GCC version and architecture)
   * libtalloc-dev libpcsclite-dev realpath   * libtalloc-dev libpcsclite-dev realpath
   * tshark   * tshark
Line 37: Line 39:
 ===== Building ===== ===== Building =====
  
-Install jcc from blobutils to your %%$%%PATH and run build.sh to get gr-pack and gr-unpack; get them to your %%$%%PATH too.+Install jcf from blobutils to your %%$%%PATH and run build.sh to get gr-pack and gr-unpack; get them to your %%$%%PATH too.
  
-Install libosmocore (autoreconf -i && ./configure && make && make install).+Install libosmocore-dev package (Ubuntu 16.10+, Debian 9+) or build libosmocore by hand (autoreconf -i && ./configure --disable-pcsc && make && make install).
  
 Build tetra-listener (instructions are in README). Build tetra-listener (instructions are in README).
Line 54: Line 56:
  
 ===== Setup ===== ===== Setup =====
 +
 +Recommended:
 +<code>ip6tables -A INPUT -p UDP --dport 4729 -j DROP
 +iptables -A INPUT -p UDP --dport 4729 -j DROP
 +</code>
  
 Calibrate your SDR and edit PPMs in tetra-run.sh. Calibrate your SDR and edit PPMs in tetra-run.sh.
Line 61: Line 68:
 If you have different samplerate than 1.8M, edit -n and -s parameters of FCL and of course the samplerate parameter of fir.py. If you have different samplerate than 1.8M, edit -n and -s parameters of FCL and of course the samplerate parameter of fir.py.
  
-If samplerate of your SDR is not an integer multiple of 36000 (2*channel symbol rate), use the nearest lower step. If the difference is too big (where "too big" probably means something like 100 Hz), it won't work. Tweaking the Omega parameter of MPSK demodulator should help as this parameter sets the initial value of the resampler (not testedthough).+If samplerate of your SDR is not an integer multiple of 36000 (2*channel symbol rate), use the nearest lower step. If the difference is too big (where "too big" probably means something like 100 Hz), it won't work. Tweaking the Omega parameter of [[http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__receiver__cc.html#aa7336fd30a9b2d50d051c2867a87c841|MPSK demodulator]] helps. E.g. when using airspy with 2.5MHz rateset step to 69 and omega to (2500000)/69/18000 = 2.0129.
  
 If you have relatively slow CPU, you may want to run FCL in multiple threads. Edit the -t parameter. If you have relatively slow CPU, you may want to run FCL in multiple threads. Edit the -t parameter.
Line 67: Line 74:
 Run it and use gethisto FCL command (echo gethisto | nc localhost 3333) to get sane gain settings. Run it and use gethisto FCL command (echo gethisto | nc localhost 3333) to get sane gain settings.
  
-Use getpwr command to get channel power and sort the results (echo getpwr | nc localhost 3333 | sort -nk 2). A better approach would be to oversample the spectrum reading by 4 and take only the 2 middle bins.+You can use this oneliner to get the list of 20 strongest channels: 
 +<code> 
 +echo getpwr | nc localhost 3333 | while read line; do n=`echo $line | cut -d " " -f 1`; if [ $(( ( $n - 1 ) % 3 )) -eq 0 ]; then echo $(( ($n - 1) / 3)) `echo $line | cut -d " " -f 2`; fi;done | LANG=C sort -nk 2 | tail -n 20 | cut -d " " -f 1 | tr "\n"
 +</code>
  
 Edit enabled channels in tetra-run.sh so they match your channels with the strongest power. Do not enable more than 30 channels per SDR (or change the offset in tetra2.py:128). Edit enabled channels in tetra-run.sh so they match your channels with the strongest power. Do not enable more than 30 channels per SDR (or change the offset in tetra2.py:128).
Line 75: Line 85:
 You can change the loglevel of sds-parser.py in tetra-run.sh to DBG. You can change the loglevel of sds-parser.py in tetra-run.sh to DBG.
  
-If you now run tetra-run.sh, it should work. SDSs should be seen and recordings should pile up in tetra-rec. The number in the filename after the timestamp is the timeslot, "o" is the channel and "i" is the SSI (group ID). The SSI is not always correctly recognized because the sniffer does not handle the FDM multiplex correctly.+If you now run tetra-run.sh, it should work. You should see some GSMTAP traffic on localhost:udp/4729. SDSs should be seen and recordings should pile up in tetra-rec. The number in the filename after the timestamp is the timeslot, "o" is the channel and "i" is the SSI (group ID). The SSI is not always correctly recognized because the sniffer does not handle the FDM multiplex correctly.
  
 Use cdp to play these files. Or play the OGG files with any audio player. Use cdp to play these files. Or play the OGG files with any audio player.
Line 82: Line 92:
  
 It can be useful to check after a day or so which channels produce audio data (ls|grep bz2|cut -d "o" -f 2|cut -d "." -f 1|sort -n | uniq -c) and change the ones that do not for some new channels. It can be useful to check after a day or so which channels produce audio data (ls|grep bz2|cut -d "o" -f 2|cut -d "." -f 1|sort -n | uniq -c) and change the ones that do not for some new channels.
 +
 +You may want to add ".timeout 5000" to your ~/.sqliterc.
project/sdr/tetra/howto.1472372161.txt.gz · Last modified: 2016/08/28 08:16 by jenda