RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Computer Aided Monitoring and Programming > 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
  #81 (permalink)  
Old 01-28-2014, 1:23 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

Quote:
Originally Posted by W2GLD View Post
Anybody on this topic/issue? I ran through the entire process again today with another Raspberry Pi and the same issue occurs...
Still didn't get it working? I was not able to look into that too much before but I will do what ever it takes to get it working for you! We might have to re-do a few steps however.

1. Does it start ok with this command: sudo /etc/init.d/darkice start ??
2. toward the top of the file, /etc/init.d/darkice , under #Required-Start and #Required-Stop, is pulse audio listed? If so, it might work fine if you remove the reference to pulse audio in #Required-Start (its worth a try but if still no joy put it back and let me know, and post the top 20 lines from /etc/init.d/darkice

Note that had pulseaudio as a #Required-Start item at first.. but now I have the following line which just means that (after doing " sudo update-rc.d darkice defaults " everything else starts before darkice, and darkice is the last thing started.. and that seems to work fine.

# Required-Start: $all

Last edited by IredellMon; 01-28-2014 at 2:33 PM..
Reply With Quote
Sponsored links
  #82 (permalink)  
Old 01-28-2014, 1:40 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Aug 2005
Posts: 1,090
Default

Quote:
Originally Posted by W2GLD View Post
Anybody on this topic/issue? I ran through the entire process again today with another Raspberry Pi and the same issue occurs...
I use a cron task to start darkice on reboot. May not be the most elegant way to do it, but seems to work.

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
  #83 (permalink)  
Old 01-29-2014, 12:05 PM
W2GLD's Avatar
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: May 2003
Location: Pinckney, Michigan
Posts: 524
Default

Quote:
Originally Posted by IredellMon View Post
Still didn't get it working? I was not able to look into that too much before but I will do what ever it takes to get it working for you! We might have to re-do a few steps however.

1. Does it start ok with this command: sudo /etc/init.d/darkice start ??
2. toward the top of the file, /etc/init.d/darkice , under #Required-Start and #Required-Stop, is pulse audio listed? If so, it might work fine if you remove the reference to pulse audio in #Required-Start (its worth a try but if still no joy put it back and let me know, and post the top 20 lines from /etc/init.d/darkice

Note that had pulseaudio as a #Required-Start item at first.. but now I have the following line which just means that (after doing " sudo update-rc.d darkice defaults " everything else starts before darkice, and darkice is the last thing started.. and that seems to work fine.

# Required-Start: $all
Okay, first off, thank you for the reply...

Yes, "sudo /etc/init.d/darkice start" does work if I manually enter the command to start that service, everything works as advertised...

I tried removing the "pulseaudio" audio from the "Required-Start" section and I was able to run the "sudo update-rc.d darkice defaults"; however, it generates another error with regards to LSB and mathkernel, just a warning message, so I'm not sure what that's about. Also, I tried "$all" as well and same results; it does not start upon rebooting.

Here is the code pasting you asked for as well:

#! /bin/sh
### BEGIN INIT INFO
# Provides: darkice
# Required-Start: alsa-utils pulseaudio $local_fs $remote_fs $network
# Required-Stop: alsa-utils pulseaudio $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: darkice streamer
# Description: Darkice will take an ALSA audio input and send it to
# a streaming server.
### END INIT INFO

# Author: Matt Rockwell <matt@mattrock.net>
# minor changes Feb2013 by <glyman3@gmail.com>
# File: /etc/init.d/darkice

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="darkice"
NAME=darkice
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CONFIGFILE=/etc/darkice.cfg


I am really at wits end with this project. I've now wasted countless hours trying to get this to work properly based on these instructions. I am an experienced computer administrator and I do a great deal of work with embedded computers such as the Raspberry Pi and have build many other systems based around these, but I have very little experience with Darkice and streaming services on this hardware. Another thing that bugs me is the MIC audio input; it gives you very little audio control and seems to have the 20db boost on all the time by default; causing any line in audio from the Uniden BCD996XT to be greatly amplified, almost into distortion as indicated on my service monitor. I do not have these issues with a typical PC hardware and SoundBlaster soundcards. I guess I'm asking allot from a $10 USB sound fob.

Anyway, I would appreciate any assistance you could provide. I'm at the point that if I cannot figure this out in the next couple of days; I'm just going to terminate all of my feeds. Running all of these devices is just too costly on a monthly basis to make it worth while continuing, the Raspberry Pi makes sense; it's just extremely frustrating at this point.

Thanks,

Jerry, W2GLD
__________________
ICOM IC-R30, IC-R8600 | Uniden SDS100 (x2) | Whistler TRX-1 | Airspy R2 (x2), HF+
Diamond D3000N Discone | Wellbrook ALA-1530LN Active Magnetic Loop
Reply With Quote
  #84 (permalink)  
Old 01-29-2014, 12:20 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 982
Default

Jerry, you sound like you are at wits end with this. I use the same method as Andy Knitt which is a simple line in your crontab:

@reboot /bin/sleep 120 ; screen -dmS darkice-screen darkice

To access your crontab it is crontab -e

You will need to have screen installed if you don't already. This line waits two minutes after booting to Allow things to settle then starts darkice in a detached screen. With it in a detached screen you can exit the terminal and it will continue to run. If you want to check on it, type screen -list at the linux prompt and it will show you what is running detached.

I have two pi's running his way that reboot daily. I don't worry about my feeds reloading at all.

We have also developed an autostart on power restoration if that is something you would be interested in

Jim
Reply With Quote
  #85 (permalink)  
Old 01-29-2014, 2:11 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

Quote:
Originally Posted by DC31 View Post
We have also developed an autostart on power restoration if that is something you would be interested in

Jim
Do tell.. how do you autostart upon power restoration? I run my RasPi on a UPS and it draws so little power it has well outlasted any black outs here, but that would be a great feature.
Reply With Quote
Sponsored links
  #86 (permalink)  
Old 01-29-2014, 2:15 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

Quote:
Originally Posted by W2GLD View Post
Jerry, W2GLD
I can certainly commiserate with you.. sometimes I think I know what I am doing pretty well, then I run into something that drives me nuts. But I refuse to let any piece of silicon beat me so I usually stay with a problem no matter how long it takes... which explains why my laptop starts crashing a few times, every few weeks, and has done so for a year or more. The “trouble ticket” is still open here as I will never give up but I might have to add it to my bucket list, i.e. “Fix laptop before dying”. (LOL)

So if you want to avoid using the “proper” SysV init method, use a cron job instead. Not as elegant but it works.

Q: On the console (must be local/direct connected) when its booting up, toward the end and maybe just before you get a login prompt, do you see “Starting darkice..” if so it’s starting all right, but then it stops. For example if the network is not reachable yet and it can’t connect it will stop but it won’t be so polite as to let you know.

Now to your issues. LSB error is no doubt a reference to the LSB (Linux Standards Base) compliant headers in you dependency based boot init script(s). The init script runs fine when run manually but fails on bootup so it sounds like something is not compliant on your box.

Now I don’t have mathkernal or Mathematica on my RasPi.. but I stumbled across this web page:

Raspberry Pi &bull; View topic - Raspbian init script bug

Which might explain the error you are seeing. Give it a shot. Either:
1. add the LSB header to /etc/init.d/mathkernel
Or 2. uninstall it (mathkernal and/or Mathematica?) and make sure that etc/init.d/mathkernel is gone
Or 3. Just remove the symlinks for the boot sequence: ‘sudo update-rc.d –f mathkernel remove’ (This option might not survive a system update)

I see no reason to not have darkice start last. That way we know the system is fully operational before it does start. Change the line in darkice init file: /etc/init.d.darkice
to #Required start $all

Remove the current darkice links for the boot sequence just to be sure it’s a clean slate: ‘sudo update-rc.d –f darkice remove’

Then run ‘sudo update-rc.d darkice defaults 99’ to force it to last position in the boot sequence.

If you want to explore a little now.. ‘cd /etc/rc2.d’ then ‘ls –la’
Look for a link with the word darkice in it. The link should be “Sxxdarkice’ where xx is higher or equal to the others in the directory (04 on my system), and it should point to /etc/init.d/darkice. These links of course point to all the scripts that are supposed to start in run level 2. You can also explore the other run level directories, rc0.d, rc1.d, etc. if you wish. Darkice should be set up to start in the run levels specified in the LSB header in the /etc/init.d/darkice file, namely 2 3 4 5.

(Don’t edit this links directly, that’s what update-rc.d is for)

If still no joy then we have to look further and maybe you would be willing to allow me a copy of your SD card to run here (minus passwords, etc) or even SSH in to try and fix it. Don’t let the silicone win!


'73 de N4YTM
Reply With Quote
  #87 (permalink)  
Old 01-29-2014, 3:09 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 982
Default

Quote:
Originally Posted by IredellMon View Post
Do tell.. how do you autostart upon power restoration? I run my RasPi on a UPS and it draws so little power it has well outlasted any black outs here, but that would be a great feature.
I followed the instructions at:

Auto Login and Auto Start in Raspberry Pi

All that you need is the first section regarding Auto Login (steps 1-4). Then set the cron job.

Jim
Reply With Quote
  #88 (permalink)  
Old 01-29-2014, 5:47 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

Quote:
Originally Posted by DC31 View Post
I followed the instructions at:

Auto Login and Auto Start in Raspberry Pi

All that you need is the first section regarding Auto Login (steps 1-4). Then set the cron job.

Jim
Very good.. maybe need to run a disk check too.. that should work out well. tnx
Reply With Quote
  #89 (permalink)  
Old 01-29-2014, 5:59 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

I need to clarify my statement: "The link should be “Sxxdarkice’ where xx is higher or equal to the others in the directory (04 on my system)... "
...
xx should be equal to the highest number in the links or higher... If the links are S01foo, S02bar, S03foobared (and no more) for example.. then you should see S03darkice -> ../init.d/darkice
OR S03 could be any number higher than 03 also.
Reply With Quote
  #90 (permalink)  
Old 01-29-2014, 6:23 PM
W2GLD's Avatar
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: May 2003
Location: Pinckney, Michigan
Posts: 524
Default

Quote:
Originally Posted by IredellMon View Post
I can certainly commiserate with you.. sometimes I think I know what I am doing pretty well, then I run into something that drives me nuts. But I refuse to let any piece of silicon beat me so I usually stay with a problem no matter how long it takes... which explains why my laptop starts crashing a few times, every few weeks, and has done so for a year or more. The “trouble ticket” is still open here as I will never give up but I might have to add it to my bucket list, i.e. “Fix laptop before dying”. (LOL)

So if you want to avoid using the “proper” SysV init method, use a cron job instead. Not as elegant but it works.

Q: On the console (must be local/direct connected) when its booting up, toward the end and maybe just before you get a login prompt, do you see “Starting darkice..” if so it’s starting all right, but then it stops. For example if the network is not reachable yet and it can’t connect it will stop but it won’t be so polite as to let you know.

Now to your issues. LSB error is no doubt a reference to the LSB (Linux Standards Base) compliant headers in you dependency based boot init script(s). The init script runs fine when run manually but fails on bootup so it sounds like something is not compliant on your box.

Now I don’t have mathkernal or Mathematica on my RasPi.. but I stumbled across this web page:

Raspberry Pi &bull; View topic - Raspbian init script bug

Which might explain the error you are seeing. Give it a shot. Either:
1. add the LSB header to /etc/init.d/mathkernel
Or 2. uninstall it (mathkernal and/or Mathematica?) and make sure that etc/init.d/mathkernel is gone
Or 3. Just remove the symlinks for the boot sequence: ‘sudo update-rc.d –f mathkernel remove’ (This option might not survive a system update)

I see no reason to not have darkice start last. That way we know the system is fully operational before it does start. Change the line in darkice init file: /etc/init.d.darkice
to #Required start $all

Remove the current darkice links for the boot sequence just to be sure it’s a clean slate: ‘sudo update-rc.d –f darkice remove’

Then run ‘sudo update-rc.d darkice defaults 99’ to force it to last position in the boot sequence.

If you want to explore a little now.. ‘cd /etc/rc2.d’ then ‘ls –la’
Look for a link with the word darkice in it. The link should be “Sxxdarkice’ where xx is higher or equal to the others in the directory (04 on my system), and it should point to /etc/init.d/darkice. These links of course point to all the scripts that are supposed to start in run level 2. You can also explore the other run level directories, rc0.d, rc1.d, etc. if you wish. Darkice should be set up to start in the run levels specified in the LSB header in the /etc/init.d/darkice file, namely 2 3 4 5.

(Don’t edit this links directly, that’s what update-rc.d is for)

If still no joy then we have to look further and maybe you would be willing to allow me a copy of your SD card to run here (minus passwords, etc) or even SSH in to try and fix it. Don’t let the silicone win!


'73 de N4YTM
Gordon,

First off, that's again for additional direction, it has been somewhat helpful, but we're still not 100%; however, we're working and I can reboot and get darkice to start automatically, though not following your methods.

Okay, here goes, the fix from that web link appears to have corrected the mathkernel issue; not sure why it's there; however, it's been there since the last three releases of Raspian Weezy; I'm running Weezy 2014-01-07 with all updated firmware and packages.

As for rebooting and getting darkice to start, I found a link on the web where someone was using an R-Pi for a baby monitor and they also suggested the crontab edit; however, I didn't want the system to have to wait for it to start too long, also, I wanted a way for it to restart should it crash throughout the day. The crontab entry I used is:

@reboot while sleep 1; do /usr/bin/darkice; done

When rebooting the R-Pi, it takes about a second for the feed to become live. Even-though the service says it's starting in the services; it's apparently crashing on bootup, possibly due to slow network acquisition as Gordon had suggested.

My platform is a Raspberry Pi (Rev. B) with a Edimax WiFi dongle and an 8gig. SD-Card running Raspian Weezy 2014-01-07 and a CM119 USB sound fob. I went WiFi because it was just easier to mount the R-Pi under the desk from where the Uniden scanner is located. I'd prefer ethernet cabled, but WiFi's okay too; I'm just old school and prefer some things hardwired.

Anyway, after several reboots, it appears to be working every time; we'll keep an eye on it for a few days and see what happens.

I do have one question still... Why would you want the R-Pi to automatically login? Doesn't that break it's security just a bit? If darkice is running as a service in headless operation, what's the point exactly? I've run IRLP and Allstar nodes and almost never login to the physical boxes; it's WinSCP for almost everything and Putty for everything else; am I missing something?

Thanks for everyone for their comments and I'll never let silicone win, unless she's cute and good in bed...

BTW, here's a link to the feed: http://www.broadcastify.com/listen/feed/11325/?rl=rr

Regards,

Jerry, W2GLD
__________________
ICOM IC-R30, IC-R8600 | Uniden SDS100 (x2) | Whistler TRX-1 | Airspy R2 (x2), HF+
Diamond D3000N Discone | Wellbrook ALA-1530LN Active Magnetic Loop

Last edited by W2GLD; 01-29-2014 at 6:24 PM.. Reason: Added link to feed.
Reply With Quote
  #91 (permalink)  
Old 01-29-2014, 8:19 PM
ahearn's Avatar
Member
   
Join Date: Aug 2005
Posts: 29
Default

I was researching using a Raspberry Pi for scanner feeds and came across this thread. Wow. I'm glad you guys are here and this thread will be a big help as I start my project. I'm an old noob so be gentle with me.

Al - WA4GKQ
Reply With Quote
  #92 (permalink)  
Old 01-29-2014, 8:21 PM
W2GLD's Avatar
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: May 2003
Location: Pinckney, Michigan
Posts: 524
Default

Quote:
Originally Posted by ahearn View Post
I was researching using a Raspberry Pi for scanner feeds and came across this thread. Wow. I'm glad you guys are here and this thread will be a big help as I start my project. I'm an old noob so be gentle with me.

Al - WA4GKQ
A Raspberry Pi is a great low power solution for a feed; once you get some of the kinks worked out.
__________________
ICOM IC-R30, IC-R8600 | Uniden SDS100 (x2) | Whistler TRX-1 | Airspy R2 (x2), HF+
Diamond D3000N Discone | Wellbrook ALA-1530LN Active Magnetic Loop
Reply With Quote
  #93 (permalink)  
Old 01-29-2014, 8:23 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 982
Default

Auto login allows the pi to self restore after a power failure. When the power comes back on, the pi starts itself up and relaunches Darkice. No human intervention. When remoting in through ssh it still requires uname and pwd.
Reply With Quote
  #94 (permalink)  
Old 01-29-2014, 8:27 PM
W2GLD's Avatar
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: May 2003
Location: Pinckney, Michigan
Posts: 524
Default

Quote:
Originally Posted by DC31 View Post
Auto login allows the pi to self restore after a power failure. When the power comes back on, the pi starts itself up and relaunches Darkice. No human intervention. When remoting in through ssh it still requires uname and pwd.
Okay, I'm still confused. I understand what you're saying but each time I remove power, it comes back up automatically by default because darkice is a service.

I'll simulate a power failure later tonight to verify again, but all the devices I've built fir various services do not require this extra procedure, unless you're running in a GUI environment and gave additional things running on it. Even the Beaglebone is the same way.
__________________
ICOM IC-R30, IC-R8600 | Uniden SDS100 (x2) | Whistler TRX-1 | Airspy R2 (x2), HF+
Diamond D3000N Discone | Wellbrook ALA-1530LN Active Magnetic Loop
Reply With Quote
  #95 (permalink)  
Old 01-29-2014, 8:37 PM
Member
  Audio Feed Provider
Audio Feed Provider
 
Join Date: Feb 2011
Location: Massachusetts
Posts: 982
Default

Sorry, if i confused things. It sounds like you are accomplishing the same end result using a different means.
Reply With Quote
  #96 (permalink)  
Old 01-29-2014, 9:39 PM
W2GLD's Avatar
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: May 2003
Location: Pinckney, Michigan
Posts: 524
Default

Quote:
Originally Posted by DC31 View Post
Sorry, if i confused things. It sounds like you are accomplishing the same end result using a different means.
It's cool, I was just trying to understand in case I was missing something too.
__________________
ICOM IC-R30, IC-R8600 | Uniden SDS100 (x2) | Whistler TRX-1 | Airspy R2 (x2), HF+
Diamond D3000N Discone | Wellbrook ALA-1530LN Active Magnetic Loop
Reply With Quote
  #97 (permalink)  
Old 01-29-2014, 9:55 PM
frazpo's Avatar
Member
   
Join Date: Jan 2007
Location: SW Mo
Posts: 1,226
Default

Quote:
Originally Posted by ahearn View Post
I was researching using a Raspberry Pi for scanner feeds and came across this thread. Wow. I'm glad you guys are here and this thread will be a big help as I start my project. I'm an old noob so be gentle with me.

Al - WA4GKQ
I just completed setting up a personal feed for decoded NXDN on an old laptop to a RasPi. Sounds good.
I was able to get through some issues with help from these guys. Any problems can be solved here with issues you may run in to.
Reply With Quote
  #98 (permalink)  
Old 02-08-2014, 7:53 PM
frazpo's Avatar
Member
   
Join Date: Jan 2007
Location: SW Mo
Posts: 1,226
Default Low volume normal using USB soundcard on PI ?

I have found that I need to increase my volume on the scanner quite a bit using my Pi to feed with in comparison to running my feed on a computer. Has anyone else had to do this? I wont be surprised if that's the case considering the PI is running on less power.
Reply With Quote
  #99 (permalink)  
Old 02-08-2014, 9:28 PM
Member
  Premium Subscriber
Premium Subscriber
Amateur Radio Operator
Amateur Radio
 
Join Date: Jan 2012
Location: North Carolina
Posts: 88
Default

Quote:
Originally Posted by frazpo View Post
I have found that I need to increase my volume on the scanner quite a bit using my Pi to feed with in comparison to running my feed on a computer. Has anyone else had to do this? I wont be surprised if that's the case considering the PI is running on less power.
I think it really varies in each case due to differences in scanners, soundcards, ect. and has nothing to do with the RasPi being a low power device. Running two different scanners on the same RasPi (at different times) I had to turn one up where it would be very loud (if the cable unplugged), and the other turned down almost too low for comfortable listening (again, if using the internal speaker). It also depends on the gain you have set on the capture device on the RasPi. It’s trial and error and a bit of an art form to get the levels just right for maximum modulation without distorting, clipping, etc. That’s where having an icecast server available on your local network (or the RasPi itself) helps you get the levels set faster.
Reply With Quote
  #100 (permalink)  
Old 02-08-2014, 9:51 PM
frazpo's Avatar
Member
   
Join Date: Jan 2007
Location: SW Mo
Posts: 1,226
Default

Yes and that is the case here. I have had it running on icecast for a week or so but not from a scanner. One scanner is not as sensitive as the other so I agree with your comment on the variance from one setup to the other. The important thing is that it is clear and working good. Nice shutting that ol' xp box down and not relying on it. The hard drive has that whine so I bet its getting ready to go. Don't have to worry about that anymore. Got the SD card backed up and the cfg files on drop box. Love this Pi.
Reply With Quote
Reply

Tags
rasberry pi, raspberry

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 11:28 PM.


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