Streaming op25

Status
Not open for further replies.

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
My config.json file
"vox_silence_time": 2,
"audio_threshold": 200,
"audio_source": "UDP",
"input_device_index": 4,
"input_pulse_name": "pulse",
"output_device_index": 4,
"output_pulse_name": "pulse",
"zello_input_sample_rate": 16000,
"audio_input_sample_rate": 8000,
"in_channel_config": "left",
"audio_input_channels": 1,
"audio_output_sample_rate": 48000,
"audio_output_channels": 2,
"audio_output_volume": 1.5,
"logging_level": "debug",
"TGID_in_stream": false,
"TGID_to_play": 58917,
"UDP_PORT": 8080

My audio section of my OP25 smartnet json file
"audio": {
"module": "sockaudio.py",
"instances": [
{
"instance_name": "audio0",
"device_name": "liquidsoap",
"udp_port": 8080,
"audio_gain": 4.0,
"number_channels": 2
Should I be using liquidsoap to send the audio to Zello?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,613
Reaction score
1,008
Location
Talbot Co, MD
"UDP_PORT": 23467
Make sure the Zello UDP port matches what you're using on op25. The default would be "23456", but the actual value depends on what you used for the "-u" command line parameter (rx.py) or in cfg.json (multi_rx.py).
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
When I start Zellostream in the terminal using the command "python zellostream.py", I can see that zellostream is receiving from udp port when there is a transmission in op25

2023-08-31 09:05:08,119 W main: cannot establish connection for incoming
2023-08-31 09:05:08,235 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)
2023-08-31 09:05:08,240 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)
2023-08-31 09:05:08,247 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)

but nothing else is happening.
Is this the correct way to start zellostream or am I missing something in the instructions?
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
I think my problem is that I don’t have the null sinks in pulse audio set up correctly and I need to do some more reading on it. I loose op25 audio out of my speaker whenever I launch Zellostreamer. There’s too many cobwebs around my 75 year old gray matter.
 

pmn929

Member
Joined
Jun 24, 2001
Messages
50
Reaction score
4
When I start Zellostream in the terminal using the command "python zellostream.py", I can see that zellostream is receiving from udp port when there is a transmission in op25

2023-08-31 09:05:08,119 W main: cannot establish connection for incoming
2023-08-31 09:05:08,235 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)
2023-08-31 09:05:08,240 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)
2023-08-31 09:05:08,247 D udp_rx: got 320 bytes from ('127.0.0.1', 53304)

but nothing else is happening.
Is this the correct way to start zellostream or am I missing something in the instructions?
Are you actually running the Zello app on your phone as well?

I have multi_rx running that monitors a handful of PD talk groups for one stream, and a few FD talkgroups for the other (all on the same system)

This means I run 2 ZelloStream instances on the PI that listen on 2 specific UDP ports. The only way I get audio is through the Zello app.

The communications on the app are real time, and it records every time someone transmits.
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
Are you actually running the Zello app on your phone as well?

I have multi_rx running that monitors a handful of PD talk groups for one stream, and a few FD talkgroups for the other (all on the same system)

This means I run 2 ZelloStream instances on the PI that listen on 2 specific UDP ports. The only way I get audio is through the Zello app.

The communications on the app are real time, and it records every time someone transmits.
How about posting screenshots of your zellostream config.json, the audio section of your op25 multi_rx config file and screenshots of how your Pulse Audio Volume control is set up with input, outputs and null sinks. That would probably be a help
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,613
Reaction score
1,008
Location
Talbot Co, MD
How about posting screenshots of your zellostream config.json, the audio section of your op25 multi_rx config file and screenshots of how your Pulse Audio Volume control is set up with input, outputs and null sinks. That would probably be a help
I see no reason why you'd need PulseAudio if Zellostream is picking up the UDP direct from op25 unless it's somehow needed for Zello.
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
I see no reason why you'd need PulseAudio if Zellostream is picking up the UDP direct from op25 unless it's somehow needed for Zello.
I don't know. When I have Zellostream set to UDP, this is what I get in the curses terminal that is running zellostreamer.py.

2023-08-31 19:29:47,507 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,509 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,510 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,512 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,513 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,514 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,515 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,516 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,517 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,643 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,644 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,646 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,647 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,648 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,649 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,650 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,651 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)

It is always 320 bytes and every now and then 2 bytes, and no action or audio on the Zello app on my phone.
I
 

pmn929

Member
Joined
Jun 24, 2001
Messages
50
Reaction score
4
That is what it looks like when it’s working. You have to use the app to connect to the channel you made on Zello’s website. It requires a different account then what you are using to push the stream.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,628
Reaction score
175
Location
Massachusetts
I have been streaming my op25 feed using liquidsoap and icecast server on a RPi4, , but I want to try to use Zello instead. I have installed Zello, but I cannot get the audio in from OP25. What is the correct way to get these programs to connect to one another.
I get the following error when starting Zello with the python script.


Message: 'cannot move pulseaudio sink input %d to sink %d'
Arguments: (53, None)
2023-08-30 18:03:32,373 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection'
2023-08-30 18:03:32,373 W main: cannot establish connection for incoming
have you installed pavucontrol? sudo apt install pavucontrol
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,628
Reaction score
175
Location
Massachusetts
I think my problem is that I don’t have the null sinks in pulse audio set up correctly and I need to do some more reading on it. I loose op25 audio out of my speaker whenever I launch Zellostreamer. There’s too many cobwebs around my 75 year old gray matter.
Your gray matter has five years on mine so it should be a snap for you.

i don’t recall doing anything unusual to get the OP25/zellostream to work. In your Sound and Video menu item do you see Pulse Audio Volume Control? If not, install pavucontrol(sudo apt install pavucontrol). Then reboot.

now start OP25 and zellostream.py.

go to Pulse Audio Volume Control and choose the Playback tab. You should see a Python 2.7 (OP25) item and a Python 3.X item (zellostream). Both should be playing to the Built-in Audio Device. Now click on the Recording Tab. Here you should see a Python3.X item (zellostream). in the box to the right make sure that it is recording from the Monitor of the Built-in Device.

IMG_2455.png
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
That is what it looks like when it’s working. You have to use the app to connect to the channel you made on Zello’s website. It requires a different account then what you are using to push the stream.
I must have an error in my Zello setup then, as I have nothing coming in on my Phone app from a different account
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
I am guessing that my local zellostream setup is not connecting to the Zello server to broadcast my stream because I can change my user name and password to whatever I want and it does not affect how zellostream runs.Do I have to open ports on my router or firewall?

I get this error after each burst of audio from op25.

getting audio udpdata length is 6203418
Audio on
2023-08-31 23:40:11,928 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection'
Cannot establish connection
 
Last edited:

pmn929

Member
Joined
Jun 24, 2001
Messages
50
Reaction score
4
I am guessing that my local zellostream setup is not connecting to the Zello server to broadcast my stream because I can change my user name and password to whatever I want and it does not affect how zellostream runs.Do I have to open ports on my router or firewall?

I get this error after each burst of audio from op25.

getting audio udpdata length is 6203418
Audio on
2023-08-31 23:40:11,928 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection'
Cannot establish connection
I’m assuming you signed up for the developer account and have your keys. I don’t think it required any ports to be open on the router.
For Zello, I'm only passing UDP data, no audio so I don't use any of those settings.

Here are my relevant json settings:
Zello Config
JSON:
{
    "username": "username",
    "password": "password",
    "zello_channel": "Fire",
    "issuer": "long key from zello",
    "vox_silence_time": 2,
    "audio_threshold": 200,
    "audio_source": "UDP",
    "input_device_index": 0,
    "input_pulse_name": "alsa_output.platform-bcm2835_audio.analog-stereo",
    "output_device_index": 14,
    "output_pulse_name": "fcdv1op",
    "zello_input_sample_rate": 16000,
    "audio_input_sample_rate": 8000,
    "in_channel_config": "left",
    "audio_input_channels": 1,
    "audio_output_sample_rate": 48000,
    "audio_output_channels": 2,
    "audio_output_volume": 1.5,
    "logging_level": "debug",
    "TGID_in_stream": false,
    "TGID_to_play": 58917,
    "UDP_PORT": 25467
}

OP25 multi_rx (heavily edited for posting)
JSON:
{
    "channels": [
        {
            "name": "FD",
            "device": "sdr0",
            "trunking_sysname": "FD",
            "demod_type": "cqpsk",
            "cqpsk_tracking": true,
            "tracking_threshold": 20,
            "tracking_feedback": 0.85,
            "tracking_limit": 1800,
            "destination": "udp://127.0.0.1:25467",
            "meta_stream_name": "",
            "excess_bw": 0.2,
            "filter_type": "rc",
            "if_rate": 24000,
            "plot": "",
            "symbol_rate": 4800,
            "enable_analog": "off",
            "whitelist": "FDwl.tsv",
            "blacklist": ""
        }
    ],
    "devices": [
        {
            "args": "rtl=e",
            "frequency": 859287500,
            "gains": "LNA:40",
            "name": "sdr0",
            "offset": 0,
            "ppm": 0.0,
            "usable_bw_pct": 0.85,
            "rate": 1000000,
            "tunable": true
        }

    ],
    "trunking": {
        "module": "tk_p25.py",
        "chans": [
            {
                "nac": "0x000",
                "sysname": "FD",
                "control_channel_list": "123.4567",
                "whitelist": "",
                "tgid_tags_file": "tgs.tsv",
                "rid_tags_file": "radios.tsv",
                "tdma_cc": false,
                "crypt_behavior": 2
            }
        ]
    },
    "metadata": {
        "module": "icemeta.py",
        "streams": [
            {
                "stream_name": "stream0",
                "meta_format_idle": "[idle]",
                "meta_format_tgid": "[%TGID%]",
                "meta_format_tag":  "[%TGID%] %TAG%",
                "icecastServerAddress": "localhost:8000",
                "icecastMountpoint": "op25",
                "icecastMountExt": ".xspf",
                "icecastPass": "",
                "delay": 0.0
            }
        ]
    },
    "audio": {
        "module": "sockaudio.py",
        "instances": [
            {
                "instance_name": "audio0",
                "device_name": "",
                "udp_port": 33456,
                "audio_gain": 1.0,
                "number_channels": 1
            }
        ]
    },
    "terminal": {
        "module": "terminal.py",
        "terminal_type": "http:0.0.0.0:8080",
        "curses_plot_interval": 0.1,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images",
        "tuning_step_large": 1200,
        "tuning_step_small": 100
    }
}
 
Last edited:

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
I am configured for UDP now, but I don't think that I am connecting to the Zello server. I have signed up and have the developer key and everything else as the instructions say, but the error that I have is that the websocket has no "create connection" attribute. I have switched my internet from my house broadband to using my iphone as a hotspot and it made no difference.
 

pmn929

Member
Joined
Jun 24, 2001
Messages
50
Reaction score
4
Did all of the prerequisites for Zellostream install successfully? Specifically the websocket client?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,613
Reaction score
1,008
Location
Talbot Co, MD
I don't know. When I have Zellostream set to UDP, this is what I get in the curses terminal that is running zellostreamer.py.

2023-08-31 19:29:47,507 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,509 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,510 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,512 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)
2023-08-31 19:29:47,513 D udp_rx: got 320 bytes from ('127.0.0.1', 34241)


It is always 320 bytes and every now and then 2 bytes, and no action or audio on the Zello app on my phone.
I

That is what it looks like when it’s working. You have to use the app to connect to the channel you made on Zello’s website. It requires a different account then what you are using to push the stream.
Each 320 byte chunk is an S16LE frame of audio.
The 2 bytes are a special flag used by op25 to denote the end of a transmission that triggers a buffer flush in the op25 audio player app. Of course Zello is not going to know what to do with that, but it shouldn't cause too many issues.
 

leoaln

Member
Feed Provider
Joined
Apr 6, 2010
Messages
78
Reaction score
5
Location
St. Martin, MS 39532
I got somewhat of a success this morning. I uninstalled the current version (1.6.2) of websocket-client and installed an older version (1.6.0) and had success connecting to the Zello server and actually broadcasting to my channel. After letting it run for a little while, I needed to rearrange some things on the computer desk and I disconnected from Zello. Now when I try to connect, I receive this error

create_zello_connection: exception: Handshake status 429 Too Many Requests -+-+- {'date': 'Fri, 01 Sep 2023 18:14:37 GMT', 'content-type': 'text/plain; charset=UTF-8', 'content-length': '16', 'connection': 'close', 'retry-after': '1305', 'x-frame-options': 'SAMEORIGIN', 'referrer-policy': 'same-origin', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'expires': 'Thu, 01 Jan 1970

Anyone run into this?
 
Last edited:
Status
Not open for further replies.
Top