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.

I finally had some time to put together a page showing how I got TwoToneDetect running on a Raspberry Pi. Along with a cheap receiver, this could allow you to have a TTD setup up and running that uses very little power for under $100.

I'm by no means a Linux guru, so if you run into problems trying to duplicate this I'm not sure how much help I'll be, but feel free to post here if you'd like. I thought I'd start a new thread to keep the Linux stuff separate from the main Windows version of TTD.

Regards,

Andy

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

Perhaps I am not setting up pulse audio correctly?
I installed tightvncserver to run the xwindows because i dont have a usb hub at the moment.
I dont think I actually had to do anything in 'pavucontrol', on the input tab the only microphone on the system was selected. (cheap usb audio device)

Could there still be a missing dependency? There is a lot of "No such file or directory" errors

Perhaps I am not setting up pulse audio correctly?
I installed tightvncserver to run the xwindows because i dont have a usb hub at the moment.
I dont think I actually had to do anything in 'pavucontrol', on the input tab the only microphone on the system was selected. (cheap usb audio device)

Could there still be a missing dependency? There is a lot of "No such file or directory" errors

Thanks
VA7DMZ

Thanks for the feedback. I thought I had to install pulseaudio the first time I went through this, but on my second attempt from a new SD card it seemed to already be there for some reason, so I didn't include that in the instructions. I'll add it.

Something strange I've noticed is that when I run LevelMeter for the first time, the pulse audio devices show up as index 2, but after that, they show up as index 3. So you may want to try running it again and/or setting the input and output device indices to 3 and see what that does for you. I get all of those ALSA errors also, but it still works.

Another error it's throwing is that it doesn't see the control_scanner parameter in the config.cfg file, which is because I removed all of the scanner control stuff from v59 and removed that parameter from the config.cfg file that I included in the tarball. However, I forgot to remove the code that looks for that parameter in the program. To get rid of that error you can just add control_scanner = 0 to your config.cfg file. I don't think it will help with the audio issues, but it will at least make that particular error go away.

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

Edit: Ive done further checking into the mp3 functionality and it does work once. I cannot get it to work a second time unless i stop the program and start it again. tones.cfg has this entry: 'ignore_after = 60' but I waited long after that to play my tone a second time. Am I screwing it up?

Edit: Ive done further checking into the mp3 functionality and it does work once. I cannot get it to work a second time unless i stop the program and start it again. tones.cfg has this entry: 'ignore_after = 60' but I waited long after that to play my tone a second time. Am I screwing it up?

Ah, you found a bug. The ignore_after code is using a reference to the GUI, which is no longer there, so it won't work. It's telling the program to ignore that tone after receiving it once but then is never able to tell it start looking for it again because of the bug. Until the bug is fixed, either remove the ignore_after parameter from your tones or set it to -1.

I'll have to look into the AMR issue. Shame on me I never tested it, I only tested mp3. It appears to be an issue with ffmpeg, so I'll have to dig into that a bit.

Andy

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

Ah, you found a bug. The ignore_after code is using a reference to the GUI, which is no longer there, so it won't work. It's telling the program to ignore that tone after receiving it once but then is never able to tell it start looking for it again because of the bug. Until the bug is fixed, either remove the ignore_after parameter from your tones or set it to -1.

I'll have to look into the AMR issue. Shame on me I never tested it, I only tested mp3. It appears to be an issue with ffmpeg, so I'll have to dig into that a bit.

Andy

Ok I just uploaded a new version that corrects the ignore_after bug, and also some bugs with the AMR conversion. To get the AMR conversion working, you'll need to use the new version and also do this:

Code:

sudo apt-get install ffmpeg libavcodec-extra-53

Instead of what I had on the page before:

Code:

sudo apt-get install ffmpeg

ffmpeg needs some extra codecs installed to work with AMR.

Regards,

Andy

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

I finally had some time to put together a page showing how I got TwoToneDetect running on a Raspberry Pi. Along with a cheap receiver, this could allow you to have a TTD setup up and running that uses very little power for under $100.

I'm by no means a Linux guru, so if you run into problems trying to duplicate this I'm not sure how much help I'll be, but feel free to post here if you'd like. I thought I'd start a new thread to keep the Linux stuff separate from the main Windows version of TTD.

Regards,

Andy

That's great news, Andy! I will set up my pi over the weekend and will start some testing. I am a little late on this one as i had only been following the other TTD thread.

I finally had some time to put together a page showing how I got TwoToneDetect running on a Raspberry Pi. Along with a cheap receiver, this could allow you to have a TTD setup up and running that uses very little power for under $100.

I'm by no means a Linux guru, so if you run into problems trying to duplicate this I'm not sure how much help I'll be, but feel free to post here if you'd like. I thought I'd start a new thread to keep the Linux stuff separate from the main Windows version of TTD.

Regards,

Andy

One quick question that comes to mind:

Can the pi version be set up to retrieve the tones.cfg info from a remote file such as from a dropbox acct? That could help to eliminate the need to ssh into the pi to make changes.

Okay, Andy, I got a chance to fire it up. I had a few difficulties making the installation work but I got past all of them. Will send you a separate note on these.

I am now stuck at the LevelMeter.pyc point. My device numbers are 3 but when I put that number in all that it returns is zeros regardless of whether there is audio feeding in or not. When I do the pavucontrol the bar indicates that it is receiving the audio under the input Microphone.

Okay, Andy, I got a chance to fire it up. I had a few difficulties making the installation work but I got past all of them. Will send you a separate note on these.

I am now stuck at the LevelMeter.pyc point. My device numbers are 3 but when I put that number in all that it returns is zeros regardless of whether there is audio feeding in or not. When I do the pavucontrol the bar indicates that it is receiving the audio under the input Microphone.

I do remember running in to this, but can't remember what i did to get it working. Is your USB sound card plugged into a hub or directly into the Pi? I had some issues with my hub and had to plug it straight in to get it working.

Andy

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

I do remember running in to this, but can't remember what i did to get it working. Is your USB sound card plugged into a hub or directly into the Pi? I had some issues with my hub and had to plug it straight in to get it working.

Andy

yes, it is in a hub. I had power supply issues with the Pi so I put everything into a powered hub. Will try it direct. Thanks

Plugging it in drect didn't seem to help. But then i went into the pavucontrol again and under the configuration tab turned the ALSA profile to off. So my usb sound card has the profile Analog stereo Output + Analog stereo Input and he ALSA profie is off. This changed the zeros to numbers in the LevelMeter. And then yes i successfully detected a tone and sent emails. I am beat for now. Will work on it more over the weekend and next week.

Andy, I am getting this error regularly when TwoToneDetect59pi is launched. Not every time but probably 50% of the time. I see in post #7 above you indicated that you fixed this error. I downloaded the program yesterday morning (22-Mar) well after that.

Andy, I am getting this error regularly when TwoToneDetect59pi is launched. Not every time but probably 50% of the time. I see in post #7 above you indicated that you fixed this error. I downloaded the program yesterday morning (22-Mar) well after that.

Sometimes rebooting the pi is all it takes to get it working but just now I rebooted and I still get the error. This error prevents loading the program.

Jim

That's actually a slightly different error than the one above. I suspect this may have to do with whatever causes "pulse" to show up as index 2 sometimes and index 3 other times. I think it may be index 2 but when TTD tries to use index 3 it throws this error. The next time you run the program it's back to index 3, for whatever reason. If it does it repeatedly, try running LevelMeter.pyc and see if the index of the "pulse" devices has changed.

Andy

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