fjr
Posts: 102
Joined: Thu Aug 15, 2013 8:18 pm

ENC28J60 RJ45 Ethernet LAN Network Module on raspberry pi0?

Sun Jan 03, 2016 1:23 pm

http://www.amazon.com/ENC28J60-Ethernet ... rnet+board Can you get ethernet by connecting this board to the raspberry pi's gpio?
What about software?
Thanks.

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Sun Jan 03, 2016 1:46 pm

Although this is advertised as an Arduino board, and Amazon do not seem to provide instructions, there are Arduino instructions here: http://www.instructables.com/id/Add-Eth ... ess-than-/

You will have to translate the Arduino Pins to Pi GPIO pins, and modify the code shown to work with the Pi libraries. All the Arduino code required should be available with a bit of looking on the internet.

Now, whether it is a good idea to try this - translating Arduino stuff - is a different question. Luckily someone else has worked this out here: http://raspi.tv/2015/ethernet-on-pi-zer ... on-your-pi

There may be other solutions - try looking on the internet ;)

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Sun Jan 03, 2016 2:32 pm

viewtopic.php?p=853109#p853109
DougieLawson wrote:There's already an overlay in /boot/overlays for the ENC28J60.

Add

Code: Select all

dtoverlay=enc28j60,int_pin=25,speed=12000000
to /boot/config.txt
That uses CE0 on /dev/spidev0
https://github.com/raspberrypi/linux/bl ... verlay.dts
If you change things around you'll need to build a new DTS/DTB.
Doug.
Building Management Systems Engineer.

User avatar
DougieLawson
Posts: 38899
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Sun Jan 03, 2016 6:03 pm

fjr wrote:http://www.amazon.com/ENC28J60-Ethernet ... B00QEX5YUS Can you get ethernet by connecting this board to the raspberry pi's gpio?
What about software?
Thanks.
It only runs at 10Mbps but it supports IPv6. It does work. They're cheaper from eBay.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

GaryH
Posts: 3
Joined: Thu Jan 14, 2016 8:41 pm

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Thu Jan 14, 2016 9:03 pm

Yes, I have this working on a RPi 2 running Jessie. I will try it on a zero in a few days. No additional software is needed. The board uses the SPI interface and the wiring is:

Board -> RPi
GND -> GND (Pin 20)
VCC -> 3.3V (Pin 17)
CS -> CE0 (Pin 24)
SCK -> SCLK (Pin 23)
SI -> MOSI (Pin 19)
SO -> MISO (Pin 21)
INT -> GPIO 25 (Pin 22)

To load the driver edit /boot/config.txt:
> sudo nano /boot/config.txt

and add at the bottom of the file:
# ENC28J60 Ethernet module
dtoverlay=enc28j60

Save and exit, reboot. After the reboot, execute ifconfig, you should see eth1 with a IPV4 and IPV6 address.

That's it!
Last edited by GaryH on Thu Jan 21, 2016 1:53 pm, edited 1 time in total.

DirkS
Posts: 10349
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Thu Jan 14, 2016 10:22 pm

Next, add the ethernet interface, edit /etc/network/interfaces:
> sudo nano /etc/network/interfaces

and add:
# ENC28J60 module
iface eth1 inet dhcp

after the iface eth0 inet dhcp line.
Not necessary on the Zero. Which makes configuring it easy, since you only need to edit config.txt

GaryH
Posts: 3
Joined: Thu Jan 14, 2016 8:41 pm

Re: ENC28J60 RJ45 Ethernet LAN Network Module on raspberry p

Thu Jan 21, 2016 1:55 pm

Removed interfaces edit from post.

Return to “Beginners”