Which Raspberry Pi OS images support ENC28J60 Ethernet adapter natively? If none, how can this be installed via the command line and on which OS image?
2 Answers
A driver for the ENC28J60 has been in the Linux kernel for a few years, so I you should be able to interface with it.
As @RichardPennington wrote, you load the module with sudo modprobe enc28j60
.
-
-
You mean you got the ethernet controller wired to your Pi, installed Windows on it and it just loaded automatically?– kbaCommented Feb 18, 2016 at 15:50
-
2Loading the module alone won't work, you also need some device tree bits to tell the kernel where the device is. I don't recall the detaill offhand though. Commented Mar 3, 2016 at 1:17
With moderne disk images, the software part is trivial to get an ENC28J60 work on Raspberry Pi (I did not try yet on other Pis): edit /boot/config.txt and add this where you can:
dtparam=spi=on
dtoverlay=enc28j60,int_pin=25,speed=12000000
There may variations such as int_pin=27.
Note that there are several different enc28j60 boards which may have different pinout. So don't rely on photos (unless your ENC28 is absolutely identical to the one on the tuto).
Also note that the pinout labelled on the RaspIO board on your picture is completely wrong, and does not match the official pinout published by the Raspberry fondation (it matches the documentation of a third party library). If you are trying to reuse rPi documentation to adapt to other Pis, you must ignore the labelling on the picture, and use this table from instructables:
Pi ENC28J60 Colour
---------------------------------
+3V3 VCC Red
GPIO10/MOSI SI Green
GPIO9/MISO SO Yellow
GPIO11/SCLK SCK Blue
GND GND Black
GPIO25 INT Blue
CE0#/GPIO8 CS Green
Unlike what's said on the instructables page, some trivial variations are possible: ground may be plugged from pin 20 or 25, and interruption can be wired to an other GPIO (as long as you update the config line). Using CE1 is probably more tricky.
http://www.instructables.com/id/Super-Cheap-Ethernet-for-the-Raspberry-Pi/
http://raspi.tv/2015/ethernet-on-pi-zero-how-to-put-an-ethernet-port-on-your-pi
-
umm the pinout shows on the raspio board seems to match raspberrypi.org/documentation/usage/gpio to me Commented Jul 10, 2019 at 15:34