TwoToneDetect New TwoToneDetect in the works - Python based

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,305
Hi, i am running the 64 bit version Debian Bullseye, would this still work? Rasperry Pi OS 32 bit
Right now the builds being provided are for Windows, Ubuntu 64 bit, and Pi OS 32 bit. The Pi OS 32 bit build will not run on a 64 bit OS. I'm not sure if you could get away with running the Ubuntu 64 bit version on Debian Bullseye or not, I haven't tried it.

Andy
 

Andy2712

Member
Feed Provider
Joined
Jul 19, 2005
Messages
67
Location
Lombard, IL
Ok I have a unique issue I'm trying to figure out and I can't seem to come up with an answer. I have RPi4 running 2 instances of TTD 1 is 73I, one is 73g. Each of these instances is being fed by a RTLSDR stick using RTLSDR Air being fed to the program through sinks I created. TTD is hearing the audio and decoding tones, but when the audio files are created, they are empty, there is no audio in them. What am I missing. It's clearly hearing audio if it's decoding tones and creating the files.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
Ok I have a unique issue I'm trying to figure out and I can't seem to come up with an answer. I have RPi4 running 2 instances of TTD 1 is 73I, one is 73g. Each of these instances is being fed by a RTLSDR stick using RTLSDR Air being fed to the program through sinks I created. TTD is hearing the audio and decoding tones, but when the audio files are created, they are empty, there is no audio in them. What am I missing. It's clearly hearing audio if it's decoding tones and creating the files.
I had the same problem in the past. As I recall what I figured out was that when TTD started recording audio after decoding a tone set, the recorder chose the default audio source from pulseaudio. Without any usb sound card plugged in (because your audio comes from sdr sticks) it is likely choosing the “Monitor of the Built-in device.” As no audio is going to this device, your recordings are blank. Since you can only set one source device as default it becomes troublesome when you have two sinks in pulse. I don’t remember now if or how I fixed it. I may have just gone back to two pi’s. Hopefully, this will at least steer you in a direction for troubleshooting.
 

Andy2712

Member
Feed Provider
Joined
Jul 19, 2005
Messages
67
Location
Lombard, IL
I had the same problem in the past. As I recall what I figured out was that when TTD started recording audio after decoding a tone set, the recorder chose the default audio source from pulseaudio. Without any usb sound card plugged in (because your audio comes from sdr sticks) it is likely choosing the “Monitor of the Built-in device.” As no audio is going to this device, your recordings are blank. Since you can only set one source device as default it becomes troublesome when you have two sinks in pulse. I don’t remember now if or how I fixed it. I may have just gone back to two pi’s. Hopefully, this will at least steer you in a direction for troubleshooting.
Welp, I think that's exactly it. I switch the devices from their individual sinks to the built in analog audio and it works, but both instances now hear the radio traffic from both frequencies. This is disappointing. I thought I had finally mastered this and had such big ideas on things to do with this.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
You could try setting the environment variable when starting TTD to see what that does. PULSE_SOURCE=<null sink name > ./TwoToneDetect7x
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
I assume that you are starting TTD by navigating to the TTD directory then issuing the command ./TwoToneDetect73g (or whatever version.)

just prepend that command with PULSE_SOURCE= followed by your null sink name and .monitor. For example:

PULSE_SOURCE=null_sinkname.monitor ./TwoToneDetect73g
 

Andy2712

Member
Feed Provider
Joined
Jul 19, 2005
Messages
67
Location
Lombard, IL
I assume that you are starting TTD by navigating to the TTD directory then issuing the command ./TwoToneDetect73g (or whatever version.)

just prepend that command with PULSE_SOURCE= followed by your null sink name and .monitor. For example:

PULSE_SOURCE=null_sinkname.monitor ./TwoToneDetect73g
Nope, this doesn't work either. Damn.
 

Andy2712

Member
Feed Provider
Joined
Jul 19, 2005
Messages
67
Location
Lombard, IL
Nope, this doesn't work either. Damn.
Having messed with this for a couple of days, I can tell you when the app goes to record it actually creates another sink to record from after tone detection, and this new sink goes to the default source.

As best as I can figure out, there is no way to do multiple dedicated frequencies with and SDR and a Pi.
 

iceman977th

Member
Feed Provider
Joined
Dec 25, 2009
Messages
398
Location
Catlettsburg, KY
So, I wanted to restart a TTD interface for myself. I downloaded 73L a while ago on my Pi (used for my feed using the Feed image from here) and got around to setting it up following the instructions. Seems to come up fine but the terminal window is filled with these errors, not sure where I've gone wrong. Any ideas? I do know that Pulse only shows loopback interfaces and does not seem to have an option to select the USB device that my dedicated paging radio will be using, nor the two scanner feed USB interfaces.

1696094674556.png
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
So, I wanted to restart a TTD interface for myself. I downloaded 73L a while ago on my Pi (used for my feed using the Feed image from here) and got around to setting it up following the instructions. Seems to come up fine but the terminal window is filled with these errors, not sure where I've gone wrong. Any ideas? I do know that Pulse only shows loopback interfaces and does not seem to have an option to select the USB device that my dedicated paging radio will be using, nor the two scanner feed USB interfaces.

i seem to recall that the feed appliance image has pulse disabled. Have you installed Pulse Audio Volume Control? If not, at the command line it is sudo apt install pavucontrol. Then reboot
 

iceman977th

Member
Feed Provider
Joined
Dec 25, 2009
Messages
398
Location
Catlettsburg, KY
It does have it (or if it didn't have it, I've installed it, because I do have both PulseAudio and the GUI) but it's not showing any USB devices except loopback devices, and there's no way to set a device that I have found (but I'm not a big Linux person to start with) I had to install/use Alsamixer to control gain on the sound cards I'm using.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
It does have it (or if it didn't have it, I've installed it, because I do have both PulseAudio and the GUI) but it's not showing any USB devices except loopback devices, and there's no way to set a device that I have found (but I'm not a big Linux person to start with) I had to install/use Alsamixer to control gain on the sound cards I'm using.
I looked back in the Feed Appliance forum thread and there is some discussion around pages 4-5. You are correct, pulseaudio is installed. However, changes made to its configuration in /etc/pulse/default.pa are causing the problems you are experiencing. I don’t remember the exact details now.
 

iceman977th

Member
Feed Provider
Joined
Dec 25, 2009
Messages
398
Location
Catlettsburg, KY
I looked back in the Feed Appliance forum thread and there is some discussion around pages 4-5. You are correct, pulseaudio is installed. However, changes made to its configuration in /etc/pulse/default.pa are causing the problems you are experiencing. I don’t remember the exact details now.
I'll take a look and see. I did find a command that did finally populate the USB interface in pulse, and it is decoding, but that error still pops up on start, doesn't seem to affect things though, decoding is working now. Now I have to get email set back up. I'm having issues but probably missing a setting on Gmail now, and this happens when the email fails to send.

1696220645019.png
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
I'll take a look and see. I did find a command that did finally populate the USB interface in pulse, and it is decoding, but that error still pops up on start, doesn't seem to affect things though, decoding is working now. Now I have to get email set back up. I'm having issues but probably missing a setting on Gmail now, and this happens when the email fails to send.

View attachment 149044
The key is in your fourth line down. Username/password. Follow that google link for the explanation.
 

rgeldart

Member
Joined
Mar 13, 2015
Messages
15
Location
Truro, Nova Scotia
Hi all, I have a IAR TTD instance that is having a weird problem. Yes I know I should contact IAR's support directly, however I've had much better luck with the help received from users on this forum so I figured I'd start here.

The problem I am having is my TTD Instance (74) is randomly not alerting for departments. This could be a long spiel of missed pages on multiple days in a row, or it could be a one and done and not happening again for a few days. I have stewed over this for the past 2 months, trying to figure this problem out but I'm at my wits end.

So here is the setup:
-TTD 74 on a Raspberry pi 4, API key from IAR and is part of a two instance setup (primary and backup)
- Analog scanner feed from a uniden bc355n
- setup was working fine, solid for years then one day it started having problems.
- Approximately 10 departments sharing the server
- multiple departments often tone on stacked pages


I have built my own OS image and am not using the official IAR image. It uses Raspbian Bullseye and includes the following:

-darkice to forward a direct radio feed to our internal server
-radio recording script called radiosave that truncates audio messages to remove dead air and saves them as mp3 files on the hour. (These items I am almost certain are not the cause of my issues as I have disabled both during troubleshooting)


As an example of what I'm seeing, one department uses toneset 669.9/634.5 and has been having issues being picked up.

I grabbed a screen capture of the logs from a night a known good page went through/TTD alerted and compared it against a day when it didn't alert. The tonesets appear to be the same hz (although warped a bit, 666.8 /634.6 ) I don't know if that is relevant because as you will see from the two images, the hz captured by TTD were identical both days. The fact it accepts the warped tone one day and not the next day leads me to think that the warped tone is not the issue.

IMG_0697c.PNG IMG_0696c.PNG

Here is my toneset data for the above example:
IARTTD.PNG

Things I have done thus far:
- Changed sound cards (now a known good quality Soundblaster USB card)
- Changed audio cables (The old one was pinched)
- Adjusted audio levels on scanner, audio input levels on PI and adjusted squelch
- Disabled all additional software on the PI
- Restarted multiple times
- Reload the config multiple times
- Turned our backup instance off so that the primary was doing all the work
- Today, I updated to TTD74f (not sure if that has done anything or not, will have to keep an eye on it.)
- reviewed recordings from days pages worked vs days pagers dont work with not much to go on.
- ** Important to note that the backup instance is not having issues, it is only our primary instance that is experiencing these problems.

My question is, has anyone else seen this sort of behavior? If so, what did you do to correct it? TTD on this server has been solid for a few years now without much issue. Just a reboot every now again when TTD locked up. but now it's acting up many times a week missing tonesets.

Any help is appreciated. Thank you!
 
Last edited:

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,305
Hi all, I have a IAR TTD instance that is having a weird problem. Yes I know I should contact IAR's support directly, however I've had much better luck with the help received from users on this forum so I figured I'd start here.

The problem I am having is my TTD Instance (74) is randomly not alerting for departments. This could be a long spiel of missed pages on multiple days in a row, or it could be a one and done and not happening again for a few days. I have stewed over this for the past 2 months, trying to figure this problem out but I'm at my wits end.

So here is the setup:
-TTD 74 on a Raspberry pi 4, API key from IAR and is part of a two instance setup (primary and backup)
- Analog scanner feed from a uniden bc355n
- setup was working fine, solid for years then one day it started having problems.
- Approximately 10 departments sharing the server
- multiple departments often tone on stacked pages


I have built my own OS image and am not using the official IAR image. It uses Raspbian Bullseye and includes the following:

-darkice to forward a direct radio feed to our internal server
-radio recording script called radiosave that truncates audio messages to remove dead air and saves them as mp3 files on the hour. (These items I am almost certain are not the cause of my issues as I have disabled both during troubleshooting)


As an example of what I'm seeing, one department uses toneset 669.9/634.5 and has been having issues being picked up.

I grabbed a screen capture of the logs from a night a known good page went through/TTD alerted and compared it against a day when it didn't alert. The tonesets appear to be the same hz (although warped a bit, 666.8 /634.6 ) I don't know if that is relevant because as you will see from the two images, the hz captured by TTD were identical both days. The fact it accepts the warped tone one day and not the next day leads me to think that the warped tone is not the issue.

View attachment 150530 View attachment 150531

Here is my toneset data for the above example:
View attachment 150532

Things I have done thus far:
- Changed sound cards (now a known good quality Soundblaster USB card)
- Changed audio cables (The old one was pinched)
- Adjusted audio levels on scanner, audio input levels on PI and adjusted squelch
- Disabled all additional software on the PI
- Restarted multiple times
- Reload the config multiple times
- Turned our backup instance off so that the primary was doing all the work
- Today, I updated to TTD74f (not sure if that has done anything or not, will have to keep an eye on it.)
- reviewed recordings from days pages worked vs days pagers dont work with not much to go on.
- ** Important to note that the backup instance is not having issues, it is only our primary instance that is experiencing these problems.

My question is, has anyone else seen this sort of behavior? If so, what did you do to correct it? TTD on this server has been solid for a few years now without much issue. Just a reboot every now again when TTD locked up. but now it's acting up many times a week missing tonesets.

Any help is appreciated. Thank you!
What version were you running prior to today's upgrade to 74f? There were some bug fixes in 74d that very well could fix what you're seeing. There was a bug where previously detected tone sets were not getting reset properly during some stacked tone scenarios and that would prevent re-detection. If you look at your log files and see that the "missed" tones were correctly detected earlier but then stop being detected, this could very well be the issue and 74f will hopefully resolve it.
 

rgeldart

Member
Joined
Mar 13, 2015
Messages
15
Location
Truro, Nova Scotia
What version were you running prior to today's upgrade to 74f? There were some bug fixes in 74d that very well could fix what you're seeing. There was a bug where previously detected tone sets were not getting reset properly during some stacked tone scenarios and that would prevent re-detection. If you look at your log files and see that the "missed" tones were correctly detected earlier but then stop being detected, this could very well be the issue and 74f will hopefully resolve it.
I was running the original version 74. I've upgraded to 74f and will see what happens. I didn't upgrade before because I am of the mindset of if it ain't broke, don't fix it, especially for a production box that's being used by multiple departments. I'm going to let the new version run for a few days and see what happens! Thank you!

On another somewhat related question with 74f, was there anything changed regarding the audio input levels for that version? l noticed that my input levels as detected by the 74f version seem louder than those captured with version 74? Not a big deal, I turned down the pulse audio input level to compensate but found it interesting nonetheless.
 

mocofeed

Member
Premium Subscriber
Joined
Jul 18, 2018
Messages
104
I have a long tone and A/B tone that TTD doesn't seem to catch. I've verified the tone using both RadioID and Audacity. But the tones are not tripping TTD's detection. What could be going wrong here?
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,564
Location
Massachusetts
Find the suspect tones in the logfile and post that information here. There is a logfile subdirectory in your TTD folder.

or open up yout tone tolerance to say 5% (0.05) to see if that helps.
 
Top