Cicero’s Ethernet Project

A couple of months back I posted a brief article about Cicero’s project to get an ENC28J60, low-cost ethernet module working with the ESP8266.  There was a something of a hiatus with the project, with no updates appearing for a while (due to “real life”™) getting in the way, but Cicero (Mark) has been back at work, putting up the project code on GitHub, along with hardware connection details.

I note that the current implementation only runs the ethernet hardware and not both WiFi and ethernet at the same time, so there might be some contention for resources there, but I don’t have an ENC28J60 module to test with.  If you do, Mark is looking for feedback and submissions for the project, so have at it!

On a related note, has anyone tried using a Wiznet 5200 or 5500 module (such as the Wiz-820io) for a wired connection?  They’re more expensive, and perhaps not quite as versatile, but there should be considerably less overhead on the ESP8266.  Let us know in the comments if you’ve built (or seen) such a beastie.

 

 

9 thoughts on “Cicero’s Ethernet Project

  1. Thanks for the writeup, I appreciate the interest:)
    You could run both the Ethernet and wifi at the same time, I just only allow one at a time (using the ifdef’s) because I’m still testing and want to limit the debug outputs to be for the ENC only. For me, I’m going to be running the wifi in AP mode allowing both interfaces – for the webserver. But for any external server/router connections (wifi in STA mode), I’ll only allow one type of connection at a time, mainly because I want to use the MAC address of the ESP for the ENC as well…saves cost and hassle that way. I will admit though, there could be memory (heap) issues there.

    Like

    • Mark,

      Thanks for clarifying that (and thanks for checking in 🙂 ). I’m just about to place an order for an ENC. Not because I have a project that needs it, but just because the whole concept just really tickles my fancy. Can I ask what it was that drove you to create it in the first place?

      -John-

      Like

      • My project is a distributed mqtt system ultimately, and having just wifi is potentially limiting. What if its a crowded/noisy area, dead zones, what if there’s an Ethernet backbone already there etc? Just knowing there’s a wired option available seems useful, and a good fall-back solution to any potential wifi issues that may creep up at different sites. Yeah its only 10BASE-T and throughput is quite slow, but its better than nothing. Plus, the fact that you can buy an ESP and ENC for about $5-6 combined cost is ridiculous.

        Liked by 1 person

  2. Two years later I don’t see anyone else working on this, and it is over my head. I’ve gone to the datasheet for the enc28j60 several times with the intention of implementing my own driver, and I just get exhausted trying to figure out where to start. I want to expand on an avr-based CDP/LLDP client device to add some simple wireless troubleshooting tools, so esp8266/esp32 look like great options to build on. I’ve looked everywhere for information and your project is the only one that I’m seeing. Everyone who asks anywhere gets the same “use a wiznet” answer. That’s great if you just want to get some packets, but I have a stack of enc28j60 boards, and I don’t care about anything except CDP/LLDP and ICMP.

    I’m posting because your project page is gone. Can I find your code anywhere else?

    Thanks

    Like

    • HI @acecace, drop me an email on “mark at cdelec dot co dot za” and I’ll help you out.
      I removed my project from github for several reasons, but dont mind sharing in private.

      Like

  3. Hi cicero, really good job to do this.
    Have you on project to test this ESP8266 + ENC28J60 with Pixel lights? It’s could be a very cool project.
    I worked with arduino before, but tested ESP for 2 weeks, and little problems appeared, like the connection with ENC.

    Is it possible to received your code, maybe it could help me to include pixel (WS2812 ..).
    Thanks a lot

    Like

  4. Hello,
    first of all, thanks a lot for this library!
    I am new to the esp world and I want to adapt my current project to it. Unfortunately I am guessing that I am already having trouble wiring up my esp8266/nodeMCU to the enc28j60. My current wiring looks like this:

    enc | esp
    ______________
    VCC -> 3V
    GND -> G
    RST -> RST
    CS ->
    SCK -> D5 (SCK)
    SI -> D7(MOSI)
    SO -> D6(MISO)
    WOL ->
    NT ->
    CLK -> SK

    I cloned this library into the Arduino libraries folder:
    https://github.com/kissste/esp8266-enc28j60-UIP-Ethernet
    I am also able to compile and upload all examples to the esp.

    I followed this esp pin-layout for the wiring:

    stefanfrings.de/esp8266/ (scroll down to NodeMCU to see the pin-layout table)

    Here is the enc I am using:

    When I am trying to test the UdpClient-example I get this output from the seiral monitor in the Arduino IDE:

    —startOfOutput
    1384, room 16
    tail 8
    chksum 0x2d
    csum 0x2d
    v4ceabea9
    ~ld

    Soft WDT reset

    ctx: cont
    sp: 3ffefbb0 end: 3ffefef0 offset: 01b0

    >>>stack>>>
    3ffefd60: ea000000 000000ff 3ffeeca4 4020478e
    3ffefd70: 4010679c 00000100 3ffeeca4 40204908
    3ffefd80: 3ffefe08 3ffeeca4 00000100 40204d9d
    3ffefd90: 3ffefe08 3ffeeca4 3ffefec8 40204edd
    3ffefda0: feefeffe 3ffefe10 3ffefec8 40203f0a
    3ffefdb0: feefeffe feefeffe 3ffefe18 40204000
    3ffefdc0: feefeffe feefeffe feefeffe feefeffe
    3ffefdd0: feefeffe feefeffe feefeffe feefeffe
    3ffefde0: feefeffe feefeffe feefeffe 3ffefe68
    3ffefdf0: 3ffefe60 3ffeeac8 3ffefec8 40204095
    3ffefe00: 3ffe89a0 00ffffff 3ffe89a0 0100a8c0
    3ffefe10: 3ffe89a0 0100a8c0 3ffe89a0 0600a8c0
    3ffefe20: 3ffe89a0 00ffffff feefeffe feefeffe
    3ffefe30: 3ffefe70 feefeffe feefeffe feefeffe
    3ffefe40: feefeffe feefeffe feefeffe 3ffeeec8
    3ffefe50: 3fffdad0 00000000 00000006 402040da
    3ffefe60: 3ffe89a0 0100a8c0 3ffe89a0 0100a8c0
    3ffefe70: 3ffe89a0 0600a8c0 00000003 0100a8c0
    3ffefe80: feefeffe feefeffe feefeffe 40204109
    3ffefe90: 3ffe89a0 0100a8c0 3ffe89a0 0600a8c0
    3ffefea0: 0001c200 0100a8c0 00000000 feefeffe
    3ffefeb0: feefeffe 00000000 3ffeeec0 402034c9
    3ffefec0: 3ffe89a0 0600a8c0 03020100 feef0504
    3ffefed0: feefeffe feefeffe 3ffeeec0 40205b24
    3ffefee0: feefeffe feefeffe 3ffeeed0 40100108
    <<<stack<<<

    ets Jan 8 2013,rst cause:2, boot mode:(1,2)

    ets Jan 8 2013,rst cause:4, boot mode:(1,2)

    wdt resetu can help me setting up my esp and enc for this library.
    —endOfOutput

    I hope you can find some time to help me setting up my esp and enc for this library. Please let me know if you need any further information.

    Best regards!

    Like

    • edsaib,

      First, you’re using a mish-mash, which doesn’t use Cicero’s library or the hardware connections described, so I’m afraid there isn’t going to be too much help available here. Having said that though, my first impression (as a hardware guy) is that you don’t have the chip-select (CS) signal on the ENC board connected, so nothing is going to work. That pin is normally connected to GPIO15 on the ESP8266 (which is D8 on the NodeMCU board). Before you connect it, search for “GPIO15” on this site to find the -safe- way to connect it so that your ESP doesn’t hang on boot.

      Good luck!

      -John-

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s