-
Notifications
You must be signed in to change notification settings - Fork 35
DHCP timeout and hostname fix, make both user settable #20
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
Conversation
- DHCP timeouts were a bit of a mess, the code was cleaned up. - The default was made 3 seconds vs 1 second which was too short for some DHCP servers. - The DHCP timeout is now settable with a new dhcp_timeout parameter for the WIZNET5K class.
- DHCP hostname was set wrong, by trying to add the binary version of the MAC, it became corrupt and was rejected by the DHCP server. Default is now fixed, "WIZnetXXXXXXXXXXXX" where X'es are MAC. - DHCP hostname is now settable on WIZNET5K class using 'hostname' keyword argument. If the string contains '{}', the MAC will be inserted in this position.
@xorbit Ok, this looks great and works well. Thank you for the PR! Tests OK with
I also tested setting a custom hostname: The custom hostname displays in my router's DHCP server client listing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is failing on the CI's formatting check, please check out this page for instructions for using Black formatting: https://learn.adafruit.com/improve-your-code-with-pylint/black?
Updating https://github.com/adafruit/Adafruit_CircuitPython_AHTx0 to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_AHTx0#1 from kattni/example-i2c-update Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.4.1 from 3.4.0: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#99 from Flameeyes/master Updating https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 to 1.2.1 from 1.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#22 from makermelissa/master > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#21 from adafruit/setup-py-disabled > build.yml: add black formatting check Updating https://github.com/adafruit/Adafruit_CircuitPython_LPS2X to 2.0.0 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_LPS2X#4 from adafruit/lps22 > build.yml: add black formatting check Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.4.0 from 1.3.2: > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#20 from xorbit/master > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#14 from adafruit/pylint-update Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.2.1 from 2.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_AzureIoT#16 from jimbobbennett/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.7.0 from 2.6.1: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#49 from kmatch98/background > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#48 from FoamyGuy/better_group_full_error Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.3.0 from 2.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#39 from rhooper/bugfixes > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#38 from rhooper/sequence-one-shot > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#40 from rhooper/pixelgrid Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 3.1.0 from 3.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#38 from brentru/on-message-enhancements Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_ILI9341
for some DHCP servers.
parameter for the WIZNET5K class.
of the MAC, it became corrupt and was rejected by the DHCP server.
Default is now fixed, "WIZnetXXXXXXXXXXXX" where X'es are MAC.
keyword argument. If the string contains '{}', the MAC will be
inserted in this position.