Using Python to Update Icecast Scanner Audio Feeds with a Raspberry Pi

Status
Not open for further replies.

121940kz

Member
Joined
Aug 3, 2014
Messages
80
I have a Pro-197 that I am testing your script on. It appears to be working, but I am wondering what else you have done with it? I simply want to add the Alpha tags to an private feed.

Thanks!

I haven't done much else with it. I did make a few updates from the time i posted my code. I added a few spots for error handling. For example if you unplug it, the script will not quit, it will try to continue reading from the port even though its not hooked up. Once it is plugged back in it will pick back up again. This is good for intermittent communication issues.

In terms of a private feed, i have not set one of those up. I think you can set one up with icecast and then you just enter your own private credentials, but sorry i don't have more specifics! If anyone is interested in my most recent code i can upload that again.
 

121940kz

Member
Joined
Aug 3, 2014
Messages
80
I have a pro-96 with serial adapter and was wondering how you got it to work.

I don't think this would work for the pro-96. Same reasoning that the programming software for the PRO-651/PRO-652/PRO-106/PRO-197 and GRE PSR-500 / PSR-600 and Whistler WS1040/WS1060 doesn't work for the pro-96. It just uses different serial communication code.

So theoretically my code would work on the PRO-651, PRO-652, PRO-106, PRO-197, GRE PSR-500, PSR-600 and Whistler WS1040/WS1060 because they are all essentially the same scanner. You can use Arc500 to program all of these scanners as their serial communication is the same.
 

bkcarter333

Member
Joined
Apr 22, 2006
Messages
3
Location
Kaysville, Utah
I haven't done much else with it. I did make a few updates from the time i posted my code. I added a few spots for error handling. For example if you unplug it, the script will not quit, it will try to continue reading from the port even though its not hooked up. Once it is plugged back in it will pick back up again. This is good for intermittent communication issues.

In terms of a private feed, i have not set one of those up. I think you can set one up with icecast and then you just enter your own private credentials, but sorry i don't have more specifics! If anyone is interested in my most recent code i can upload that again.
I would love to get your latest code. Thanks!
 

K7AZ

Member
Feed Provider
Joined
Sep 27, 2009
Messages
14
Location
Lompoc, Santa Barbara County, CA
Rpi3 & Alpha Tags Help Needed

Seeking assistance adding Alpha Tags to RPi-3 set up. Have Uniden BCT15x scanner and the USB to Scanner interface cable left over from using Pro-Scan. TeamViewer 12 available. Thank you in advance!
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
I have a 996p2 and using the front usb port but its not very stable the metadata comes and goes. Can you use the back serial port plugged into the pi with a serial cable to run the metadata?

Or might there be a more stable way to get a 996p2 to run metadata on a raspberry pi
 

bbrasmussen

Member
Joined
Dec 14, 2007
Messages
140
Location
Woods Cross, UT
I have a 996p2 and using the front usb port but its not very stable the metadata comes and goes. Can you use the back serial port plugged into the pi with a serial cable to run the metadata?

Or might there be a more stable way to get a 996p2 to run metadata on a raspberry pi

Hi. Yes you can use the back serial port. Since it is set up to accept a GPS connection, you'll need to add a null modem to your cable. I've used the back port quite a bit and have had good connection success. I have the serial cable connected to the scanner, a null modem connected to the cable, serial to USB adapter connected to the null modem, then the adapter connected to the Raspberry Pi. Another benefit of the back port is it helps to hide the cables by routing them behind the scanner.
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
Hi. Yes you can use the back serial port. Since it is set up to accept a GPS connection, you'll need to add a null modem to your cable. I've used the back port quite a bit and have had good connection success. I have the serial cable connected to the scanner, a null modem connected to the cable, serial to USB adapter connected to the null modem, then the adapter connected to the Raspberry Pi. Another benefit of the back port is it helps to hide the cables by routing them behind the scanner.

i do i have female serial cable to fit in the gps/serial port on back with out having to use the adapters.
Would the port stay the same though in the settings or would it stay ttyusb0
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
Your program works so great but uniden 996p2 scanner are not stable at all is it because it uses a mini usb port? My scripts are running on my pi and it shows no errors or anything, when you run them it just sits there blank.


Sometimes they do start up for a few days then they stop working for awhile. It's hit in miss when they work. It could go months not working.

im at a lose with the 996p2 scanner

16b18623f58323d14a32aa9750f8b763.jpg
 
Last edited:

bbrasmussen

Member
Joined
Dec 14, 2007
Messages
140
Location
Woods Cross, UT
Interesting. Looks like the serial connection is not consistent. I'm guessing it's not the USB cable. There could be a different format in the data stream from the scanner. (If you've never had it decode any metadata, this is probably the case.)

I'll see if I can dig into the documentation and find out what data is being sent.
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
Interesting. Looks like the serial connection is not consistent. I'm guessing it's not the USB cable. There could be a different format in the data stream from the scanner. (If you've never had it decode any metadata, this is probably the case.)

I'll see if I can dig into the documentation and find out what data is being sent.

Thanks!!
 

wetsqueegee

Member
Premium Subscriber
Joined
Jul 23, 2007
Messages
5
Location
Nova Scotia, Canada
hi, thanks for the script, i have it almost working perfect, my problem is my scanner feed is delayed but meta data has almost no delay, do you have a way to delay the data so everything is in sync?
thanks
 

faff29

Member
Feed Provider
Joined
Jul 30, 2008
Messages
51
Location
Eastlake, OH
Did anyone get anywhere with the 996P2 metadata issue? I have everything else figured out but looks like I too am running into the same unstable issue with the usb to usb cable issue.
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
Did anyone get anywhere with the 996P2 metadata issue? I have everything else figured out but looks like I too am running into the same unstable issue with the usb to usb cable issue.


Read up in the post. Use the back serial port. Havent had issues since i switched to that

Originally Posted by bbrasmussen View Post
Hi. Yes you can use the back serial port. Since it is set up to accept a GPS connection, you'll need to add a null modem to your cable. I've used the back port quite a bit and have had good connection success. I have the serial cable connected to the scanner, a null modem connected to the cable, serial to USB adapter connected to the null modem, then the adapter connected to the Raspberry Pi. Another benefit of the back port is it helps to hide the cables by routing them behind the scanner.
 

faff29

Member
Feed Provider
Joined
Jul 30, 2008
Messages
51
Location
Eastlake, OH
Thank you! I saw it said to use it but was not sure if it resolved it. Did you need to use a serial cord to a null modem then USB, or can you go serial to USB? Want to make sure I do it right the first time. My setup goes through a Raspberry Pi.
 

nick223

Member
Feed Provider
Joined
Jan 10, 2009
Messages
1,134
Location
Ottawa Illinois
Serial to null. my serial cable was already UBS on the other end so just plugged that into an open USB on the pi. Then go into the metapy file and get your settings correct make sure the scanner baud rate matches the settings in the file or it wont decode

Thank you! I saw it said to use it but was not sure if it resolved it. Did you need to use a serial cord to a null modem then USB, or can you go serial to USB? Want to make sure I do it right the first time. My setup goes through a Raspberry Pi.
 

jsncrso

KN4ZVZ
Feed Provider
Joined
Sep 12, 2009
Messages
249
Location
Outer Banks, NC
Script works great, thanks for providing! However, I do have one issue. My Pi is headless, so I login and configure from my Windows 10 PC using PuTTY. I can run the script and see the tags running fine in both PuTTY and on my scanner app on my phone. However, when I exit PuTTY, the script stops. Is there any way I can set up PuTTY so that the script keeps running when the program is exited?
 

bbrasmussen

Member
Joined
Dec 14, 2007
Messages
140
Location
Woods Cross, UT
Script works great, thanks for providing! However, I do have one issue. My Pi is headless, so I login and configure from my Windows 10 PC using PuTTY. I can run the script and see the tags running fine in both PuTTY and on my scanner app on my phone. However, when I exit PuTTY, the script stops. Is there any way I can set up PuTTY so that the script keeps running when the program is exited?

Awesome to hear you have it working!

So to run it detached from the PuTTY window -- meaning it will still run after you close the PuTTY window -- put an "&" after you type the command and before you hit enter. This tells the operating system to run the command, but not attach it to the console, so when you exit it will still be running.

So if I were to run the command on my machine I'd type:

Code:
python metaPy.py &

Of course replace the "metaPy.py" part with whatever filename you named the script after you set it up (if you changed the name.)

Hope that helps.
-Brandon, K7BBR
 
Status
Not open for further replies.
Top