====== Add a Network Interface without using USB ======
\\
\\
The Pi Zero has the limitation of only having a single USB port. If you want to put your Pi Zero on the LAN, then you need to add a network port, this is normally done using a USB Nic.
\\
\\
I hate buying anything for the Pi Zero that costs proportionally more than the Pi Zero, and USB network adapters fall in to that category. Pay a few quid for one, and you only get a crappy unreliable Nic that is sold as USB2, but is normally an old USB 1.x and that fails all the time, believe me, I have tried a lot of them.
\\
\\
Then I came across this website [[http://raspi.tv/2015/ethernet-on-pi-zero-how-to-put-an-ethernet-port-on-your-pi]]
\\
\\
What they have done is used a network module that runs on the SPI bus. Its a cheap unit that you can get from ebay for around £3, and while they are cheap, they are reliable, albeit a little slow, but not so slow that they are unusable. I will take reliability over speed any day.
\\
\\
Here is the unit I purchased from eBay for £2.07p\\
{{:s-l1600.jpg?300|}}
\\
The seller on eBay is chips-fans and while it has the same part number as the one used on raspi.tv, the pins are different, which is a bit annoying, but it wasn't to hard to work out.
\\
\\
===== Connecting the NIC ======
\\
Here are the connections I used for this board:
\\
GPIO RPi Pin Nic PNo Nic Func
n/c 1 CLK
n/c 2 WOL
GPIO10 19 3 SI
GPIO08 24 4 CS
3v3 17 5 Vcc
GPIO25 22 6 NT
GPIO09 21 7 SO
GPIO11 23 8 SCK
n/c 9 RST
GND 20 10 GND
\\
===== Configuration =====
\\
Enable the SPI Pins:
\\
From the command line
sudo raspi-config
Advanced Options - SPI - Yes to Enable
\\
Add the following to your /boot/config.txt
\\
dtoverlay=enc28j60
\\
Now reboot the Pi
\\
\\
===== Updates =====
\\
WARNING!!! - I initially got kernel panics when I tested this unit, so using a standard USB nic, you need to do the following:
\\
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update (this forces a kernel update)
\\
===== Testing =====
\\
You can use a command line version of speedtest.net if you install it…
\\
sudo apt-get install python-pip
sudo easy_install speedtest-cli
Run it with speedtest-cli
\\
I am currently getting:\\
\\
4Mb/s Download\\
3Mb/s Upload\\
\\
The best part is that it is super reliable (and cheap) and we can still use the USB port for something else :)
\\
\\
{{:gpio_spi_nic.jpg?400|}}{{:gpio_spi_nic_2.jpg?400|}}
\\
\\