TMLKyza
Posts: 2
Joined: Wed Jun 29, 2016 10:41 am

enc28j60 on pi Zero

Wed Jun 29, 2016 11:01 am

Hi guys i have a really annoying problem. ive connected my module at my pi correctly (double checked), it turns on (i have a red led lit up, and my switch recognize it), so i decided to run an ifconfig but there was only the loopback interface, than i tryed to run a dmesg and it prompts this:

enc28j60 spi0.0: enc28j60 Ethernet driver 1.01 loaded
enc28j60 spi0.0: enc28j60 chip not found
enc28j60 : probe of spi0.0 failed whit error -5

can someone help me ? it's 2 days that im trying to figure it out i followed this guy too but nothing seems to work (http://raspi.tv/2015/ethernet-on-pi-zer ... on-your-pi)

Sorry for my bad english.
thanks to everyone!

User avatar
karrika
Posts: 1072
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: enc28j60 on pi Zero

Wed Jun 29, 2016 12:01 pm

Will it help to look at Miscap. It works well and you can see both the schematics of how to connect it and setting up the devices.

http://discohat.com/miscap/

My guess is that the MISO, MOSI or SCLK pins are not correctly connected.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: enc28j60 on pi Zero

Wed Jun 29, 2016 5:21 pm

karrika wrote:My guess is that the MISO, MOSI or SCLK pins are not correctly connected.
More likely is missing the interrupt pin on the ENC28J60 that needs to go to GPIO25.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

TMLKyza
Posts: 2
Joined: Wed Jun 29, 2016 10:41 am

Re: enc28j60 on pi Zero

Wed Jun 29, 2016 5:28 pm

Thanks dude that scheme is so good it actually worked! i swapped one pin whit another i dont know how

ViaBitz
Posts: 15
Joined: Tue Mar 22, 2016 2:36 pm

Re: enc28j60 on pi Zero

Wed Jun 29, 2016 6:31 pm

I have a couple of these bare boards left, just need to plug in a cheap enc28j60 module, solder on pin headers / socket and should work on a Pi zero too!

viewtopic.php?p=986825#p986825

shawaj
Posts: 113
Joined: Wed Oct 03, 2012 3:36 am

Re: enc28j60 on pi Zero

Thu Jul 14, 2016 11:52 am

does it definitely need the interupt pin connected to work correctly?

Thanks
Support The MagPi by purchasing printed copies from one of our retailers - http://themagpi.com/en/buy

Please share with anyone who is interested!

User avatar
karrika
Posts: 1072
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: enc28j60 on pi Zero

Thu Jul 14, 2016 12:24 pm

I assume that the only thing the interrupt does is to schedule the event to the kernel. I don't know if the kernel polls the data by itself if the pi does not send out anything. But my guess is that everything works as long as you keep sending something even when the interrupt is disconnected.

But if the pi does not send anything I don't believe that the pi will receive anything. Just guessing...

User avatar
HermannSW
Posts: 1666
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: enc28j60 on pi Zero

Tue Jul 26, 2016 2:06 pm

I really had problems in getting Raspberry Pi Zero internet access with OTG USB cable connection, no tutorial or instruction worked.

Today I found the cool idea of using enc28j60 network module I bought back in March for my Arduinos (for 4$ at that time). I found German instruction first, followed it and all was fine:
http://tutorials-raspberrypi.de/raspber ... -enc28j60/

Here is an english instruction as well:
http://raspi.tv/2015/ethernet-on-pi-zer ... on-your-pi

It was really easy and worked without any issues on my Raspbian 4.4.9+:
Image

Surfing with Raspbian browser was not that quick, but I was able to visit raspberrypi.org, arduino.cc, and login to aliexpress.com and amazon.de for looking up old orders.

Finally I remembered testmy.net and did measure what my ethernet cable was able to deliver. 4.7Mbit is nice for enc28j60 over SPI, but the same cable plugged into Ubuntu desktop gives 90.62Mbps:
http://testmy.net/db/Wgb4r5V3c
http://testmy.net/db/1KGtYLPT9


I am really happy that Raspberry Pi Zero now has internet access since I tried many many times to install kernel headers for compiling kernel modules without success, because most instructions did not help as they required internet access:
viewtopic.php?f=63&t=155241&p=1014413#p1014413


Hermann.

Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

bob808
Posts: 22
Joined: Thu Jun 27, 2013 11:59 am

Re: enc28j60 on pi Zero

Thu Sep 12, 2019 6:48 pm

I am interested in using a Zero with pihole and want to add ethernet. Would there be any loss in performance for the pihole this way? I only have 3-4 devices in my network.
I'm not so interested in max download/upload speed as I'm interested in low lag. Would it be faster to use a Pi 2 with integrated ethernet, use a usb to ethernet adapter on the zero, or add one of these boards on spi?

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: enc28j60 on pi Zero

Thu Sep 12, 2019 7:26 pm

bob808 wrote:
Thu Sep 12, 2019 6:48 pm
I am interested in using a Zero with pihole and want to add ethernet. Would there be any loss in performance for the pihole this way?
ENC28J60 runs at 10MBps (100 times slower than the gigabit ethernet on RPi3B or 4B) - so you've going to notice things going slow if all of your traffic runs through that narrow pipe.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
HermannSW
Posts: 1666
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: enc28j60 on pi Zero

Fri Sep 13, 2019 11:51 am

DougieLawson wrote:
Thu Sep 12, 2019 7:26 pm
... (100 times slower than the gigabit ethernet on RPi3B or 4B) ...
Not true for Pi3B.
  • Pi4B 1Gbps
  • Pi3B+ 300Mbps
  • Pi3B 100Mbps
  • Pi2B 100Mbps
  • enc28j60 10Mbps
So only 10× less throughput with enc28j60 compared with Pi2B OP asked for, not sure about latency.
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Interfacing (DSI, CSI, I2C, etc.)”