op25 - some problems

Status
Not open for further replies.
Joined
Jul 27, 2020
Messages
117
I am trying to listen to a single P25 frequency with -

rx.py --args 'rtl' -N 'LNA:47' -S 2500000 -x 2 -f 851.8875e6 -q 0 -U

with op25 osmocom on ubuntu 20.04 it works ok - with the boatbod version on ubuntu 18.04 it generates this error -

**********
Listening on 127.0.0.1:23456
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "./rx.py", line 924, in run
self.callback(msg)
File "./rx.py", line 934, in process_qmsg
if self.tb.process_qmsg(msg):
File "./rx.py", line 884, in process_qmsg
js = self.trunk_rx.to_json()
File "/home/dir/Documents/Archive/boatbod-op25/op25/op25/gr-op25_repeater/apps/trunking.py", line 1010, in to_json
d[nac]['top_line'] = 'NAC 0x%x %s' % (nac, d[nac]['top_line']) # prepend NAC which is not known by trunked_systems
TypeError: %x format: a number is required, not NoneType
***********
The program is hung and accepts no keyboard input, but it actually receives and decodes the channel traffic ok. I wanted to generate some plots, but the keyboard is dead.
 
Joined
Jul 27, 2020
Messages
117
I am also trying to play back a captured gr_complex file with op25 osmocom on ubuntu 20.04 -

rx.py --args 'rtl' -N 'LNA:47' -S 2000000 -x 2 -f 0.8875e6 -q 0 -U --ifile R_IQ_851000000_2000000_fc.raw

The first error was easy in rx.py -

ifile = blocks.file_source(gr.sizeof_gr_complex, input_filename, 1)
needed to be changed to -
ifile = blocks.file_source(gr.sizeof_gr_complex, input_filename, True)

The second error is -

********************
Traceback (most recent call last):
File "rx.py", line 818, in <module>
rx = rx_main()
File "rx.py", line 741, in __init__
self.tb = p25_rx_block(self.options)
File "rx.py", line 223, in __init__
self.open_ifile(self.channel_rate, options.gain, options.ifile, options.seek)
File "rx.py", line 615, in open_ifile
self.source = blocks.multiply_const_cc(gain)
File "/usr/lib/python3/dist-packages/gnuradio/blocks/blocks_swig3.py", line 3164, in make
return _blocks_swig3.multiply_const_cc_make(k, vlen)
TypeError: in method 'multiply_const_cc_make', argument 1 of type 'std::complex< float >'
dir-Z390-UD:~/Documents/Archive/op25-5/op25/op25/gr-op25_repeater/apps>
*************

Don't know what to do with that one.
 
Joined
Jul 27, 2020
Messages
117
I am also tried to play back a captured gr_complex file with boatbod op25 on ubuntu 18.04 -

after replacing in ry.py

elif (self.rtl_found or options.frequency):
with
elif (self.rtl_found):

that ran it down the wrong path.

rx.py -S 2000000 -f 0.8875e6 -x 2 -q 0 -U --ifile R_IQ_851000000_2000000_fc.raw

seemed to work - except I could not set the frequency. It had the correct spectrum, but it would not tune to the 0.8875e6 frequency offset. It said that the frequency was zero. There ,also, does not seem to be anyway the tell it to repeat playing the file - it does it once.
 
Joined
Jul 27, 2020
Messages
117
I am also tried to play back a captured gr_complex file with boatbod op25 on ubuntu 18.04 -

after replacing in ry.py

elif (self.rtl_found or options.frequency):
with
elif (self.rtl_found):

that ran it down the wrong path.

rx.py -S 2000000 -f 0.8875e6 -x 2 -q 0 -U --ifile R_IQ_851000000_2000000_fc.raw

seemed to work - except I could not set the frequency. It had the correct spectrum, but it would not tune to the 0.8875e6 frequency offset. It said that the frequency was zero. There ,also, does not seem to be anyway the tell it to repeat playing the file - it does it once.

The spectrum goes from -1e6 to 1e6 - so its going to need the center frequency - if things are really work right.
 

KA1RBI

Member
Joined
Aug 15, 2008
Messages
799
Location
Portage Escarpment
I am also trying to play back a captured gr_complex file with op25 osmocom on ubuntu 20.04 -

The second error is -

TypeError: in method 'multiply_const_cc_make', argument 1 of type 'std::complex< float >'

Don't know what to do with that one.

Thanks for these reports, I'll push a fix for the "1 --> True" modification.

As for the TypeError error above, could I have you add a
Code:
-g 1
to the rx.py command and post your results. The actual value of -g should be immaterial...

Note that the complex file must have been recorded at a sample rate of 96.000/sec. I believe the actual value of -S is ignored. There is no actual check to make sure of this - other than if the samp rate is not 96K, it won't work...

Max
 
Joined
Jul 27, 2020
Messages
117
I tried the following command -

./rx.py -S 96000 -f 0.000000 -x 2 -q 0 -g 1 -U --ifile L_IQ_851900000_96000_fc.raw -P fft 2> junk.txt

It now actually runs and generates a fft plot. The plot looks correct, except it goes from about -.5 to + .5 instead of -.05 to 0.05. I can input a frequency from the keyboard, but I cannot get it do a decode of either of the p25 signals in the range. The sample rate is 96000 complex samples per second (768000 bytes per second)

The output is -

gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.1.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] Using format CF32.
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[0]
Using two-stage decimator for speed=96000, decim=2/2 if1=48000 if2=24000
using ALSA sound system
audio device: default
Listening on 127.0.0.1:23456
python version detected: 3.8.2 (default, Jul 16 2020, 14:00:26)
 
Joined
Jul 27, 2020
Messages
117
No, I was trying to tune using the frequency. When, I tried -

./rx.py -S 96000 -f 0.000000 -x 2 -q 0 -g 1 -U --ifile L_IQ_851900000_96000_fc.raw -c 12500 -P fft 2> junk.txt

./rx.py -S 96000 -f 0.000000 -x 2 -q 0 -g 1 -U --ifile L_IQ_851900000_96000_fc.raw -c -12500 -P fft 2> junk.txt

and it worked - it tuned in the two active channels that were +- 12500 hz from the center frequency.


Is there someway to make this work off of some sort of audio file - they are much more compact than the gr_complex files.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
As you found out you can save complex spectrum captures but these tend to get large very quickly. As an alternative it is also possible to save the demodulator output (dibits) and then replay these later in a much more compact form than the complex samples. What is your goal?

As an aside, I pushed a fix for the boatbod trunking.py crash when the NAC was None type.
 
Joined
Jul 27, 2020
Messages
117
If the trunking would work off a gr_complex file that would sometimes be useful, but it would need to be at least 2 MSPS. At the moment, I have piped the NBFM audio output from p25 broadcasts to LouisErigHere-dsd and szechyjs-dsd with it working sometimes and it failing sometimes on MacOSX. Doing the save thing to dsdccx generates short bursts of sound, but never anything that you can understand. I can find no way to directly process a file with LouisErigHere-dsd or szechyjs-dsd. Dsdccx,again,generates short bursts of sound from files. The p25 is there and it is good, because I heard it on my Icom ic-r30. Is the NBFM audio what you mean by demodulator output (dibits) or is it something else ? How do you save the demodulator output and how do you feed it to op25 ?
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
If the trunking would work off a gr_complex file that would sometimes be useful, but it would need to be at least 2 MSPS. At the moment, I have piped the NBFM audio output from p25 broadcasts to LouisErigHere-dsd and szechyjs-dsd with it working sometimes and it failing sometimes on MacOSX. Doing the save thing to dsdccx generates short bursts of sound, but never anything that you can understand. I can find no way to directly process a file with LouisErigHere-dsd or szechyjs-dsd. Dsdccx,again,generates short bursts of sound from files. The p25 is there and it is good, because I heard it on my Icom ic-r30. Is the NBFM audio what you mean by demodulator output (dibits) or is it something else ? How do you save the demodulator output and how do you feed it to op25 ?
I'm sorry, I still don't get quite what you are trying to do. op25 can receive and decode P25 Conventional or P25 Trunking (either using rx.py or multi_rx.py) and it is possible to do a couple different forms of raw capture and playback. Capture/Playback is straight-forward with Conventional frequencies but challenging with trunking because you have to capture the entire system spectrum which makes really big files really quickly.

What part are LouisErigHere-dsd and szechyjs-dsd playing in the bigger picture?
 
Joined
Jul 27, 2020
Messages
117
This is what I wanted to do - "it is possible to do a couple different forms of raw capture and playback" - I was hoping to get a couple of examples - rather than spending two or three days guessing how to do it.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
This is what I wanted to do - "it is possible to do a couple different forms of raw capture and playback" - I was hoping to get a couple of examples - rather than spending two or three days guessing how to do it.
Sorry, I guess I should have cut short my family hiking trip to answer your questions.:rolleyes:

The most space-efficient capture/replay saves the demodulated symbols. Under rx.py the command line options are "-r filename" to save raw symbols, and "--symbols filename" to replay the file. This works best for conventional (non-trunked) systems where the frequency does not need to be re-tuned. It works in a limited manner with trunking too, but obviously since the entire spectrum isn't being saved the playback file only contains whatever the source system was tuned to at any given time.

Under multi_rx.py the equivalent cfg.json parameters are "raw_output": "filename" and "raw_input": "filename" applied in the channels section of the configuration.

rx.py also supports the "--ifile filename" complex capture replay, but looking at the current code in the boatbod repo I cannot see an equivalent option to writes the ifile in the first place. Perhaps the osmocom repo still has this functionality? If so there is no reason why you couldn't capture with one version and play back with another.
 
Joined
Jul 27, 2020
Messages
117
Sorry, I guess I should have cut short my family hiking trip to answer your questions.:rolleyes:

The most space-efficient capture/replay saves the demodulated symbols. Under rx.py the command line options are "-r filename" to save raw symbols, and "--symbols filename" to replay the file. This works best for conventional (non-trunked) systems where the frequency does not need to be re-tuned. It works in a limited manner with trunking too, but obviously since the entire spectrum isn't being saved the playback file only contains whatever the source system was tuned to at any given time.

Under multi_rx.py the equivalent cfg.json parameters are "raw_output": "filename" and "raw_input": "filename" applied in the channels section of the configuration.

rx.py also supports the "--ifile filename" complex capture replay, but looking at the current code in the boatbod repo I cannot see an equivalent option to writes the ifile in the first place. Perhaps the osmocom repo still has this functionality? If so there is no reason why you couldn't capture with one version and play back with another.

I am sorry. I responded to your questions too quickly. It did not come out as I intended.
 
Status
Not open for further replies.
Top