Hi guys!
I recently bought an ENC28J60 ethernet module from [price-up] SPI to Ethernet Module ENC28J60 – ElectroDragon. The libraries provided in this website didn't work for me so I'm using ETHER_28J60 and etherShield together. Here is the link to the libraries:
https://github.com/Waelson/ETHER_28J60
I tried to run a simple hello world code (from the examples) but it didn't work. Here is the code I tried to run:
// A simple web server that always just says "Hello World"
#include "etherShield.h"
#include "ETHER_28J60.h"
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; // this just needs to be unique for your network,
// so unless you have more than one of these boards
// connected, you should be fine with this value.
static uint8_t ip[4] = {192, 168, 0, 105}; // the IP address for your board. Check your home hub
// to find an IP address not in use and pick that
// this or 10.0.0.15 are likely formats for an address
// that will work.
static uint16_t port = 80; // Use port 80 - the standard for HTTP
ETHER_28J60 ethernet;
void setup()
{
ethernet.setup(mac, ip, port);
}
void loop()
{
if (ethernet.serviceRequest())
{
ethernet.print("<H1>Hello World</H1>");
ethernet.respond();
}
delay(100);
}
The code compiles but when I look up the ip address on my browser it says it can't find the webpage. I tried pinging the ip from my computer and I have attached the screenshot. I tried giving the device a static ip address based on the mac address but still didn't work.
I have zero background in networking. I live in a dorm. I have my own router in my room. I have the arduino plugged into my router. But I remember every time I wanted to use a new laptop in our dorm I had to first agree some terms on our dorm's network. I thought maybe the dorm network is blocking arduino from accessing to the network (maybe that's a stupid question, I don't know how this whole networking works).
I don't have a protected network (password). I do mac address filtering, and yes I did add the mac address of the arduino to the allowed devices. Arduino version is 1.0.5. and I'm using mac os x. One LED on the ethernet jack is always green and the other one rarely blinks and it's yellow.
I really need to get this working, any suggestion/help is highly appreciated. If you need extra info please just let me know.
Thanks a lot!