Pi Zero Ethernet The Hard Way

[Alex@Raspi.tv] had the misfortune of blowing the USB hub and Ethernet port on a Raspberry Pi B+. He thought about using a cheap SPI to Ethernet board to rescue it, and while he bought the board, he never got around to interfacing it to the broken Pi. However, when he saw the Raspberry Pi Zero arrive and noticed that everyone wanted to connect it to the network, he remembered the SPI board, rescued it from his junk box, and a few hours later had Ethernet via Raspberry Pi GPIO working.

To make things easier, he got it all working on a Pi A first and then moved to the Zero. You’d think performance would not be very good, but measurements [Alex] made show it isn’t bad at all, considering:

Pi Zero at 12 MHz 3.33 Mbaud down, 2.82 Mbaud up, 39.956 ms latency, 52.19km
Pi Zero at 16 MHz 3.67 Mbaud down, 2.90 Mbaud up, 37.749 ms latency, 43.57km
Pi Zero at 20 MHz 3.88 Mbaud down, 3.10 Mbaud up, 42.474 ms latency, 43.57km

[Alex] notes that the Pi’s official 3.3V rail capacity doesn’t meet the requirements of the SPI Ethernet module he used. However, he also says it works, and he’s heard “unofficially” that it probably should work. We were not sure if he meant he heard the Pi’s 3.3V supply is underrated or if the consumption of the Ethernet chip is overstated.

We’ve seen a lot of Pi Zero hacks in the last week or two. The WiFi hack is similar, and there was an audio hack, too. Of course, there’s also the lively debate about if you should try to extend a Zero anyway.

22 thoughts on “Pi Zero Ethernet The Hard Way

    1. Should work with pretty much any ARM platform that uses device trees, which is most or all of the ones supported by upstream Linux. The feature that makes this so easy to do (device tree overlays) was developed for the Beaglebone originally, and you should be able to do the same thing on the C.H.I.P or many other boards too. (Incidentally, this wouldn’t have worked for the Pi in the first couple of years after it launched because they didn’t support device trees back then.)

    1. That looks pretty sweet. Could drive down the price of wireless access for all Pis, but is especially relevant in the Zero. It’s discouraging to spend more on the Internet access than the computer itself. Thanks for that link, I’ll be following that project. I’m always amazed at the new stuff I see everyday on the community site, and I’m sure I’m missing plenty of it

      1. j0z0r,

        I agree with you in 100%. It’s indeed very discouraging especially that we have only one USB port available.
        I played with using ESP8266 as a WiFi dongle and have some success in it.
        If anyone is interested how this could be done I prepared little text here: pwiatrowski.com/technology/raspberry-pi-zero-esp8266-internet/

        In short it requires esp-link firmware, socat and slattach.

        Cheers!

  1. The enc28j60 is a 10BASE-2 interface, theoretical max speed is 10 Mb/s but the practical one is lower, say 6Mb/s, so the speed benchmark results although not spectacular aren’t bad at all.

  2. This is brilliant. I saw it posted in the comments of an earlier article and I’m glad that it got its own post.

    That being said, it seems like every post about the Zero is adding back something removed from the B, negating its size and cost benefit. I can’t wait for a Zero project that takes advantage of the size for something that the B wouldn’t be able to do.

    Again, this project is great (and dead simple, love it) and my above comment is in no way meant to detract from that.

    1. I recognize that the Zero is in fact smaller but I don’t see how there is a size benefit. The regular Pi are so small already! Maybe if the Zero was down to implantable sizes or something… I only see the Zero as having a cost benefit not a cost one.

      Then again.. I have had thoughts about using a Pi in projects where I would desolder many of the connectors in order to reduce the height of the board. That isn’t the same as actually removing those features though as I would still be using them but with soldered jumpers rather than plug in connectors. I often wished they would come up with something just like the 2 but all the connectors would be in a baggie, not pre-soldered.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.