TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
For those who tried the image, what size SD card did you try it with? I think I may have found the issue, and it appears that the image works with 8 GB and larger cards, but not 4 GB. I'll try to get a 4GB compatible image out soon.

Andy

Mine also was on an 8GB sd card that failed.
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,303
I uploaded a new image last night that should work. Let me know.

Thanks,

Andy
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Thought I'd try Andy's RPI image today, and ran into the same issue as everyone else (Will not boot). So I figured I could play around a bit to see if I can get it started. As of right now I can get it to boot and I am able to SSH in and see that everything appears to be working on my B+. I am still working to confirm that TTD and Darkice work for me.

How i got it to boot required me to download and image an sd card with the Current Raspian OS. Since I use windows I can only see the FAT portion of the SD Card. I believe this is the boot sector, I copied its entire contents to my windows machine. Then proceed to reimage the sd card with Andy's img. Once this completed I deleted the FAT portion contents and replaced it with the content I copied earlier. This got it to boot. I then noticed it wasn't detecting my sound cards so to get this working I had to use sudo apt-get install rpi-update, then sudo rpi-update, once this was completed and rebooted I finally did a sudo apt-get update.

My Sound cards are finally being detected, I am now going through and setting up TTD to see if it works!
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Ok, Both Darkice and 2 Instances of TTD Running now.....I do have one question I notcied that the config file i have been using has a record delay of 6s while within the tone.cfg there is another record_delay of 4s. Which one is used or are both used?
 

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
Thought I'd try Andy's RPI image today, and ran into the same issue as everyone else (Will not boot). So I figured I could play around a bit to see if I can get it started. As of right now I can get it to boot and I am able to SSH in and see that everything appears to be working on my B+. I am still working to confirm that TTD and Darkice work for me.

How i got it to boot required me to download and image an sd card with the Current Raspian OS. Since I use windows I can only see the FAT portion of the SD Card. I believe this is the boot sector, I copied its entire contents to my windows machine. Then proceed to reimage the sd card with Andy's img. Once this completed I deleted the FAT portion contents and replaced it with the content I copied earlier. This got it to boot. I then noticed it wasn't detecting my sound cards so to get this working I had to use sudo apt-get install rpi-update, then sudo rpi-update, once this was completed and rebooted I finally did a sudo apt-get update.

My Sound cards are finally being detected, I am now going through and setting up TTD to see if it works!

Thank you for sharing, mine started up as well now. I also had a problem with my audio as well. I did the update and what not, and it worked. But out of the blue my audio is not being detected anymore.

If i add the user pi to the audio group my audio gets detected. But i can not start up darkice or TTD anymore. Ideas??
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
is you issue the pacmd command what does it say?
If it is not start you may have to start it via pulseaudio --start

I noticed that for some reason it was not starting so I added pulseaudio --start to crontab -e
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
this is how i have the system set via crontab

Sudo Crontab -e commands

0 2 * * * /sbin/reboot
@reboot rm /home/pi/FEFD/audio/*
@reboot rm /home/pi/PCNF/audio/*

Crontab -e Command

@reboot /bin/sleep 30 ; pulseaudio --start
@reboot /bin/sleep 90 ; cd /home/pi/FEFD ; PULSE_SOURCE=alsa_input.usb-0d8c_USB_Sound_Device-00-Device.analog-ster$
@reboot /bin/sleep 120 ; cd /home/pi/PCNF ; PULSE_SOURCE=alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.anal$
@reboot /bin/sleep 150 ; PULSE_SOURCE=alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono darkice -c $
 

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
is you issue the pacmd command what does it say?
If it is not start you may have to start it via pulseaudio --start

I noticed that for some reason it was not starting so I added pulseaudio --start to crontab -e

pulseaudio is running when i issue the pacmd command it says Welcome to pulseaudio.

But when i issue the aplay -l or arecord -l command i get an error "arecord: device_list:252: no soundcards found..."
 

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
I believe I did before the update steps, but it didn't seem to resolve it.

Ok, I did the updates, then it worked, then just stopped again. When i put pi into audio group nothing starts (icecast, darkice, TTD). I was able to manually start icecast, but nothing else would start up. Im reloaded the img right now and try again.
 

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
Thought I'd try Andy's RPI image today, and ran into the same issue as everyone else (Will not boot). So I figured I could play around a bit to see if I can get it started. As of right now I can get it to boot and I am able to SSH in and see that everything appears to be working on my B+. I am still working to confirm that TTD and Darkice work for me.

How i got it to boot required me to download and image an sd card with the Current Raspian OS. Since I use windows I can only see the FAT portion of the SD Card. I believe this is the boot sector, I copied its entire contents to my windows machine. Then proceed to reimage the sd card with Andy's img. Once this completed I deleted the FAT portion contents and replaced it with the content I copied earlier. This got it to boot. I then noticed it wasn't detecting my sound cards so to get this working I had to use sudo apt-get install rpi-update, then sudo rpi-update, once this was completed and rebooted I finally did a sudo apt-get update.

My Sound cards are finally being detected, I am now going through and setting up TTD to see if it works!

Ok, round 2 and so far its working, i also issued the sudo apt-get upgrade command too.
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Hmm, i just checked mine and groups shows "audio" has been added. So how long does it work for...Till its restarted or just randomly while its running.

I'd also suggest going into sudo crontab -e, and crontab -e and removing the commands that are there, reboot and try manually starting TTD
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,555
Location
Massachusetts
Well it seemed to work over night, Both instances of TTD detected a couple calls, and Darkice seems to be running smoothly.

Okay, give it a couple days and then report back with a synopsis of how you got it to work, please.

I have been fooling around with a Pi2 that I got delivered this week with very flaky and inconsistent results. Sometimes the programs (TTD and Darkice) will load, sometimes they won't. I got them loaded yesterday morning and they ran all day, sending me probably a dozen alerts from decoded tones. The pi did it's auto reboot at 3 am and since then I have been unable to get either program to load and run.

It appears to me to be a problem with Pulseaudio again as pavucontrol won't load either. A couple days ago when I could get the volume control loaded i adjusted the volumes, etc. with good results. Now I can't load paucontrol, TTD, or darkice. The pi2 requires use of the most current version of the OS, I suspect something is incompatible with pulseaudio.

Jim
 

Taylor_425

Member
Premium Subscriber
Joined
Jul 24, 2012
Messages
52
Location
Fort Erie, Ontario
Will do Jim!

Todays auto reboot seemed to work. I think you might be having the same issues as agaede2. Last time he mentioned it seemed to be working. I know after my first start-up I had to update everything to get the sound card to detect. After that I has some issues with pulseaudio hanging, I ended up removing all the Sudo Crontab and Crontab commands to resolve this. I start everything through crontab instead of sh.

I spent most of last evening testing its reboot capabilities to ensure that it always started correctly, and I didn't run into any issues.

Only thing I got to fix is record_delay...got to add about 6secs so it doesnt record the rest of the tone
 
Last edited:

agaede2

Member
Joined
Jan 24, 2015
Messages
30
Location
Eau Claire, WI
Finally got it figured out. TTD on reboot kept hanging up and would not start, most of the time pulseaudio wouldnt start, most of the time my sound card would not be seen.

To fix this, I made a script that issued the "arecord -l" command to make the pi look for the card. Then i delayed for 10 sec, and then issued "pulseaudio --start". and put that script in crontab -e. Also i have TTD waiting 20 sec to start, then another 20 seconds later darkice starts. So for this has worked for multiple reboots.
 
Status
Not open for further replies.
Top