Sunday, August 13, 2017

networking - RPI dongle your net

I'd like to share an - IMO - nice alternative network setup solution for the RPI3.



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 onboard ethernet port.


Note: Just to mention it once more. You hopefully do not use the onboard wifi!!!!  

BTW: On the Pi Zero you'd need such a dongle anyhow.

What you see is - on the left - a USB3.0 GBIT/s dongle. Usually you'll find these 
at around $12 at Amazon ( the Rankie uses a Realtek RTL8153 inside, the kernel module that usually gets loaded automatically is "r8152" ) .
With such a GBIT dongle you can not achieve Gbit network speeds though! 
The internal RPI structure is just too slow. 
However, a 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 quality), for such as above dongles. This nice goody won't hurt, even if used on USB2 ports.

Such a dongle is usually plug'n play on the known RPI Audio operating systems. 
The driver should load at boot automatically. 
You might have issues on distros like PiCorePlayer, since they handle drivers differently - they use packages to enable add-on kernel modules (drivers). On PcP you'd have to load
a package called "net-usb-KERNEL.tcz" (KERNEL needs to be replaced with your kernel rev) first. You probably have to load one of these manually. 

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

...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 port 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: You might get a new IP address 
assigned for the dongle.

Optional, you can turn the PI onboard ethernet off.  That's what I do by script.


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.

The pity.  After all, you still can't get around that poor combined USB/ethernet structure on the RPI.  We have to live with that. 


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 much better iFi iPurifier filter for my desktop audio system - which is also sitting idle nowadays. 
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. In both ways - in and out!

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

Done!

Result: Very nice. 

Bottom line.

Altogether 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 day and night differences. But. If you have a filter around - Give it a try.


Note:
If you'd use one of the special cables from the earlier mentioned networking thread, transmission speed goes down to 100MBit/s. But the exercise is IMO 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


PcP


????? - you might want to talk to the PcP team over at DIY-AUDIO

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