Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rp2/W5100S-EVB-PICO does not seem to send a hostname to DHCP server when getting address. #18024

@SteveSpencer

Description

@SteveSpencer

Port, board and/or hardware

rp2.W5100S-EVB-Pico (RP2040)

MicroPython version

MicroPython v1.26.0 on 2025-08-09; W5100S-EVB-Pico with RP2040

Reproduction

import network
import time
print('current hostname: {}'.format(network.hostname()))
nw = network.WIZNET5K()
nw.active(False)
nw.active(True)
while not nw.isconnected():
time.sleep(1)
print('hostname: {}'.format(network.hostname()))

Expected behaviour

Correctly prints the default hostname both times.
DNSmasq server should allocate address for that hostname, and be able to resolve hostname in normal way

Observed behaviour

While the hostname is shown as W5100S-EVB, dnsmasq cannot resolve the name, and in the leases file, no hostname is shown for the corresponding address.

Additional Information

If I use rp2/pico2_w port and perform the equivalent (which means connecting to an AP rather than plugging in a cable), I get the expected behaviour, so I believe it is something specific to hostname handling in the Wiznet NIC code.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextmodRelates to extmod/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions