OP25 multi_rx.py Ontario Provincial Government Zone 2 help please

Status
Not open for further replies.

despentiado

Member
Joined
Dec 28, 2005
Messages
15
Hi, name is Joe.
I'm trying to get OP25 to work with Ontario Provincial Government Zone 2 but it's taking the best of me and I can't get it to work properly.
Any help will be appreciated

"name": "Bannockburn (BNKBRN)",
"trunking_sysname": "Ontario Provincial Government Zone 2",
"device": "rtl0",
"raw_output": "",
"demod_type": "fsk4",
"destination": "smartnet",
"excess_bw": 0.35,
"filter_type": "fsk2",
"if_rate": 18000,
"plot": "mixer",
"enable_analog": "off",
"symbol_rate": 3600

"name": "Bannockburn (BNKBRN)",
"trunking_sysname": "Ontario Provincial Government Zone 2",
"meta_stream_name": "stream_0",
"device": "rtl1",
"blacklist": "",
"whitelist": "",
"raw_output": "",
"demod_type": "fsk4",
"destination": "udp://127.0.0.1:23456",
"enable_analog": "auto",
"nbfm_deviation": 4000,
"nbfm_squelch_threshold": -60,
"nbfm_squelch_gain": 0.0050,
"nbfm_raw_output": "",
"nbfm_enable_subchannel": false,
"excess_bw": 0.2,
"filter_type": "widepulse",
"if_rate": 24000,
"plot": "",
"symbol_rate": 4800
"devices":
"args": "rtl=0",
"frequency": 142500000,
"gains": "LNA:49",
"name": "rtl0",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"tunable": true
"args": "rtl=1",
"frequency": 142500000,
"gains": "LNA:49",
"name": "rtl1",
"offset": 0,
"ppm": 0.0,
"rate": 1000000,
"tunable": true
"trunking": {
"module": "tk_smartnet.py",
"chans":
"sysname": "Ontario Provincial Government Zone 2",
"control_channel_list": "142.500",
"tgid_tags_file": "oppid.tsv",
"tgid_hold_time": 2.0,
"blacklist": "",
"whitelist": "",
"bandplan": "400"
"metadata":
"module": "icemeta.py",
"streams":
"stream_name": "stream_0",
"meta_format_idle": "[idle]",
"meta_format_tgid": "[%TGID%]",
"meta_format_tag": "[%TGID%] %TAG%",
"icecastServerAddress": "your_stream_host_and_port",
"icecastMountpoint": "your_mountpoint_name",
"icecastPass": "your_password",
"icecastMountExt": ".xspf",
"delay": 0.0
"stream_name": "stream_1",
"meta_format_idle": "[idle]",
"meta_format_tgid": "[%TGID%]",
"meta_format_tag": "[%TGID%] %TAG%",
"icecastServerAddress": "your_second stream_host_and_port",
"icecastMountpoint": "your_second_mountpoint_name",
"icecastPass": "your_second_password",
"icecastMountExt": ".xspf",
"delay": 0.0
"audio":
"module": "sockaudio.py",
"instances":
"instance_name": "audio0",
"device_name": "default",
"udp_port": 23456,
"audio_gain": 1.0,
"number_channels": 1
"terminal": {
"module": "terminal.py",
"terminal_type": "curses",
"#terminal_type": "http:127.0.0.1:8080",
"curses_plot_interval": 0.2,
"http_plot_interval": 1.0,
"http_plot_directory": "../www/images"

pk_smartnet.py

elif band == "400":
bp_offset = int(from_dict(self.config, 'bp_offset', "380"))
bp_high = float(from_dict(self.config, 'bp_high', "143.145"))
bp_base = float(from_dict(self.config, 'bp_base', "141.01"))
bp_spacing = float(from_dict(self.config, 'bp_spacing', "15"))
high_cmd = bp_offset + bp_high - bp_base / bp_spacing

stderr

Configuring audio instance #0 [audio0]
using ALSA sound system
audio device: default
Listening on 127.0.0.1:23456
Configuring metadata stream #0 [stream_0]: your_stream_host_and_port/your_mountpoint_name
Configuring metadata stream #1 [stream_1]: your_second stream_host_and_port/your_second_mountpoint_name
Enabled trunking module: tk_smartnet.py
device: {u'gains': u'LNA:49', u'args': u'rtl=0', u'ppm': 0.0, u'rate': 1000000, u'frequency': 142500000, u'tunable': True, u'offset': 0, u'name': u'rtl0'}
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd plutosdr miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
device: {u'gains': u'LNA:49', u'args': u'rtl=1', u'ppm': 0.0, u'rate': 1000000, u'frequency': 142500000, u'tunable': True, u'offset': 0, u'name': u'rtl1'}
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd plutosdr miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya
Using device #1 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
channel (dev rtl0): {u'plot': u'mixer', u'name': u'Bannockburn (BNKBRN)', u'excess_bw': 0.35, u'symbol_rate': 3600, u'destination': u'smartnet', u'demod_type': u'fsk4', u'trunking_sysname': u'Ontario Provincial Government Zone 2', u'filter_type': u'fsk2', u'device': u'rtl0', u'raw_output': u'', u'if_rate': 18000, u'enable_analog': u'off'}
Using two-stage decimator for speed=1000000, decim=10/4 if1=100000 if2=25000
channel (dev rtl1): {u'plot': u'', u'nbfm_raw_output': u'', u'nbfm_deviation': 4000, u'demod_type': u'fsk4', u'whitelist': u'', u'destination': u'', u'excess_bw': 0.2, u'trunking_sysname': u'Ontario Provincial Government Zone 2', u'filter_type': u'widepulse', u'nbfm_squelch_threshold': -60, u'blacklist': u'', u'device': u'rtl1', u'nbfm_squelch_gain': 0.005, u'meta_stream_name': u'stream_0', u'raw_output': u'', u'if_rate': 24000, u'nbfm_enable_subchannel': False, u'symbol_rate': 4800, u'enable_analog': u'auto', u'name': u'Bannockburn (BNKBRN)'}
Using two-stage decimator for speed=1000000, decim=10/4 if1=100000 if2=25000
10/22/20 13:27:04.109213 [1] Enabling nbfm analog audio
10/22/20 13:27:04.111110 [0] reading system tgid_tags_file: oppid.tsv

op25-3.pngop25-3.pngop25-2.pngop25-1.png


thanks
 

despentiado

Member
Joined
Dec 28, 2005
Messages
15
I'm sorry, this is my real stderr file and command line and site


./multi_rx.py -v 9 -c smartnet_example.json 2> stderr.2


Configuring audio instance #0 [audio0]
using ALSA sound system
audio device: default
Listening on 127.0.0.1:23456
Configuring metadata stream #0 [stream_0]: your_stream_host_and_port/your_mountpoint_name
Configuring metadata stream #1 [stream_1]: your_second stream_host_and_port/your_second_mountpoint_name
Enabled trunking module: tk_smartnet.py
device: {u'gains': u'LNA:49', u'args': u'rtl=0', u'ppm': 0.0, u'rate': 1000000, u'frequency': 142500000, u'tunable': True, u'offset': 0, u'name': u'rtl0'}
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd plutosdr miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
device: {u'gains': u'LNA:49', u'args': u'rtl=1', u'ppm': 0.0, u'rate': 1000000, u'frequency': 142500000, u'tunable': True, u'offset': 0, u'name': u'rtl1'}
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd plutosdr miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya
Using device #1 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
channel (dev rtl0): {u'plot': u'mixer', u'name': u'Bannockburn (BNKBRN)', u'excess_bw': 0.35, u'symbol_rate': 3600, u'destination': u'smartnet', u'demod_type': u'fsk4', u'trunking_sysname': u'Ontario Provincial Government Zone 2', u'filter_type': u'fsk2', u'device': u'rtl0', u'raw_output': u'', u'if_rate': 18000, u'enable_analog': u'off'}
Using two-stage decimator for speed=1000000, decim=10/4 if1=100000 if2=25000
channel (dev rtl1): {u'plot': u'', u'nbfm_raw_output': u'', u'nbfm_deviation': 4000, u'demod_type': u'fsk', u'whitelist': u'', u'destination': u'udp://127.0.0.1:23456', u'excess_bw': 0.2, u'trunking_sysname': u'Ontario Provincial Government Zone 2', u'filter_type': u'widepulse', u'nbfm_squelch_threshold': -60, u'blacklist': u'', u'device': u'rtl1', u'nbfm_squelch_gain': 0.005, u'meta_stream_name': u'stream_0', u'raw_output': u'', u'if_rate': 24000, u'nbfm_enable_subchannel': False, u'symbol_rate': 4800, u'enable_analog': u'auto', u'name': u'Bannockburn (BNKBRN)'}
Using two-stage decimator for speed=1000000, decim=10/4 if1=100000 if2=25000
op25_audio: Open_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
10/22/20 14:50:27.658760 [1] Enabling nbfm analog audio
op25_audio: Open_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
10/22/20 14:50:27.660960 [0] Initializing Smartnet system
10/22/20 14:50:27.661033 [0] reading system tgid_tags_file: oppid.tsv

10/22/20 14:50:27.667994 [1] Initializing voice channel
10/22/20 14:50:28.220921 [0] SMARTNET OSW (0x30c0,G,0x3c0)
10/22/20 14:50:28.223275 [0] SMARTNET OSW (0x4b40,G,0x3c0)
10/22/20 14:50:28.223403 [0] SMARTNET OSW (0x6101,G,0x3bf)
10/22/20 14:50:28.346957 [0] SMARTNET OSW (0x30c0,G,0x3bf)
10/22/20 14:50:28.348595 [0] SMARTNET OSW (0x2043,G,0x308)
10/22/20 14:50:28.350237 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:28.351506 [0] SMARTNET OSW (0x4b40,I,0x3bf)
10/22/20 14:50:28.353206 [0] SMARTNET OSW (0x822f,G,0x00f,0.000000)
10/22/20 14:50:28.354460 [0] SMARTNET OSW (0x279c,G,0x320)
10/22/20 14:50:28.475012 [0] SMARTNET OSW (0x61cf,G,0x30b)
10/22/20 14:50:28.477501 [0] SMARTNET OSW (0x2243,G,0x308)
10/22/20 14:50:28.478898 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:28.479795 [0] SMARTNET OSW (0x30c0,G,0x3c0)
10/22/20 14:50:28.481156 [0] SMARTNET OSW (0x4b40,G,0x3c0)
10/22/20 14:50:28.604420 [0] SMARTNET OSW (0x6101,G,0x3bf)
10/22/20 14:50:28.606645 [0] SMARTNET OSW (0x30c0,G,0x3bf)
10/22/20 14:50:28.610247 [0] SMARTNET OSW (0x2043,G,0x308)
10/22/20 14:50:28.611048 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:28.613909 [0] SMARTNET OSW (0x4b40,I,0x3bf)
10/22/20 14:50:28.615457 [0] SMARTNET OSW (0x822f,G,0x03e,0.000000)
10/22/20 14:50:28.735202 [0] SMARTNET OSW (0x3f9c,G,0x320)
10/22/20 14:50:28.736469 [0] SMARTNET OSW (0x61fe,I,0x30b)
10/22/20 14:50:28.738346 [0] SMARTNET OSW (0x2243,G,0x308)
10/22/20 14:50:28.739488 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:28.740101 [0] SMARTNET OSW (0x30c0,G,0x3c0)
10/22/20 14:50:28.866186 [0] SMARTNET OSW (0x4b40,G,0x3c0)
10/22/20 14:50:28.868650 [0] SMARTNET OSW (0x6101,G,0x3bf)
10/22/20 14:50:28.873347 [0] SMARTNET OSW (0x30c0,G,0x3bf)
10/22/20 14:50:28.874616 [0] SMARTNET OSW (0x2043,G,0x308)
10/22/20 14:50:28.876660 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:28.878398 [0] SMARTNET OSW (0x4b40,I,0x3bf)
10/22/20 14:50:28.971202 meta_server::send_metadata(): exception HTTPConnectionPool(host='your_stream_host_and_port', port=80): Max retries exceeded with url: /admin/metadata?mount=/your_mountpoint_name&mode=updinfo&song=[idle] (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb8881ab1d0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
10/22/20 14:50:28.998432 [0] SMARTNET OSW (0x822f,G,0x00e,0.000000)
10/22/20 14:50:28.998676 [0] SMARTNET OSW (0x2b9c,G,0x320)
10/22/20 14:50:29.002417 [0] SMARTNET OSW (0x61ce,G,0x30b)
10/22/20 14:50:29.005531 [0] SMARTNET OSW (0x2243,G,0x308)
10/22/20 14:50:29.008854 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:29.011864 [0] SMARTNET OSW (0x30c0,G,0x3c0)
10/22/20 14:50:29.128325 [0] SMARTNET OSW (0x4b40,G,0x3c0)
10/22/20 14:50:29.128736 [0] SMARTNET OSW (0x6101,G,0x3bf)
10/22/20 14:50:29.137916 [0] SMARTNET OSW (0x30c0,G,0x3bf)
10/22/20 14:50:29.146837 [0] SMARTNET OSW (0x2043,G,0x308)
10/22/20 14:50:29.146986 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:29.271054 [0] SMARTNET OSW (0x4b40,I,0x3bf)
10/22/20 14:50:29.271292 [0] SMARTNET OSW (0x822f,G,0x00d,0.000000)
10/22/20 14:50:29.271373 [0] SMARTNET OSW (0x3b9c,G,0x320)
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I'm sorry, this is my real stderr file and command line and site
...snip...
10/22/20 14:50:29.008854 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:29.011864 [0] SMARTNET OSW (0x30c0,G,0x3c0)
10/22/20 14:50:29.128325 [0] SMARTNET OSW (0x4b40,G,0x3c0)
10/22/20 14:50:29.128736 [0] SMARTNET OSW (0x6101,G,0x3bf)
10/22/20 14:50:29.137916 [0] SMARTNET OSW (0x30c0,G,0x3bf)
10/22/20 14:50:29.146837 [0] SMARTNET OSW (0x2043,G,0x308)
10/22/20 14:50:29.146986 [0] SMARTNET OSW (0x1224,G,0x340)
10/22/20 14:50:29.271054 [0] SMARTNET OSW (0x4b40,I,0x3bf)
10/22/20 14:50:29.271292 [0] SMARTNET OSW (0x822f,G,0x00d,0.000000)
10/22/20 14:50:29.271373 [0] SMARTNET OSW (0x3b9c,G,0x320)

The appearance of OSWs in the log show that you have the control channel tuned and decoding correctly. What I'm not seeing is any properly formatted voice traffic. At log level "-v 9" you would expect to see "voice update:" messages of this form once a group voice grant is detected:
Code:
08/11/20 21:36:43.284348 [0] SMARTNET OSW (0x4690,G,0x0dc,856.512500)
08/11/20 21:36:43.285334 [0] SMARTNET OSW (0xa43f,G,0x308)
08/11/20 21:36:43.285582 [0] SMARTNET OSW (0x019c,G,0x320)
08/11/20 21:36:43.285667 [0] set tgid=18064, status=0x0, srcaddr=-1
08/11/20 21:36:43.285828 [1] voice update:  tg(18064), freq(856.512500), mode(1)
08/11/20 21:36:43.285904 [1] rx_sync::set_slot_mask: current(4), new(0)
08/11/20 21:36:43.285924 [1] rx_sync::sync_reset:
08/11/20 21:36:43.285955 [1] op25_nbfm::control: analog audio disabled
08/11/20 21:36:43.286384 [0] SMARTNET OSW (0x60a6,I,0x30b)
08/11/20 21:36:43.286543 [0] SMARTNET OSW (0x3008,G,0x3bf)
08/11/20 21:36:43.408571 [1] rx_sync::sync_established: protocol P25P1
08/11/20 21:36:43.409046 [1] digital sync detected:  tg(18064), freq(856.512500), mode(1)
08/11/20 21:36:43.409208 [1] op25_nbfm::control: analog audio disabled
Does your log contain any 0x308 / 0x309 / 0x321 OSW commands?
I see some 0x308's but none that contain a voice frequency.

ETA: Conceivably this is related to the bandplan "400" setting... so far I've only had the opportunity to test on 800Mhz Rebanded system, but the frequency calculating code was derived from that used by Trunk88 and TrunkRecorder software so it should be ok. If you add a filename to the "raw_output" config entry in the control channel receiver, then run the app for a while (5-10 mins) it will capture the decoded symbols to a file which I can then replay on my system and see if I can figure out what's going on. PM me if you'd like.
 
Last edited:

despentiado

Member
Joined
Dec 28, 2005
Messages
15
The appearance of OSWs in the log show that you have the control channel tuned and decoding correctly. What I'm not seeing is any properly formatted voice traffic. At log level "-v 9" you would expect to see "voice update:" messages of this form once a group voice grant is detected:
Code:
08/11/20 21:36:43.284348 [0] SMARTNET OSW (0x4690,G,0x0dc,856.512500)
08/11/20 21:36:43.285334 [0] SMARTNET OSW (0xa43f,G,0x308)
08/11/20 21:36:43.285582 [0] SMARTNET OSW (0x019c,G,0x320)
08/11/20 21:36:43.285667 [0] set tgid=18064, status=0x0, srcaddr=-1
08/11/20 21:36:43.285828 [1] voice update:  tg(18064), freq(856.512500), mode(1)
08/11/20 21:36:43.285904 [1] rx_sync::set_slot_mask: current(4), new(0)
08/11/20 21:36:43.285924 [1] rx_sync::sync_reset:
08/11/20 21:36:43.285955 [1] op25_nbfm::control: analog audio disabled
08/11/20 21:36:43.286384 [0] SMARTNET OSW (0x60a6,I,0x30b)
08/11/20 21:36:43.286543 [0] SMARTNET OSW (0x3008,G,0x3bf)
08/11/20 21:36:43.408571 [1] rx_sync::sync_established: protocol P25P1
08/11/20 21:36:43.409046 [1] digital sync detected:  tg(18064), freq(856.512500), mode(1)
08/11/20 21:36:43.409208 [1] op25_nbfm::control: analog audio disabled
Does your log contain any 0x308 / 0x309 / 0x321 OSW commands?
I see some 0x308's but none that contain a voice frequency.

ETA: Conceivably this is related to the bandplan "400" setting... so far I've only had the opportunity to test on 800Mhz Rebanded system, but the frequency calculating code was derived from that used by Trunk88 and TrunkRecorder software so it should be ok. If you add a filename to the "raw_output" config entry in the control channel receiver, then run the app for a while (5-10 mins) it will capture the decoded symbols to a file which I can then replay on my system and see if I can figure out what's going on. PM me if you'd like.
thanks will do
 

maus92

Member
Premium Subscriber
Joined
Jun 23, 2004
Messages
7,971
Location
The OP
I can say that the Mixer frequency plot does not look like my frequency plot for SmartNet II 851
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
I can say that the Mixer frequency plot does not look like my frequency plot for SmartNet II 851
I've seen two very distinctly different mixer plots in the past and it seems largely to be related to whether there is simulcast or not. Ultimately it doesn't seem to matter as the datascope and symbol timing recovery have locked in nicely and are producing OSWs. The issue seems to be related to decoding the channel id which is probably not surprising since this is not an 800Mhz system. Looking at it now :)
 

maus92

Member
Premium Subscriber
Joined
Jun 23, 2004
Messages
7,971
Location
The OP
I've seen two very distinctly different mixer plots in the past and it seems largely to be related to whether there is simulcast or not. Ultimately it doesn't seem to matter as the datascope and symbol timing recovery have locked in nicely and are producing OSWs. The issue seems to be related to decoding the channel id which is probably not surprising since this is not an 800Mhz system. Looking at it now :)
It looks like a wideband multicast site, similar waveform to BGE's IDEN signal. Nice eye pattern.
 
Last edited:

foxtail

Member
Premium Subscriber
Joined
Dec 19, 2002
Messages
313
Location
Niagara Region Canada
Would he need more info entered for the Fleetnet band plan? which is "Lo-380, Hi-578, Base-141.0150, slot-1"
"Lo-579, Hi-631, Base-151.7300 slot-1"
"Lo-632, Hi-759, Base-154.3200 slot-1"
That's what's needed for a radio scanner to work on Fleetnet.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Would he need more info entered for the Fleetnet band plan? which is "Lo-380, Hi-578, Base-141.0150, slot-1"
"Lo-579, Hi-631, Base-151.7300 slot-1"
"Lo-632, Hi-759, Base-154.3200 slot-1"
That's what's needed for a radio scanner to work on Fleetnet.
Yes. I've committed changes to make that possible.
 

maus92

Member
Premium Subscriber
Joined
Jun 23, 2004
Messages
7,971
Location
The OP
Multiple band plan entries always confuse me, lol... I *thought* that the channels numbers ascend from the base freq, thus on this particular site the two additional base frequencies 151.730 and 154.320 would produce channel numbers that are not used on the site, although they might be needed on a foreign system or other site.
 
Last edited:
Status
Not open for further replies.
Top