diff options
| Commit | 65e275c181b3529a3b6e2852aae59a046f3fc5fd (patch) | |
|---|---|---|
| Author | 2024-05-30 15:32:03 +0300 | |
| Committer | 2024-05-30 15:32:03 +0300 | |
| Files | 444ad3fdd92b4a279dd365ab105ea461b48452a3 | |
| uni-projects-65e275c181b3529a3b6e2852aae59a046f3fc5fd.tar uni-projects-65e275c181b3529a3b6e2852aae59a046f3fc5fd.tar.gz uni-projects-65e275c181b3529a3b6e2852aae59a046f3fc5fd.zip | ||
| Parent | 3383a602c8252ff9b334e32ec251f8e27d815dfb (diff) | |
[iot/goam] Update hostname
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 |
