Arduino 101 and ENC28J60

Hello all,

I am having a bit of trouble using my ENC28J60 module with an Arduino 101. When compile example sketches there are dependencies missing, I am guessing this is due to hardware differences in the Arduino board.

For UIPEthernet and ETHER_28J60 libraries I am getting:

fatal error: avr/io.h: No such file or directory

#include <avr/io.h>

And for EtherCard library I am getting:

fatal error: avr/eeprom.h: No such file or directory

#include <avr/eeprom.h>

Are there alternative libraries that I can substitute for the 101?

Many thanks,

Nick

Hi Nick,
the UIPEthernet is platform agnostic and should work with 101.
Instead, ETHER_28J60 is avr only compatible since it uses avr registers (take a look here arduino-projects/enc28j60.c at acae4b0abd743ee0ca64a91f8ea50da208a07692 · muanis/arduino-projects · GitHub )
The library should be ported to common SPI transaction interface and then it will also work with 101.
Maybe someone else in the forum is interested in doing the porting?

facchinm:
Hi Nick,
the UIPEthernet is platform agnostic and should work with 101.
Instead, ETHER_28J60 is avr only compatible since it uses avr registers (take a look here arduino-projects/enc28j60.c at acae4b0abd743ee0ca64a91f8ea50da208a07692 · muanis/arduino-projects · GitHub )
The library should be ported to common SPI transaction interface and then it will also work with 101.
Maybe someone else in the forum is interested in doing the porting?

Thank you for your reponse, I am happy to use UIPEthernet library, but it still throws a fatal error when compiling.

Error compiling.
C:\Users\Nick\Documents\Arduino\libraries\arduino_uip-master\utility\Enc28J60Network.cpp:29:20: fatal error: avr/io.h: No such file or directory

#include <avr/io.h>

What can I use in place of avr/io.h ?

Many thanks,

Nick

Sorry to bump, not sure if allowed, but any solutions? Many thanks

Not really allowed but useful since I missed your response :slight_smile:
If you could link me the git repository of the library you are using it would be great since I believe I’m taking a look at the wrong sources.
The <avr/io.h> missing error can appear due to a misconfiguration of the library (and I could help you in that case) or the library can be avr-only (and in this case it needs to be ported to 101 architecture, maybe by its author)

Thank you for your response :slight_smile:

This is the git repo I have been using, I just downloaded the master as a zip and installed the library using the Arduino IDE.

I am in the process of completely removing the Arduino IDE and starting again from fresh to check whether any other ENC28J60 libraries I tried are causing problems!

EDIT: After a clean reinstall, deleting all custom libraries out of AppData and Program Files still fails to compile on <avr/io.h>

Got it.
The library is indeed AVR-only (architectures=avr) so it also doesn't work for Zero and Due.
If you find the library useful and you need some assistance in porting it to 101 you can ask the "Software Development" section of the forum or directly to the creator opening an Issue on github.

Well I have no preference over library, I just bought a cheap ENC28J60 board off eBay, and if I am correct I don't believe the standard Ethernet library will work with it?

This is a picture of the board I have below, I am just simply trying to get it to work with the 101. The 101 is my first Arduino board so I am not tied to a particular library or method of talking to the device, I am new to this and open to suggestion :slight_smile:

I am also using the Ethernet Adapter ENC28j60C with arduino Due with Ethercard.h library but facing the same problem, During compilation of simple example it shows me a fatal error.

fatal error: avr/eeprom.h: No such file or directory

#include <avr/eeprom.h>

Any poiters will be most appreciable.