Skip to content
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

ESP32 DHCP hostname is not set correctly #1084

Closed
UncleGrumpy opened this issue Mar 1, 2024 · 0 comments
Closed

ESP32 DHCP hostname is not set correctly #1084

UncleGrumpy opened this issue Mar 1, 2024 · 0 comments

Comments

@UncleGrumpy
Copy link
Collaborator

UncleGrumpy commented Mar 1, 2024

When using AP+STA mode the logs report the correct hostname change, for example:

I (1220) network_driver: DHCP hostname set to atomvm-MACADDRESS

But the name cannot be resolved by the DHCP server, and running host on the assigned IP address shows the host name as espressif, if multiple AtomVM devices are connected to the network they all have the same default host name of espressif.

I have observed the same result with builds from all AtomVM supported versions of ESP-IDF (v4.4 through v5.1).

This behavior is not observed when the device is use only in STA mode.

bettio added a commit that referenced this issue Mar 2, 2024
Fixed setting DHCP hostname in STA+AP mode.

This PR fixes a bug that would cause the DHCP hostname to not get properly set
when the device is configured in STA+AP mode.  As a consequence, the default
DHCP hostname (`espressif`) would be used, which would obviously be problematic
on a network running multiple IoT devices.

With this fix, the DCHP hostname is properly set, both in AP and STA modes, and
in fact can be set differently in config, if desired.

Closes #1084.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
@fadushin fadushin closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants