-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHCP ignoring replies #62
Comments
That is a bit strange as this is known to work since I enabled broadcast-receival on enc28J60-chip on Oct. 4th 2013: you might want to capture the packets using Wireshark and upload to http://www.cloudshark.org/ so I can compare bitwise to what my setup produces. |
Here you go: https://www.cloudshark.org/captures/46ecfd204d4a I made several captures since the beginning sequence is not always the same, even though I don't know if it's relevant with what is wrong. Hope it helps ! |
just to let you know, I won't have time to work on this before Apr. 28th... |
Not a problem, take your time. |
Hi, I'm back :-) packages look all good. But I remember there can be an issue with the compiler not including the memory that contains the initialization of static variables into the hexfile. Requires the parameter '-j .data' (or .rodata, not sure where static const will be placed) in the options-list of avr-objcopy. How do you build the code? |
I'll check how the code is built this evening and keep you in touch. |
The objcopy invocation is the following : "/usr/bin/avr-objcopy -O ihex -R .eeprom build/cli-ethernet.elf build-cli/ethernet.hex". Do you think removing the .eeprom section can cause the trouble ? |
Ok, I had some time to dig into the problem, and found out this is just a simple timeout. Anyway, thanks for your time, this library is great ! |
closing as this got solved |
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:
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
The text was updated successfully, but these errors were encountered: