RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Software > Streaming / Broadcasting / Audio Recording

Streaming / Broadcasting / Audio Recording Interested in putting your scanner online for others to hear? Want to listen to other radios on the internet. This forum is here for you to discuss these topics related to streaming scanners online.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #221 (permalink)  
Old 12-26-2013, 8:44 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default

Quote:
Originally Posted by nick223 View Post
Andy

i'm not sure what's going on just today when my pi takes audio on TTD it terminates the program and act like its freezes up. im stumped and I had Jim DC31 look at it and it stumped him also here is the error message I keep getting when audio is played. Any idea?
That is a strange one. Has this setup been working in the past? If you shoot me an email I can send you a version that has a few more debugging outputs to try to help figure this one out.

Andy
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
Sponsored links
  #222 (permalink)  
Old 12-31-2013, 4:52 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Jan 2004
Location: New York
Posts: 24
Default Andy - Great program! I need to run it on Debian thou on a UDOO Quad....

Andy, First I want to thank you for all your work on this...... It works well !!!!! I have been running this for over a year for my department and it has been a great back-up to our pagers and it helps keeping everybody informed when they are out of town too.....
I just bought a UDOO Quad (UDOO: Android Linux Arduino in a tiny single-board computer) and I had hoped to be able to run TTD on this but unfortunately due to the different CPU used on the UDOO compared to the Pi, it's not possible.... I know the Pi is inexpensive, but I wanted to use the UDOO Quad to run TTD as it has 4x the processing power of the Pi, more memory, a better remote desktop, and built-in audio as well all of which to me would make a much more "robust" way of running TTD.

With that being said, would there be any way of porting the Pi version of TTD over to Debian Wheezy armHF ?

My plan is to mount my UDOO inside or on, a Minitor 3/4 Charger-Amplifier and then have an ethernet port connection in the back. The pager would supply the audio (which is available at a fixed level internally) and the unit would be programmed/maintained through a remote desktop. This would make a reliable Plug and Play set up for a reasonable cost...... My goal is to try to make a bullet-proof setup and I have everything I need to do it.... I just need to be able to run TTD on Debian Wheezy armHF...... Can you help me out? Thanks! Bill

PS, you need to add a PayPal donation button to your web site......
Reply With Quote
  #223 (permalink)  
Old 12-31-2013, 11:31 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default

Quote:
Originally Posted by 10-75 View Post
Andy, First I want to thank you for all your work on this...... It works well !!!!! I have been running this for over a year for my department and it has been a great back-up to our pagers and it helps keeping everybody informed when they are out of town too.....
I just bought a UDOO Quad (UDOO: Android Linux Arduino in a tiny single-board computer) and I had hoped to be able to run TTD on this but unfortunately due to the different CPU used on the UDOO compared to the Pi, it's not possible.... I know the Pi is inexpensive, but I wanted to use the UDOO Quad to run TTD as it has 4x the processing power of the Pi, more memory, a better remote desktop, and built-in audio as well all of which to me would make a much more "robust" way of running TTD.

With that being said, would there be any way of porting the Pi version of TTD over to Debian Wheezy armHF ?

My plan is to mount my UDOO inside or on, a Minitor 3/4 Charger-Amplifier and then have an ethernet port connection in the back. The pager would supply the audio (which is available at a fixed level internally) and the unit would be programmed/maintained through a remote desktop. This would make a reliable Plug and Play set up for a reasonable cost...... My goal is to try to make a bullet-proof setup and I have everything I need to do it.... I just need to be able to run TTD on Debian Wheezy armHF...... Can you help me out? Thanks! Bill

PS, you need to add a PayPal donation button to your web site......
Bill,

You should be able to get this running, but I probably won't be able to help you much. The Pi version isn't compiled for a specific processor, it's just a Python script. If you can run Python scripts on your device you should be able to run the Pi version of TTD. The tricky part will be getting all of the dependencies installed and the audio drivers working correctly. If you just try running the script, you'll start getting errors. Work on getting rid of the errors one a a time by installing the needed packages and you'll probably be able to get it going.

Andy

Andy
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
  #224 (permalink)  
Old 12-31-2013, 12:41 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Jan 2004
Location: New York
Posts: 24
Default

Andy, thanks for the quick response and advice...... I'm new to Linux and I have just begun to learn what I'm doing and was under the impression the scripts for the Pi would not run... TTD will be my vehicle to learn more about Linux.... I'll keep you posted how I make out if anyones interested..... Thanks again....
Reply With Quote
  #225 (permalink)  
Old 01-05-2014, 8:46 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2008
Location: Monmouth, ME
Posts: 1
Default

This is great, I have had two pis sitting on the shelf not doing anything. I always wanted to use them for this since the power-hungry server I had running them was doing nothing except this and costing a bunch to run. Successfully got my pi setup with both TTD & RR Stream using this thread (complete with custom TTDpi decal). Thanks!
Attached Images
  
Reply With Quote
Sponsored links
  #226 (permalink)  
Old 01-06-2014, 5:47 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 347
Default Stacked tones

Another good test tonight. One of the dispatchers stacked ten tone sets for an announcement. Just the tones took nearly a minute. TTD (v64) on the pi decoded all ten sets properly. Nine of the ten recorded the audio properly and emailed the files. The tenth and last tone set decoded sent an email with a 25 sec audio attachment that was just blank air. Pretty impressive for that little box.
Reply With Quote
  #227 (permalink)  
Old 01-16-2014, 6:25 PM
Member
   
Join Date: Oct 2013
Location: Atikokan, Ontario
Posts: 18
Default Pi won't send e-mail

Hey,

I'm getting closer all the time to getting TwoToneDetect to work on my Pi. It is working quite nicely on my desktop. The final hitch now is that the Pi won't send e-mails. I'm directly copying the config.cfg file from my computer, and making the minor changes required for the Pi (index and audio threshold). This file works on my desktop. I'm using Outlook mail (the new Hotmail). I've got it setup not to use two-step authentication, and I've verified that I can login to the mail account on other devices that I don't generally use for that account.

I'm stumped.

The error is as follows (it quits trying after a couple attempts):

Traceback (most recent call last):
File "TwoToneDetect60aPi.py", line 419, in mail
File "/usr/lib/python2.7/smtplib.py", line 727, in sendmail
(code, resp) = self.rcpt(each, rcpt_options)
SMTPServerDisconnected: Connection unexpectedly closed: [Errno 1] _ssl.c:1359: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Email not sent on attempt 1trying again in five seconds for AFR-fr_Pi Page Receive
Reply With Quote
  #228 (permalink)  
Old 01-16-2014, 6:50 PM
Member
   
Join Date: Oct 2013
Location: Atikokan, Ontario
Posts: 18
Default

Update, using the Pi's web browser, I can't login to this Outlook account, though I can from my computer. However, I created another account with Shaw.ca. In this case, I can login from my Pi's browser, but get the same errors trying it through the Pi's TwoToneDetect.
Reply With Quote
  #229 (permalink)  
Old 01-16-2014, 8:04 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default

Quote:
Originally Posted by VE3FYN View Post
Hey,

I'm getting closer all the time to getting TwoToneDetect to work on my Pi. It is working quite nicely on my desktop. The final hitch now is that the Pi won't send e-mails. I'm directly copying the config.cfg file from my computer, and making the minor changes required for the Pi (index and audio threshold). This file works on my desktop. I'm using Outlook mail (the new Hotmail). I've got it setup not to use two-step authentication, and I've verified that I can login to the mail account on other devices that I don't generally use for that account.

I'm stumped.

The error is as follows (it quits trying after a couple attempts):

Traceback (most recent call last):
File "TwoToneDetect60aPi.py", line 419, in mail
File "/usr/lib/python2.7/smtplib.py", line 727, in sendmail
(code, resp) = self.rcpt(each, rcpt_options)
SMTPServerDisconnected: Connection unexpectedly closed: [Errno 1] _ssl.c:1359: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Email not sent on attempt 1trying again in five seconds for AFR-fr_Pi Page Receive
I have not run into this before. It looks like other people have though. It looks like this is an as of yet unsolved problem between the Pi and Microsoft's email server. I would try it with a gmail account (use port 587) and see if that gives you any different results.

Andy
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
Sponsored links
  #230 (permalink)  
Old 02-08-2014, 6:53 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 347
Default Update to TTD v65c

I have always found transferring files to the RPi to be awkward at the least.

Andy has posted a new Raspberry Pi version of TTD on the website.

To make the file transfer a little easier I have posted the TwoToneDetect65cPi.pyc file to my Comcast web server.

To transfer it to your pi type the following at your linux prompt ($):

pi@raspberrypi ~ $ curl -o TwoToneDetect65cPi.pyc https://home.comcast.net/~jaburnham/...etect65cPi.pyc

Of course, that is all one line, line wrap here makes it look like two.

That will put the file in the currently active directory on the pi. In the above case, the /home/pi directory. If you navigate to the directory where you want the .pyc file first then it will end up there without copying it over.

I have also posted TonesEditor8a.pyc if you are interested:

pi@raspberrypi ~ $ curl -o TonesEditor8a.pyc https://home.comcast.net/~jaburnham/TonesEditor8a.pyc

Jim
Reply With Quote
  #231 (permalink)  
Old 02-08-2014, 7:00 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 347
Default Pi update

Well, that didn't post very well...

What you want to type or paste in at the prompt is:

curl -o TwoToneDetect65cPi.pyc https://home.comcast.net/~jaburnham/...etect65cPi.pyc


Okay, I declare defeat. the url that it keeps shortening is:

home.comcast.net/~jaburnham/TwoToneDetect65cPi.pyc


Quote:
Originally Posted by DC31 View Post
I have always found transferring files to the RPi to be awkward at the least.

Andy has posted a new Raspberry Pi version of TTD on the website.

To make the file transfer a little easier I have posted the TwoToneDetect65cPi.pyc file to my Comcast web server.

To transfer it to your pi type the following at your linux prompt ($):

pi@raspberrypi ~ $ curl -o TwoToneDetect65cPi.pyc https://home.comcast.net/~jaburnham/...etect65cPi.pyc

Of course, that is all one line, line wrap here makes it look like two.

That will put the file in the currently active directory on the pi. In the above case, the /home/pi directory. If you navigate to the directory where you want the .pyc file first then it will end up there without copying it over.

I have also posted TonesEditor8a.pyc if you are interested:

pi@raspberrypi ~ $ curl -o TonesEditor8a.pyc https://home.comcast.net/~jaburnham/TonesEditor8a.pyc

Jim
Reply With Quote
  #232 (permalink)  
Old 02-08-2014, 10:40 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default Multiple instances of TTD on one Pi

I think I've finally figured out how to run multiple instances of TTD on a single Pi using different USB sound cards as inputs. This should be easy, and in hindsight it is, but it's been something that stumped me for a long time.

TTD on the Pi uses pulseaudio as the input source, and regardless of how many USB sound cards you plug in, there is still only one "pulse" audio source available. It turns out that you can tell pulseaudio which input to use with a program by setting an environment variable when starting the program. Here are the steps to make it work;

First, run this command to list the input devices available to pulseaudio:
Code:
LANG=C pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2
In my case this returned something like this:
Code:
alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo.monitor
alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono
alsa_output.usb-0d8c_Generic_USB_Audio_Device-00-Device.analog-stereo.monitor
alsa_input.usb-0d8c_Generic_USB_Audio_Device-00-Device.analog-mono
Next, when you start TTD, set the PULSE_SOURCE environment variable to whichever input you want to use from the step above (don't use the ones that end in "monitor"). Here is an example:
Code:
PULSE_SOURCE=alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono python TwoToneDetect65cPi.py
So, to run two instances of TTD, you'd have two TTD folders set up, and use a different PULSE_SOURCE when starting each instance. You can use the same strategy with the PULSE_SOURCE environment variable to run different instances of darkice for streaming. Of course this can all be scripted for automation. I haven't tried more than two instances/sound cards, but it does work with two, even with simultaneous detection of pages on each card. I'm not sure what the upper limit is.

Andy
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
  #233 (permalink)  
Old 02-09-2014, 5:59 PM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2007
Posts: 72
Default TwoToneDetect on a Raspberry Pi - How To

Would anyone have a disk image that contains both TTD and darkice working? I can't seem to make pulseaudio work at all.
Reply With Quote
  #234 (permalink)  
Old 02-11-2014, 8:40 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default

Quote:
Originally Posted by kc2kvy View Post
Would anyone have a disk image that contains both TTD and darkice working? I can't seem to make pulseaudio work at all.

Here is one courtesy of DC31:

Quote:
There is a v65c image with username pi password ttd-pi at:

https://drive.google.com/file/d/0B9s...it?usp=sharing

It also contains darkice for streaming to RR. Remove the # in the crontab line that starts darkice to make it load automatically.
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
  #235 (permalink)  
Old 02-11-2014, 1:57 PM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Feb 2007
Posts: 72
Default

Got the image up and running. I used this link to correct the fsck at boot problem I've run into a couple times - I suggest checking that out if you run your pi's headless.

Additionally, I'm thinking of following this guide to make the root filesystem read only. That'll make the reliability much better for a headless environment. I'll let you guys know if I decide to go down that route.
Reply With Quote
Sponsored links
  #236 (permalink)  
Old 02-14-2014, 5:42 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 347
Default

Quote:
Originally Posted by aaknitt View Post
I think I've finally figured out how to run multiple instances of TTD on a single Pi using different USB sound cards as inputs. This should be easy, and in hindsight it is, but it's been something that stumped me for a long time.

TTD on the Pi uses pulseaudio as the input source, and regardless of how many USB sound cards you plug in, there is still only one "pulse" audio source available. It turns out that you can tell pulseaudio which input to use with a program by setting an environment variable when starting the program. Here are the steps to make it work;

First, run this command to list the input devices available to pulseaudio:
Code:
LANG=C pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2
In my case this returned something like this:
Code:
alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo.monitor
alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono
alsa_output.usb-0d8c_Generic_USB_Audio_Device-00-Device.analog-stereo.monitor
alsa_input.usb-0d8c_Generic_USB_Audio_Device-00-Device.analog-mono
Next, when you start TTD, set the PULSE_SOURCE environment variable to whichever input you want to use from the step above (don't use the ones that end in "monitor"). Here is an example:
Code:
PULSE_SOURCE=alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono python TwoToneDetect65cPi.py
So, to run two instances of TTD, you'd have two TTD folders set up, and use a different PULSE_SOURCE when starting each instance. You can use the same strategy with the PULSE_SOURCE environment variable to run different instances of darkice for streaming. Of course this can all be scripted for automation. I haven't tried more than two instances/sound cards, but it does work with two, even with simultaneous detection of pages on each card. I'm not sure what the upper limit is.

Andy

i have set up a single pi running two instances of TTD and two instances of darkice supplying Broadcastify feeds. it ran through the night last night without issues.
Reply With Quote
  #237 (permalink)  
Old 02-14-2014, 9:32 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Jan 2009
Location: Ottawa Illinois
Posts: 324
Default TwoToneDetect on a Raspberry Pi - How To

Back around the holidays my audio stopped on the pi and couldn't figure out the issue. The green light was solid on the USB sound card. Normally the green light flashes. After having Jim look at it and Andy send in me a more debug version of ttd I replaced the sd card and the problem was fixed. Well I haven't received any alerts since yesterday. Well guess what the same problem is back and the green light is solid again. Do you think it's a bad pi? I really don't want to replace the sd card every 4 months.
Reply With Quote
  #238 (permalink)  
Old 02-14-2014, 9:36 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 844
Default

Quote:
Originally Posted by nick223 View Post
Back around the holidays my audio stopped on the pi and couldn't figure out the issue. The green light was solid on the USB sound card. Normally the green light flashes. After having Jim look at it and Andy send in me a more debug version of ttd I replaced the sd card and the problem was fixed. Well I haven't received any alerts since yesterday. Well guess what the same problem is back and the green light is solid again. Do you think it's a bad pi? I really don't want to replace the sd card every 4 months.
Do you have the Pi set up to automatically restart every day or two? If you restart the Pi does it work again? I doubt it's the Pi itself. Are you recording audio to the SD card? If so, any chance it's full?

Andy
__________________
Using TwoToneDetect? Show us where! Add yourself to the user map here or PM me with your location and I'll add you.

If you need help with TwoToneDetect please read this post first
Reply With Quote
  #239 (permalink)  
Old 02-14-2014, 9:44 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Jan 2009
Location: Ottawa Illinois
Posts: 324
Default

Pi restarts every night at 0255 with an dropbox back at 0259am. The pi does save audio files free space is 1.7 GB total 3.8 GB


Quote:
Originally Posted by aaknitt View Post
Do you have the Pi set up to automatically restart every day or two? If you restart the Pi does it work again? I doubt it's the Pi itself. Are you recording audio to the SD card? If so, any chance it's full?

Andy
Reply With Quote
  #240 (permalink)  
Old 02-14-2014, 9:49 AM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Jan 2009
Location: Ottawa Illinois
Posts: 324
Default

after a restart the green light blinks for about 5 seconds and returns solid
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 2:49 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2011 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions