Hello,
First I would like to thank you for your work, checking the datasheet of the ENC chip I was very glad to find a library available for this module, considering the time it requires to implement all this, this is more than helpfull.
I am facing an issue while using the DHCP feature of the library: DHCP requests are sent perfectly and well-formed, but the replies seem to be simply ignored.
My setup if fairly simple:
--------- ---------
| ATMega| | DHCP |
--------- ---------
| |
----|-- -----|---- ---------------
| ENC |--------------| Router |----------------| workstation |
------- ---------- ---------------
I would like to exchange data between my workstation and the ATMega328 (not an Arduino, simply the µC running at 8MHz).
When observing traffic from my workstation, I get all requests emitted by the ENC28 module, and all replies coming from the DHCP box, but they are all ignored.
Here is the tcpdump log of this:
sudo tcpdump -ni eth0 ! ip6 and (port bootpc or bootps)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
04:02:29.597422 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 275
04:02:29.601458 IP 192.168.1.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
04:02:29.754674 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 287
04:02:33.764545 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 275
04:02:36.599097 IP 192.168.1.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
04:02:36.603527 IP 192.168.1.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
[...]
04:03:16.187336 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 287
04:03:20.199941 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 275
04:03:22.820244 IP 192.168.1.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
04:03:22.824750 IP 192.168.1.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
04:03:23.063464 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:01:02:03:04:05, length 287
And this is going on until the client timeouts.
While running the TcpClient example, and modifying just one line to look like this "Ethernet.begin(mac, IPAddress(192,168,1,65));", it works like a charm and I receive data:
netcat -l -p 5000
DATA from Client
I am running the library from this commit: 160df53 (tag UIPEthernet_v1.06).
My arduino is "arduino-core 1:1.0.1+dfsg-7" from Debian Wheezy repositories.
If you need any more informations I may have forgotten, I'll be glad to provide them.
Regards,
Hugo