-
Notifications
You must be signed in to change notification settings - Fork 35
DHCP Fails, prints f and returns a value that causes exception #75
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
Comments
It seems that There are two reasons that I can see for this test returning All three tests in
I suggest that the If this makes sense to you, I'm happy to make the changes, run some tests and issue a PR. I've been hacking away at this package for a while and I feel like I know my way around it. |
Wrapping around from 0x7fffffff to 0x00000000 doesn't raise that exception. |
Using this library on my home network, I am able to successfully connect once and sometimes even a few times re-running the same script. But after a few times it gets into a state where it will consistently fail every time it runs with this exception:
Digging in a bit I've found that the crux of the issue comes from here. On my network after a DHCP lease has been established once it seems this starts returning values that cause this condition to execute:
Adafruit_CircuitPython_Wiznet5k/adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py
Lines 257 to 260 in 04e2e21
This prints "f" and then returns
0,0
which cause the raised exception when one of the values is attempted to be used withint.from_bytes
I'm trying to understand what is the actual cause of this exception, and hoping that we can come up with something more helpful to print out than just "f" so that users can easier debug whatever the cause is.
Are there any cases where this condition can be True but aren't fatal errors? If it is always a fatal error we may as well raise it from here instead of printing "f" and returning if there are no cases that will continue anyway.
In troubleshooting I've found that if I simply comment out the return:
The code can run and successfully fetch data from online.
I don't really know anything about the specifics of DHCP so I'm unsure if this is expected or not. In my case though it seems this state is not actually fatal except for the fact that it's returning the bogus 0s. Commenting that out and allowing it to continue results in success.
The text was updated successfully, but these errors were encountered: