37 |
37 |
38 if (f == NULL) { |
38 if (f == NULL) { |
39 // No configuration yet, create it. |
39 // No configuration yet, create it. |
40 esp_efuse_mac_get_default(mac_addr); |
40 esp_efuse_mac_get_default(mac_addr); |
41 config.Version = 1; |
41 config.Version = 1; |
42 sprintf(config.hostname, "pressure-%02x%02x%02x", mac_addr[3], mac_addr[4], mac_addr[5]); |
42 sprintf(config.hostname, "co2meter-%02x%02x%02x", mac_addr[3], mac_addr[4], mac_addr[5]); |
43 config.mqtt_server[0] = '\0'; |
43 config.mqtt_server[0] = '\0'; |
44 config.mqtt_port = 1883; |
44 config.mqtt_port = 1883; |
45 config.mqtt_user[0] = '\0'; |
45 config.mqtt_user[0] = '\0'; |
46 config.mqtt_pwd[0] = '\0'; |
46 config.mqtt_pwd[0] = '\0'; |
47 sprintf(config.uuid, "c0ffeeee-dead-beef-cafe-%02x%02x%02x%02x%02x%02x", |
47 sprintf(config.uuid, "c0ffeeee-dead-beef-cafe-%02x%02x%02x%02x%02x%02x", |