Building a Raspberry Pi-based streamer - a guide for the nervous

Discussion in 'Digital: DACs, USB converters, decrapifiers' started by Kattefjaes, Feb 19, 2017.

  1. randytsuch

    randytsuch Friend

    Pyrate
    Joined:
    Oct 13, 2017
    Likes Received:
    259
    Trophy Points:
    65
    Location:
    Los Angeles, Ca
    You might ask at the Volumio forum, see if they have any advice.

    Your SD card may not really be corrupted, if you stick in any pi SD card into windows, windows will say the card is bad, and want to fix it.
    A pi SD card has two partitions. One partition, the boot one, is readable by windows, by the other partition is in a linux format that windows doesn't understand. This is why you have to use special software, I use etcher but rufus is good too, to write a pi sd card.
    Did you try to power cycle the pi zero, and see if it comes back up? Not a good long term fix, but it may work fine after a power cycle.
    I was running picoreplayer on a zero w, and didn't see the problem you see. But I added a reset switch of the pi that is on a speaker used by the family, to make it easy to reset in case it starts to act up. It's not hard, but not a beginner level task either.
    Think trying another power supply is a good idea, even if the one you have should work, it may not be doing what it should.

    Randy
     
  2. SineDave

    SineDave Friend

    Pyrate
    Joined:
    Apr 18, 2016
    Likes Received:
    862
    Trophy Points:
    93
    Location:
    Houston, TX
    Home Page:
    I swapped to Volumio from Rune - overall a much better experience, and I love the spotify plugin.
     
  3. Huhnkopf

    Huhnkopf Friend

    Pyrate
    Joined:
    Oct 5, 2015
    Likes Received:
    1,076
    Trophy Points:
    93
    same

    recently built a RBPI3 with ALLO DigiOne and running Volumio on it with the Spotify plugin. Pretty great move away from my gaming PC.
     
  4. Andre Y

    Andre Y Friend

    Pyrate
    Joined:
    Oct 4, 2015
    Likes Received:
    220
    Trophy Points:
    43
    Location:
    Southern California
    That's odd. Maybe try a different SD card? Some of them can be pretty flakey.
     
  5. Scott Kramer

    Scott Kramer Friend

    Pyrate
    Joined:
    May 3, 2016
    Likes Received:
    1,446
    Trophy Points:
    93
    Anything other than piCorePlayer is a meat grinder* on those cheap ass sdcards. There's a bit of a barrier to entry on understanding the LMS/piCorePlayer/Controller setup... but once you get it, it's the shit. I recommend playing with it on the side if you want to do moode/rune/volumio etc. Great time to do it... 3.5 dropped a few days ago.

    ...and very sophisticated if you go with the audio core version, realtime kernel, native DSD, 384k, and tools to tune the really well designed allo, 502DAC, hifiberry(one) boards.

    *Its based on tinyCoreLinux**... the entire OS and filesystem loads into RAM at boot. ZERO writes to the sdcard during normal operation.

    **tinyCoreLinux isn't some weird OS... it provides the "structure" to pull off running the official linux fully in ram... its payload is the current GitHub linux (you can use whatever rev and compile it in)... and piCorePlayer 3.5 is from a week or 2 ago (to get the new pi3+ support) ---> ie, the latest network stack, wireless, bluetooth, security, raw kernel etc. etc.
     
    Last edited: Mar 26, 2018
  6. randytsuch

    randytsuch Friend

    Pyrate
    Joined:
    Oct 13, 2017
    Likes Received:
    259
    Trophy Points:
    65
    Location:
    Los Angeles, Ca
  7. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    Thanks to all for your feedback!\/

    If I'm able to shutdown properly, Windows doesn't complain and I'm able to backup the image using Win32 Disk Imager. Using Etcher to flash to SD after a full reformat with the sdcard.org tool.

    If I do a hard power cycle, it will reboot but behaviour goes wonky, like not being able to access it from a phone (as if the code that serves mobile devices crapped out - just a wild guess pulled out of my ass).
    I have a cheap TEAMGROUP card that was kicking around and the one that came with the Pi Zero W kit from Adafruit. Assume the latter is a decent card. Seems to be hanging using either card.
    Will start playing with pCP. No writes to the card and running fully in RAM sounds good. If I just want basic USB output to Eitr, does the "audio optimized version" provide any advantages over the "normal version"?
    You said the "newconfig.cfg" method from pCP (described here?) didn't work. Does that mean I'm f@cked with my Zero W?
     
  8. JustAnotherRando

    JustAnotherRando My other bike is a Ferrari

    Contributor
    Joined:
    Aug 15, 2017
    Likes Received:
    1,373
    Trophy Points:
    93
    Location:
    Hong Kong
    On the subject of SD cards, I'm just doing occasional dirty shutdowns on the Pi+Rune combination. Haven't run into any corruption issues (yet) but if I do, plan to just rebuild the card.

    The only precaution I take with SD cards is to buy branded ones from reliable sources (e.g. B&H rather than Amazon).
     
    Last edited: Mar 27, 2018
  9. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    Forgot to mention, things seem fine if I just set Volumio to repeat a playlist. It's been running for over 12 hrs straight so far this last session. If I leave it idle overnight, or even a few hours and come back, I get the circle of death.

    Occasionally browsing/selecting/pausing/skipping/etc. from the webUI on an Android phone will cause it to hang. Interfacing from a desktop browser doesn't seem to cause any problems.
     
  10. randytsuch

    randytsuch Friend

    Pyrate
    Joined:
    Oct 13, 2017
    Likes Received:
    259
    Trophy Points:
    65
    Location:
    Los Angeles, Ca
    I have done a lot of hard power cycles with pcp and no problem. Wonder why volumio is so sensitive to them?

    So you could try the newconfig method, maybe you'll have better luck than I did. I tried a couple times, it didn't work, so then I used my pi3 to setup wifi, and then moved the sd card to my zero w and all was good.
    If you can connect a monitor to the zero w hdmi mini connector, and a usb keyboard with a usb to go adapter, then you can setup wifi after the pi boots up. I didn't have the hdmi mini, so had to work around that.
     
  11. sepinho

    sepinho Friend

    Pyrate
    Joined:
    Oct 5, 2015
    Likes Received:
    61
    Trophy Points:
    18
    Location:
    Berlin
    RuneAudio is a fork of Volumio.
     
  12. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    After a lot of futzing around, because I know zero about Linuxy shit, I got piCorePlayer running headless using only Wi-Fi and connected to the LMS package on my Synology NAS. Doing an overnight repeat playlist test now to see if it's still running in the morning, as it was still occasionally hanging on me during the setup process. Then I'll do an idle running test to see if it might be my Pi Zero that's the problem. The nice thing with pCP is that it handles hard reboots very well. I installed the LMS onboard the Pi, but couldn't figure out how to connect it to my NAS, so I gave up.

    Question: Is there a way to disable SW volume control (i.e. force "bit-perfect" output)? I disabled the onboard soundcard, but volume is still controllabe from the LMS GUI and Squeezer on my Android phone.

    I'm using the first of these available output devices:
    • sysdefault:CARD=Eitr
    • front:CARD=Eitr,DEV=0
    • surround21:CARD=Eitr,DEV=0
    • surround40:CARD=Eitr,DEV=0
    • surround41:CARD=Eitr,DEV=0
    • surround50:CARD=Eitr,DEV=0
    • surround51:CARD=Eitr,DEV=0
    • surround71:CARD=Eitr,DEV=0
    • iec958:CARD=Eitr,DEV=0
    Is there another setting (e.g. ALSA, Various Options) that can disable volume control? Or does having the volume at 100% "guarantee" bit-perfect output?

    There is so little clear documentation for noobs it's rather frustrating. Glad I got it working though.
     
  13. Scott Kramer

    Scott Kramer Friend

    Pyrate
    Joined:
    May 3, 2016
    Likes Received:
    1,446
    Trophy Points:
    93
    Screen Shot 2018-03-30 at 11.11.08 AM.png

    Set it here, LMS server side.

    Or in iPeng: Settings-->Player Settings-->Audio-->Fixed Volume (don't know android squeezr)

    Also just setting to 100% is bitperfect, no harm leaving it variable.
     
  14. shabta

    shabta Facebook Friend

    Contributor
    Joined:
    Jan 14, 2016
    Likes Received:
    153
    Trophy Points:
    43
    In Android Squeezer there is no way to permanently set the volume to 100%. But as mentioned above 100% is bit perfect.

    One thing to consider is using Max2Play. It is much easier to setup/control LMS and the player works just as well as picoreplayer. You really almost never need to use any linux command line stuff with Max2Play. I use both. I have Max2Play as my LMS server running on an odroid. The odroid also feeds the stereo in one room. And I use picoreplayer on a raspberry pi in my main rig. So I can vouch for both.
     
  15. mitochondrium

    mitochondrium Friend

    Pyrate
    Joined:
    Sep 1, 2017
    Likes Received:
    1,115
    Trophy Points:
    93
    Location:
    A Cell
    @gixxerwimp
    re your problems with Volumio
    If you insert an SDcard with a Linux installation Windows telling you that there are corrupt files on there is normal (at least I experienced the same behaviour).
    Your problem might be linked to the wifi dongle you are using more precisely the chipset it uses. Some Linux distributions do not like the Realtek 8192CU. Unfortunately a lot of wifi dongles use this chipset. Blacklisting the 8192CU might help. If you know how to ssh into your Pi you can do this

    nano /etc/modprobe.d/rtl8192cu.conf
    and then

    blacklist rtl8192cu

    Another possibility is that the wifi dongle goes into powersave mode, again if you know how to ssh into the Pi you can turn off the powersave mode of the wifi dongle, that would explain why this happens after you have left the Pi running Volumio on its own for some time.
    You may want to ask on the Volumio forum how to do that.
     
  16. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    @mitochondrium Thanks for the input.

    I only get the corrupt message from Windows for a volumio sdcard after a hard power down, which I only do if it hangs. If I do a soft shut down and then insert the card, there's no error and I can save the image.

    I'm using the built-in wifi of the Pi Zero W, which I think uses the BCM43438 chipset, same as the Pi 3.

    Found this blog post about turning off power save mode, but I'm not sure how one would apply it to Volumio. I'm finding that piCorePlayer is disconnecting from wifi as well, even when music is playing (even before an album has finished playing). After a hard reboot, everything is fine, until it hangs again.

    I'm able to use putty to login into piCorePlayer with "ts". If someone can provide the "commands for dummies" to disable power save mode of the onboard wifi, I'll give it a try.

    I'll keep searching in the meantime.
     
  17. mitochondrium

    mitochondrium Friend

    Pyrate
    Joined:
    Sep 1, 2017
    Likes Received:
    1,115
    Trophy Points:
    93
    Location:
    A Cell
    Hi,

    last time I tinkered with Volumio the networking stuff was in:

    etc/network/interfaces

    if you type:

    sudo nano /etc/network/interfaces

    something like this should come up:

    auto lo
    iface lo inet loopback

    auto wlan0
    iface wlan0 inet static
    address 192.XXX.X.XXX
    netmask 255.255.255.0
    network 192.XXX.X.X
    broadcast 192.XXX.X.X
    gateway 192.XXX.X.X

    wireless-power off
    wpa-ssid networkname
    wpa-psk XXXXXXXXXXX

    auto eth0
    iface eth0 inet dhcp


    Don't know whether the internal wln of the Pi is called wlan0.

    The important thing there is:

    wireless-power off

    If it is not there you may want to add it, you then need to save the changed file and reboot

    If the wireless-tools package is installed in Volumio you can use:

    iwconfig

    In order to find out whether the powersave modus is off.

    I have never used pCP, the abovementioned may work there, too. But there are many different ways to manage networking on Linux ditros that this is not a safe bet

    Another solution might be this:

    nano /etc/udev/rules.d/70-wifi-powersave.rules

    ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/bin/iw dev %k set power_save off"
    Save this file and reboot

    But your safest bet is really to ask on the respective forums, you will probably find the most adequate solution for the specific software
     
  18. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    I did both this:
    And in a post by michelangelo in this thread on the volumio forum, he said to add the line in red to disable power save mode on integrated Wi-Fi.

    sudo nano /lib/systemd/system wireless.service

    When I nano'd wireless.service, it seemed to be empty (maybe it was from an older version?). So I put all of the above into wireless.service

    Anyway, with both the above mods, Volumio now seems to be staying awake. Left overnight it was still connected in the morning, and between leaving the house for work and checking it a few hours later, it was still up whereas it would have died already in the past.

    Working with piCorePlayer was a bit too opaque for me, being a total linuxy-shit noob. And when it I got it working, it would stop in the middle of the queue and I could hear intermittent pops/ticks. So more fiddling would be required. The Squeezer app interface on my phone was really responsive and nice to use though. Too bad the rest of it is a PITA.

    Thanks to all those who helped me get this running properly!
     
  19. Jerda

    Jerda New

    Joined:
    Aug 13, 2017
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Nazareth
    Hello everyone and a BIG thanks to Kattefjaes for the guide!
    Got two questions about this little great thing: after the setup I will control it from the iPhone or an android device, do I have to do it with wi-fi only or can I control it also with Bluetooth? Because I never use wifi with my phone, I got a plan with 30Gb in 4G :D
    The second question is that I've read in the first message about the alternative apps needed to use streaming services as Tidal or deezer ( btw deezer has 16bit quality from desktop source only, so.... are the clients of the raspberry considered desktop or mobile version? ), but are these apps the only way? Can't I just use Tidal and use something like airplay?
    Thanks for the suggestion, I am planning as setup a Modi Multibit plugged to a DIY class A amplifier that will push 5W to a pair of HE560 and this raspberry streamer will be the cherry on the cake \/
     
    Last edited: Apr 12, 2018
  20. gixxerwimp

    gixxerwimp Professional tricycle rider

    Pyrate
    Joined:
    Sep 30, 2015
    Likes Received:
    5,773
    Trophy Points:
    113
    Location:
    small island claimed by China
    Discussion transferred from here.

    I switched to the USB hub for power from a standard wallwart charger, but I think my original problem of it going to "sleep" was fixed by disabling power save mode on integrated Wi-Fi as described above.

    I've been using the browser web GUI on PC and Android to control Volumio. It's fairly stable from the PC, but frequently takes a crap when controlled by phone browser, especially if doing something more complex like searching for an artist and then loading up the queue. Firefox seems a bit better than Chrome, but they both crap out eventually. I didn't bother with any of the Volumio compatible control apps as all the reviews basically said they sucked.

    I'll install Hi-Fi Cast on my phone and try it when I get home, but can you describe your setup in more detail?

    I lost my second microSD card inside the couch, but I'll give this a try too..
     
    Last edited: Apr 29, 2018

Share This Page