diff options
3 files changed, 6 insertions, 0 deletions
| -rw-r--r-- | Year 3/Internet of things/goam/main/Kconfig.projbuild | 3 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/wifi.c | 2 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/sdkconfig | 1 |
diff --git a/Year 3/Internet of things/goam/main/Kconfig.projbuild b/Year 3/Internet of things/goam/main/Kconfig.projbuild index f2a1231..e148a0a 100644 --- a/Year 3/Internet of things/goam/main/Kconfig.projbuild +++ b/Year 3/Internet of things/goam/main/Kconfig.projbuild @@ -1,4 +1,7 @@ menu "GoAm configurations" + config NETWORK_HOSTNAME + string "Hostname with which the device will appear on the network" + default "GoAm IoT camera" menu "Display layout" config DISPLAY_ICONS_ROW int "Row on which information icons will be shown" diff --git a/Year 3/Internet of things/goam/main/wifi.c b/Year 3/Internet of things/goam/main/wifi.c index e1e97b8..2c055f6 100644 --- a/Year 3/Internet of things/goam/main/wifi.c +++ b/Year 3/Internet of things/goam/main/wifi.c @@ -38,6 +38,8 @@ static void netif_init() { esp_netif_t *sta_netif = esp_netif_create_default_wifi_sta(); assert(sta_netif); + + ESP_ERROR_CHECK(esp_netif_set_hostname(sta_netif, CONFIG_NETWORK_HOSTNAME)); ESP_LOGI(TAG, "NETIF initialized"); } diff --git a/Year 3/Internet of things/goam/sdkconfig b/Year 3/Internet of things/goam/sdkconfig index 2aa008a..053b816 100644 --- a/Year 3/Internet of things/goam/sdkconfig +++ b/Year 3/Internet of things/goam/sdkconfig @@ -343,6 +343,7 @@ CONFIG_PARTITION_TABLE_MD5=y # # GoAm configurations # +CONFIG_NETWORK_HOSTNAME="GoAm IoT camera" # # Display layout |
