Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hostname to Wifi Connection #203

Closed
wants to merge 3 commits into from

Conversation

intractve
Copy link
Contributor

Utilize ota_hostname variable from User_config.h to generate hostname for friendlier display on router's connected devices instead of ESP_xxxxxx

Add hostname setting to both Manual and WifiManager setups

Utilize ota_hostname variable from User_config.h to generate Hostname for friendlier display on router's connected devices instead of ESP_xxxxxx  

Add hostname setting to both Manual and WifiManager setups
@intractve
Copy link
Contributor Author

The modifications are inside the if statements for ESP8266 or ESP32 only. Not sure why it's affecting Uno etc. in Travis CI

@1technophile 1technophile self-requested a review May 10, 2018 19:06
Copy link
Owner

@1technophile 1technophile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

Thanks for this PR, regarding arduino it seems that the hostName variable is already used in some arduino libraries:

OpenMQTTGateway:169: error: 'char hostName [30]' redeclared as different kind of symbol
 char hostName[30] = {0};

Maybe try to change the name of the variable.

For ESP32 it seems that there is no ESP.getChipId()) function available

OpenMQTTGateway:245: error: 'class EspClass' has no member named 'getChipId'
     sprintf(hostName, "%s-%06X", ota_hostname, ESP.getChipId());
                                                    ^
/usr/local/share/arduino/OpenMQTTGateway/OpenMQTTGateway.ino: In function 'void setup_wifi()':
OpenMQTTGateway:385: error: 'class WiFiClass' has no member named 'hostname'
   WiFi.hostname(String(hostName));

@1technophile 1technophile added this to the v0.8 milestone May 10, 2018
intractve added 2 commits May 11, 2018 02:08
Fix variable conflict for Arduino boards
Remove dependence on ESP.getChipId() as it is not available yet on ESP32.
@intractve
Copy link
Contributor Author

Closing this PR to come up with a better more inclusive solution that passes all tests

@intractve intractve closed this May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants