S
S
sempol2013-06-07 10:57:01
Arduino
sempol, 2013-06-07 10:57:01

Unable to connect Arduino Uno to internet via ENC28J60

Good afternoon everyone. I'm not quite sure if there are those here who have encountered a similar situation, but what if? The situation is this. I recently bought an ENC28J60 board (hereinafter, for brevity, I will call ENC) in order to organize the access of an arduino (Uno) to the Network. The connection was made according to this tutorial. For verification, I used a trial sketch of BackSoon (link to github, the code is there). The program connects to the network, receives an IP address via DHCP (or uses a static one, which is set in the code itself), issues this address to the Serial Monitor, and then turns the arduino into a kind of “web server” for a small test web page.

The device was assembled quite quickly, the Ethernet cable from ENC was connected to one of the LAN ports of the router (D-Link DIR300, official firmware 1.04), connected the power supply (the red power LED on the ENC is constantly on, the green and yellow on the ethernet connector are on or flash at different intervals), filled in the sketch. BackSoon thought for a long time, eventually issued DHCP Failed in the Serial Monitor. I turned on the static IP mode, the IP-shnik registered 192.168.0.200 (it’s definitely not busy with anything), I set the gateway (gw) to the same address that I go to the router’s admin panel (correct?), mac took the one that was in the example (also nothing not busy). This time, the same address, gateway and mac that I had previously set appeared in the port monitor, but when I try to access this address from a PC or ping it, there is no reaction.

Does anyone have any ideas what's wrong? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sempol, 2013-06-08
@sempol

It looks like the problem has been resolved.
It looks like the MAC address was the cause. Before that, I already changed it a couple of times, took poppies from different test sketches (before that, looking in the admin panel of the router so that the network did not have the same). Now, having stumbled upon one of the “Random MAC Generator” on the Web, I took the first generated MAC from there, drove it into the sketch - everything worked, including DHCP.

S
serafims, 2013-06-07
@serafims

www.lucadentella.it/en/2012/02/12/enc28j60-e-arduino-1/2/
try this option. supply more powerful power, the microcircuit eats a lot ...

D
dvkozyr, 2013-12-18
@dvkozyr

Also, as an option, there are some with a detailed description of both software and hardware from a compatriot:
we.easyelectronics.ru/electro-and-pc/podklyuchenie...
All this is ported to Arduino by editing a couple of lines (working with SPI).

R
Roman Konchakovsky, 2015-07-13
@Romeo91

all the best!
I myself faced a similar problem. the solution turned out to be the following: we connect everything, upload the sketch to the controller, then press the reset button on the Arduino, remove power from the ENC, supply power to the ENC, and then press the reset button on the Arduino. Or connect the ENC reset pin to the reset pin on the Arduino.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question