Error "Ethernet has not been declared" while try to compile rbbb server example.

I am using below Open source Code to test my Ethernet sheild connected to Uno . Seems Everything is fine but when I try to compile or upload its comming up with error ; ‘Ethernet has not been declared’ and There are few other error probally causing because of the Main error ;
rbbb_server:11: error: ‘Ethernet’ has not been declared
rbbb_server:12: error: ‘BufferFiller’ does not name a type
rbbb_server.ino: In function ‘void setup()’:
rbbb_server:15: error: ‘ether’ was not declared in this scope
rbbb_server:15: error: ‘Ethernet’ has not been declared
rbbb_server:17: error: ‘ether’ was not declared in this scope
rbbb_server.ino: In function ‘word homePage()’:
rbbb_server:25: error: ‘bfill’ was not declared in this scope
rbbb_server:25: error: ‘ether’ was not declared in this scope
rbbb_server.ino: In function ‘void loop()’:
rbbb_server:39: error: ‘ether’ was not declared in this scope.

if someone can help me fix this issues it will be grateful Thank you

// This is a demo of the RBBB running as webserver with the Ether Card
// 2010-05-28

//#include <Ethernet.h>
#include <EtherCard.h>

// ethernet interface mac address, must be unique on the LAN
static byte mymac = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
static byte myip = { 192,168,1,203 };

byte Ethernet::buffer[500];
BufferFiller bfill;

void setup () {
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
Serial.println( “Failed to access Ethernet controller”);

static word homePage() {
long t = millis() / 1000;
word h = t / 3600;
byte m = (t / 60) % 60;
byte s = t % 60;
bfill = ether.tcpOffset();
“HTTP/1.0 200 OK\r\n”
“Content-Type: text/html\r\n”
“Pragma: no-cache\r\n”
“RBBB server”


h/10, h%10, m/10, m%10, s/10, s%10);
return bfill.position();

void loop () {
word len = ether.packetReceive();
word pos = ether.packetLoop(len);

if (pos) // check if valid tcp data is received
ether.httpServerReply(homePage()); // send web page data

rbbb_server.ino (1.2 KB)

Use code tags when posting code!

Sure, the compiler will error out if you don’t include the Ethernet library:

#include <EtherCard.h>

The EtherCard library is no drop-in replacement for the Ethernet library so if you want to use code that was written for the Ethernet library with the EtherCard library you have to make huge changes, more or less rewrite the whole network code.

UIPEthernet is much more like the original Ethernet library (it tries to be a drop-in replacement), so you might give it a try: GitHub - ntruchsess/arduino_uip: UIPEthernet: A plugin-replacement of the stock Arduino Ethernet library for ENC28J60 shields and breakout boards. Full support for persistent (streaming) TCP-connections and UDP (Client and Server each), ARP, ICMP, DHCP and DNS. Build around Adam Dunkels uIP Stack. Further developed version can be found on

Thank you. i had to rename the library as it was called Ethernet card Master before had to change to EtherCard.