3

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?

enter image description here

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Patoshi パトシ
  • 551
  • 3
  • 9
  • 16

2 Answers2

1

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.

kba
  • 312
  • 1
  • 8
1

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 https://www.raspberrypi.org/documentation/usage/gpio/ to me – Peter Green Jul 10 '19 at 15:34