Skip to content

uos.uname ().nodename should report dchp_hostname if set, need way to specify node. #6589

Open
@tombelpasso

Description

@tombelpasso

The nodename returned by uname seems to be hard coded.
To be compatible with RPi and PC it should specify the network hostname.

There should be a way to change the nodename and use that as default for network hostname.

Test code.

from uos import uname
import network
uname()
(sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13 on 2020-09-02', machine='ESP32 module with ESP32')

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)

wlan.config(dhcp_hostname="lora32-01")
wlan.config('dhcp_hostname')
'lora32-01'

NOTE: nodename should be same as dhcp_hostname: 'lora32-01'

uname()
(sysname='esp32', nodename='esp32', release='1.13.0', version='v1.13 on 2020-09-02', machine='ESP32 module with ESP32')

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions