Pages: [1]   Go Down
Author Topic: Ethernet Shield ENC28J60 with Uno Rev3  (Read 5604 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having difficulties with getting to work this two together. I have tried other libraries and was not able to get them working. Other stuff (such as sensors and led) is working fine.

I am using Arduino Uno Rev3
Ethernet Shield for Arduino Uno R1 R2 R3 - ENC28J60 RJ45 - http://goo.gl/JEIX5
Arduino-1.0.1 software
Ubuntu 11.04

The problem is that it cant get an ip address from router. I have also tried declaring static ip and it didnt work. All this I tried without adding any other libraries.

I also tried other libraries such as
http://code.google.com/p/flamingoarduino
https://github.com/thiseldo/EtherShield

I also found this thread http://arduino.cc/forum/index.php/topic,27556.0.html but most of the links are not working anymore.

When I tried it with flamingoarduino I got this error:

Code:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:18:55: error: WConstants.h: No such file or directory
arduino-1.0.1/libraries/EncEthernet/enc28j60.c: In function ‘enc28j60ReadOp’:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:46: error: ‘LOW’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:46: error: (Each undeclared identifier is reported only once
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:46: error: for each function it appears in.)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:60: error: ‘HIGH’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c: In function ‘enc28j60WriteOp’:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:66: error: ‘LOW’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:73: error: ‘HIGH’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c: In function ‘enc28j60ReadBuffer’:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:78: error: ‘LOW’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:92: error: ‘HIGH’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c: In function ‘enc28j60WriteBuffer’:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:97: error: ‘LOW’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:109: error: ‘HIGH’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c: In function ‘enc28j60Init’:
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:163: error: ‘OUTPUT’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:164: error: ‘HIGH’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:170: error: ‘INPUT’ undeclared (first use in this function)
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:173: error: ‘LOW’ undeclared (first use in this function)

I have then removed Ethernet library that comes with IDE and tried again and the problem was the same.

Maybe there is a problem with the version of Arduino IDE. I dont know. Does anybody have library that will work with this shield? I am fairly new to Arduino and I just cant seem to figure it out.

Update: Every sketch it tried was from examples that came with the specific library.

Thnx in advance.
« Last Edit: September 14, 2012, 05:01:13 am by mitjafelicijan » Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 112
Posts: 5284
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried this library: http://jeelabs.net/projects/11/wiki/EtherCard?

I don't own a ENC28J60 hardware but there were several successful projects using this library with that hardware in the forum.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 653
Posts: 50881
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
arduino-1.0.1/libraries/EncEthernet/enc28j60.c:18:55: error: WConstants.h: No such file or directory
That library clearly has not been update for 1.0(+). Feel free to do so.
Logged

Belgium
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Just Do it (with Arduino of course)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Support and development for the "old" Ethernet libraries for ENC28J60 were stopped more than one year ago. The best library (1.0 compatible) to use now is EtherCard from jcw (on Github).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To solve this you should copy arduino-1.0.1/hardware/arduino/cores/arduino/Arduino.h into your working sketch folder and change

#include "WConstants.h"

to

#include "Arduino.h"
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 112
Posts: 5284
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't have to copy Arduino.h, just include it.
Logged

Pages: [1]   Go Up
Jump to: