Tetra decoding

Status
Not open for further replies.

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
Ok thank you
What would result?
As i said all files are recorded and present,( i'm almost certain)
the issue may come from enconding by tetrad

i'm not so sure. looks like more of a permissions problem

tetrad works like this:

1. find all files in /tetra/in that are older than 2 minutes

for each file: {

2. move the file to /tetra/out/YYYYMMDD/FILENAME.out

3. uncompress acelp, compress this into ogg

4. remove all files except the ogg file

}

5. wait 1 minute


this mechanism works without any error checking (bad, i know, but this was only a quick hack, left it because it's very reliable anyway, i can change it if you want).

before looking at problems in tetrad i would look into the system:


- is this a standard installation? (debian 8 and everything installed via install_telive.sh), or is there something non-standard about it?

- maybe you're running this as root? (deadly unix sin, you should run the software as a normal user and not abuse root, this can also cause permissions problems later)

- maybe your filesystem ran out of free space (or free inodes) at some point?

- maybe something else was done with the script? (killed because of low memory etc)


if it is none of these, then do this experiment: don't run tetrad, let some recordings accumulate, and make a copy of /tetra/in. after this launch tetrad. if you find an .out file that will not be processed by it, then please send it to me (maybe it causes a segfault of the acelp decoder)
 

FR3500

Member
Joined
Aug 3, 2012
Messages
58
Reaction score
0
Location
France
if it is none of these, then do this experiment: don't run tetrad, let some recordings accumulate, and make a copy of /tetra/in. after this launch tetrad. if you find an .out file that will not be processed by it, then please send it to me (maybe it causes a segfault of the acelp decoder)

OK thanks for your time;
Actually i did exactly that, i let run the program for 1 hour, it recorded 62 files;
then i ran tetrad to endode to ogg; about 30" total encoding time:
the result was only 1 file missing (61)

I'm on ubuntu 14, will try soon Debian;
just wondering why tetrad runs perfectly, but very few errors ...
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
OK thanks for your time;
Actually i did exactly that, i let run the program for 1 hour, it recorded 62 files;
then i ran tetrad to endode to ogg; about 30" total encoding time:
the result was only 1 file missing (61)

do you have the out file that was missed by tetrad? (if so, please send it to me)

I'm on ubuntu 14, will try soon Debian;
just wondering why tetrad runs perfectly, but very few errors ...

i have no idea too. it should either work 100% or 0%. the only reason might be a segfault in cdecoder or sdecoder (i assume that sox and oggenc work correctly), maybe you could look at your kernel logs (/var/log/kern.log and other files in /var/log), it should be logged there.
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
If two files are created within that minute for the same participants. Wouldn't that result in the filename being the same thus being overwritten?

the files are named traffic_IDX.out (with IDX=3-63, this are the traffic usage markers), which are later renamed to a file which has also has the IDX in the name. even if you had 2 files with the same SSIs in the filename (unlikely but possible), this would differ by the IDX, (this is without having a deeper look at the code, i may be wrong)
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
atariman, did you try using the automatic install script?

ls -al /tetra returns nothing?
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
see if these are pipes:
ls -al /tmp/fifo*

what parameter did you pass to receiver1? this determines the pipe name (if the parameter is 1, then it uses /tmp/fifo1)
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
I am not lucky :(. All is ok but i don't have audio files in /tetra/in ou out folder. The codecs are ok, i hear "HELLO TETRA" with the filetest.acelp but no files in OUT and IN folders. In the Xterm i do SHIFT+R for recording, but there"s nothing append.

do you have any unencrypted voice traffic on your network?

if there is voice traffic and you have record:1 on the screen, and there are no permissions problems (telive can write to /tetra/in), then it should work. you can disable mutessi and see if this helps (if there is no SSI information about the voice traffic)
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
Now it's ok : I put all write and acces permissions to folder TETRA / IN / OUT and now i hear the voices

that's strange, because you shouldn't have to do this, the install script takes care of all permissions


and the files traffic are or in the IN folder. Thanks for your help.

launch tetrad to recompress them into ogg files for later listening (see the docs)
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
i've commited a small change to the install_telive.sh script, which should work around recent errors when instaling on Ubuntu 14 and distros derived from it (Linux Mint 17.3 and others)

the problem was that the software needs modern gnuradio, and under ubuntu 14 this is provided by external repositories, which can stop working (because their authors lost interest etc). this fix changes repos.

there is also the option to skip codec install (see the script comments).

if anyone tries this, i would be grateful for info if it does/doesn't work and bugreports


of course the preferred distribution is still debian 8, the rest is supported on an ad-hoc basis
 
Last edited:

martufello

Member
Joined
Jun 29, 2004
Messages
61
Reaction score
22
Ubunt14.04.2 with preinstalled gnuradio 3.7.7.1 live iso USB working well

Ubunt14.04.3 with preinstalled gnuradio 3.7.9.1 live iso USB not ok

Gnuradio is starting and I can see tetra signals but I have following messages:

<<< Welcome to GNU Radio Companion 3.7.9.1 >>>

Preferences file: /home/ubuntu/.gnuradio/grc.conf
Block paths:
/usr/local/share/gnuradio/grc/blocks
/home/ubuntu/.grc_gnuradio

Loading: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37_udp.grc"
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.002-13-g97d338d2

RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
>>> Done
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)

Showing: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37_udp.grc"

Loading: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37.grc"
>>> Done

Showing: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37.grc"

Generating: '/home/ubuntu/tetra/telive/gnuradio-companion/top_block.py'

Executing: /usr/bin/python2 -u /home/ubuntu/tetra/telive/gnuradio-companion/top_block.py

linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.002-13-g97d338d2

Using Volk machine: avx2_64_mmx
gr-osmosdr v0.1.4-67-gac15e789 (0.1.5git) gnuradio 3.7.9.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Detached kernel driver
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 2000000.052982 Hz
[R82XX] PLL not locked!
gr::log :INFO: controlport - Apache Thrift: -h ubuntu -p 9090

Receiver1 not logging and after stopping I have following message:
ubuntu@ubuntu:~$ cd ~/tetra/osmo-tetra-sq5bpf/src
ubuntu@ubuntu:~/tetra/osmo-tetra-sq5bpf/src$ ./receiver1
^C/tmp/fifo: Interrupted system call
Traceback (most recent call last):
File "demod/python-3.7/simdemod2.py", line 78, in <module>
tb = top_block()
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
thanks for the report.

you're using telive_1ch_simple_gr37_udp.grc, so the data is sent via udp, but you're using receiver1, which uses a fifo.

either use telive_1ch_simple_gr37_udp.grc and ./receiver1udp 1 (in whichever order)

or use telive_1ch_simple_gr37.grc and ./receiver1 1 (in this case first start receiver1 and then the grc flowgraph)
 

martufello

Member
Joined
Jun 29, 2004
Messages
61
Reaction score
22
My bad, I've mixed the 2 procedures, tomorrow I will test again.
BTW I like a lot the UDP alternative, well done !
 

martufello

Member
Joined
Jun 29, 2004
Messages
61
Reaction score
22
here we go, this with fifo procedure

ubuntu@ubuntu:~$ gnuradio-companion
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
RuntimeError('fsm::fsm(const char *name): file open error\n',)
<<< Welcome to GNU Radio Companion 3.7.9.1 >>>

Preferences file: /home/ubuntu/.gnuradio/grc.conf
Block paths:
/usr/local/share/gnuradio/grc/blocks
/home/ubuntu/.grc_gnuradio

Loading: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37.grc"
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.002-13-g97d338d2

>>> Done

Showing: "/home/ubuntu/tetra/telive/gnuradio-companion/telive_1ch_simple_gr37.grc"

Generating: '/home/ubuntu/tetra/telive/gnuradio-companion/top_block.py'

Executing: /usr/bin/python2 -u /home/ubuntu/tetra/telive/gnuradio-companion/top_block.py

linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.002-13-g97d338d2

Using Volk machine: avx2_64_mmx
gr-osmosdr v0.1.4-67-gac15e789 (0.1.5git) gnuradio 3.7.9.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 2000000.052982 Hz
[R82XX] PLL not locked!
gr::log :INFO: controlport - Apache Thrift: -h ubuntu -p 9090
thread[thread-per-block[4]: <block file_sink (29)>]: file_sink write failed with error 23

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
>>> Done
^CTraceback (most recent call last):
File "/usr/local/bin/gnuradio-companion", line 130, in <module>
main()
File "/usr/local/bin/gnuradio-companion", line 126, in main
ActionHandler(args, Platform())
File "/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py", line 78, in __init__
gtk.main()
KeyboardInterrupt


receiver1

ubuntu@ubuntu:~/tetra/osmo-tetra-sq5bpf/src$ ./receiver1 1
Thrift: Thu Mar 10 14:38:38 2016 TServerSocket::listen() BIND 9090
terminate called after throwing an instance of 'apache::thrift::transport::TTransportException'
what(): Could not bind: Transport endpoint is not connected
ubuntu@ubuntu:~/tetra/osmo-tetra-sq5bpf/src$
 

martufello

Member
Joined
Jun 29, 2004
Messages
61
Reaction score
22
Mint 17.3 live iso USB is also perfect !
Only need to uncheck CDROM from the update
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
Mint 17.3 live iso USB is also perfect !

yes, i've just tried to do a system on mint 17.3, and it doesn't seem to work that bad, even though it's not the recommended debian 8 (this is for a small project i hope to release soon)

btw did you get it working on ubuntu? the messages from apache thrift are strange
 

martufello

Member
Joined
Jun 29, 2004
Messages
61
Reaction score
22
Not with Ubunt14.04.3 and preinstalled gnuradio 3.7.9.1
Then I've formated this USB and tested with Mint.

But Ubunt14.04.2 with gnuradio 3.7.7.1 is working fine, I like this version because has a lot of other radio programs already installed.
Mint instead is my preferred in terms of linux OS
I've also tried Debian, but with live iso USB I had some problems and stopped the test
 

FR3500

Member
Joined
Aug 3, 2012
Messages
58
Reaction score
0
Location
France
Hello to all

I was just wondering if the program can be installed on a tablet ?
Which would give more mobility, and longer battery life when out of home

I'm thinking about windows surface, or acer, asus ...etc

Thanks
 

sq5bpf

Member
Joined
Jan 23, 2014
Messages
517
Reaction score
12
I was just wondering if the program can be installed on a tablet ?

you can do it if you can install linux on a tablet, or can run a virtual machine (on a tablet with an intel processor).

but you won't be able to do in on a standard android tablet. there is a project to have gnuradio running on android, so this may change in the future
 
Status
Not open for further replies.
Top