← index #18024Issue #17974
Related · high · value 0.217
QUERY · ISSUE

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

openby SteveSpenceropened 2025-09-01updated 2025-09-09
bugextmod

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

CANDIDATE · ISSUE

Setting (WLAN) hostname on Pico W (still) has no effect: no host name is exposed (also not the default one)

closedby magnus-0opened 2025-08-22updated 2025-08-22
bug

Port, board and/or hardware

Pico W

MicroPython version

MicroPython v1.26.0 on 2025-08-09; Raspberry Pi Pico W with RP2040

Reproduction

  1. Create a WLAN with IF_AP and set hostname via network.hostname('test') or via deprecated WLAN.config(hostname = 'test')
  2. Confirm that the hostname is printed as such
  3. Conclude that no hostname is exposed when connected to the Pico W, not even the default one (CYW43)

Expected behaviour

Expected the hostname to be exposed as set (or at least as default)

Observed behaviour

No hostname is being exposed (not even the default one)

Additional Information

There was some writing of people re-building the firmware themselves whilst backing the hostname in it, but that's not a true solution for general Pico users.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied