somakeit / smib

1 stars 0 forks source link

Configurable hostname for SMIBHID devices #101

Closed sam57719 closed 3 months ago

sam57719 commented 4 months ago

SMIBHID Wireless Networking - have config value so each device can have its own meaningful hostname.

I believe a ValueError exception will ne raised if the name is > 15 characters long.

sjefferson99 commented 4 months ago

@sam57719 You can set the hostname that is used for DHCP with machine.hostname("smibhid")

Or add in unique IDs as a default to help tell them apart if not renamed. UUID = machine.unique_id() machine.hostname(f"smibhid{UUID[-4:]}")

This was done in the Pimoroni Enviro repo, I can improve the networking module to support this with a config file entry for the hostname.