the audio streaming series

networking - RPI dongle your net

I'd like to share an - IMO - nice alternative network setup solution for the RPI3 (It'll also work on the Pi Zero).




The solution will nicely add to, or you might also call it  - enhance -, earlier described networking solution.  









This time I'm going to bypass the actual PI onboard ethernet port.


Just to mention it once more. Using the onboard wifi is IMO not such a great idea!!!!
Usually you'll see EMI/RFI interferences and there's more load (HW and SW) on the system.  


UPDATE Nov-1-2018: With the introduction of the RPI 3B+ above statements no longer holds as a general statement.  I'm now using the internal WLAN of the 3B+.You might want to read this blog-post.


Just to mention it. On the Pi Zero you'd need a network dongle anyhow.


What you see on above image is - on the left - a USB3.0 GBIT/s dongle.
Usually you'll find these 
at around $12 at Amazon (the above Rankie comes with a Realtek RTL8153 networking chip inside, the kernel module that gets loaded is called "r8152" ) .
With such a GBIT dongle you can not achieve Gbit network speeds though! 
The internal RPI network infrastructure (USB2.0 bus) is just too slow. 
However, an achievable transfer-rate of around 300MBit/s will still make a nice factor 3 increase.
And than there are much tougher specs on USB3 devices which usually lead to higher overall quality of the whole unit. 

Such a dongle is usually plug'n play on the known RPI Audio operating systems. 
The kernel driver should load at boot automatically. 
You might have issues on distros like piCorePlayer, since they handle drivers differently - You'd need to install packages to enable the required add-on kernel modules (drivers). 
On PcP you'd have to install a package called "net-usb-KERNEL.tcz" (KERNEL needs to be replaced with your kernel revision shown at the bottom of the pCP screen) first. 


Have a look at Annex 1 below to see what has to be done on OS level.

Assuming so far you managed...
...now you can boot the PI with the dongle plugged in.  

Leave the ethernet cable on the PI onboard port first! 
ssh into your PI and see if the dongle is properly recognized (run "ifconfig"). 
You should see a 2nd ethernet ports (e.g. eth0/eth1) listed. If that's case, you're almost done.
Halt the device, switch the cable from onboard port to dongle and restart your PI. 
Now you can try to ssh into your PI again. 

Note: Please consider: The router will get you a new IP address assigned for the dongle!


There are IMO several advantages associated to such a dongle solution. 

1. You keep the networking stuff 10 inches further away from your audio gear
2. Usually these dongles come with better quality networking chips
3. They offer higher throughput 
4. These dongles run at around $10 only - no big risk to loose much


So far so good.

What we can't change. We won't get around that poor combined USB/ethernet structure on the RPI.  We have to live with that for the time being. 


Now. Let me explain the 2nd part of my solution.

I had an Audioquest Jitterbug USB filter around. It's been sitting idle for a while. 
I had the Jitterbug replaced by an active and IMO better performing iFi iPurifier filter for my desktop audio system. Since I ran HAT DACs only nowadays - all that USB stuff is sitting idle. 

The Jitterbug, a passive USB filter, is supposed to reduce all kind of noise artifacts on your USB port/link. It's actually been built to clean up your USB-AUDIO connection. 
Luckily the filter works two-ways - in and out!
I thought, it can't hurt to try the filter on the network dongle, basically shielding the RPI&HAT a little. 

I thought, if that filter cleans up the USB port for a DAC, why not using it for that potentially dirty networking dongle. 

Just plug it in and see!

Bottom line.

All in all I'd say, the entire approach is well worth the effort. I wouldn't run my main audio system without it anymore. 

As usual. Don't run and buy that stuff immediately! Don't expect night and day differences. 

And. Try the USB filter first!

Note:
If you'd use one of the special cables from the earlier mentioned networking thread, transmission speed is limited to 100MBit/s. 
Even with this limitation, IMO the exercise is still worth it!


Enjoy.

*************************************************************************************************

Annex1: eth1 -- 2nd ethernet port OS specific configurations

Arch Linux Arm

1.

sudo su

2.

copy paste below

###########################
cat > /etc/netctl/eth1 <<'EOF'
Description="A 2nd dhcp ethernet connection"
Interface=eth1
Connection=ethernet

IP=dhcp
EOF
sync
###########################

3.

halt the system and restart


Raspbian 
1.

sudo su

2.

copy paste below


###########################
cp /etc/network/interfaces /etc/network/interfaces.orig
cat >>/etc/network/interfaces <<'EOF'
auto eth1
allow-hotplug eth1
iface eth1 inet dhcp
EOF
sync
###########################

3.

halt the system and restart


piCorePlayer


I added a separate article for this exercise into the framework of the "The Audio Engine" series.

4 comments:

  1. "You might have issues on distros like PiCorePlayer, since they handle drivers differently - they use packages which you might have to load manually first."
    Hi Klaus,
    I'm a long time happy follower of you advises and a basic linux user.
    Could you, please, give me some help doing this ?
    Best Regards,
    Alain

    ReplyDelete
    Replies
    1. Have a look at the article. I slightly updated it with hopefully relevant info for you. Let me know if it works for you.

      Delete
    2. Thank you Klaus.
      Have you heard about this ?
      http://www.pi2design.com/502dac.html
      It was an improvment to my HifiBerry Digi+pro, but the Kali + Piano is clearly better IMHO (compared the two mostly with high end headphones and all your tweaks/setups).
      I can send you (free of course) the PI2 design 502DAC if you want to look, listen or squeeze all you can from it ;-)
      Best Regards,
      Alain
      (alain_online @ diyaudio)

      Delete
    3. No. Not interested. Thx.
      Design pretty much looks like related Allo products. I've listened to so many of the TI PCM51xx... ...it's enough. ;)

      Soon we'll potentially see better HAT DAC products popping up, from e.g. Allo. They are working on a quality Sabre DAC HAT. That's what I'm waiting for.

      Enjoy.

      Delete