{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/3970","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/3970/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/3970/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/3970/events","html_url":"https://github.com/esp8266/Arduino/issues/3970","id":282158420,"number":3970,"title":"dhcp hostname issue in 2.4.0","user":{"login":"dragondaud","id":26858302,"avatar_url":"https://avatars3.githubusercontent.com/u/26858302?v=4","gravatar_id":"","url":"https://api.github.com/users/dragondaud","html_url":"https://github.com/dragondaud","followers_url":"https://api.github.com/users/dragondaud/followers","following_url":"https://api.github.com/users/dragondaud/following{/other_user}","gists_url":"https://api.github.com/users/dragondaud/gists{/gist_id}","starred_url":"https://api.github.com/users/dragondaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragondaud/subscriptions","organizations_url":"https://api.github.com/users/dragondaud/orgs","repos_url":"https://api.github.com/users/dragondaud/repos","events_url":"https://api.github.com/users/dragondaud/events{/privacy}","received_events_url":"https://api.github.com/users/dragondaud/received_events","type":"User","site_admin":false},"labels":[{"id":192608391,"url":"https://api.github.com/repos/esp8266/Arduino/labels/type:%20bug","name":"type: bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"d-a-v","id":4800356,"avatar_url":"https://avatars3.githubusercontent.com/u/4800356?v=4","gravatar_id":"","url":"https://api.github.com/users/d-a-v","html_url":"https://github.com/d-a-v","followers_url":"https://api.github.com/users/d-a-v/followers","following_url":"https://api.github.com/users/d-a-v/following{/other_user}","gists_url":"https://api.github.com/users/d-a-v/gists{/gist_id}","starred_url":"https://api.github.com/users/d-a-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-a-v/subscriptions","organizations_url":"https://api.github.com/users/d-a-v/orgs","repos_url":"https://api.github.com/users/d-a-v/repos","events_url":"https://api.github.com/users/d-a-v/events{/privacy}","received_events_url":"https://api.github.com/users/d-a-v/received_events","type":"User","site_admin":false},"assignees":[{"login":"d-a-v","id":4800356,"avatar_url":"https://avatars3.githubusercontent.com/u/4800356?v=4","gravatar_id":"","url":"https://api.github.com/users/d-a-v","html_url":"https://github.com/d-a-v","followers_url":"https://api.github.com/users/d-a-v/followers","following_url":"https://api.github.com/users/d-a-v/following{/other_user}","gists_url":"https://api.github.com/users/d-a-v/gists{/gist_id}","starred_url":"https://api.github.com/users/d-a-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-a-v/subscriptions","organizations_url":"https://api.github.com/users/d-a-v/orgs","repos_url":"https://api.github.com/users/d-a-v/repos","events_url":"https://api.github.com/users/d-a-v/events{/privacy}","received_events_url":"https://api.github.com/users/d-a-v/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/esp8266/Arduino/milestones/12","html_url":"https://github.com/esp8266/Arduino/milestone/12","labels_url":"https://api.github.com/repos/esp8266/Arduino/milestones/12/labels","id":3037806,"number":12,"title":"2.4.1","description":"","creator":{"login":"igrr","id":4349050,"avatar_url":"https://avatars2.githubusercontent.com/u/4349050?v=4","gravatar_id":"","url":"https://api.github.com/users/igrr","html_url":"https://github.com/igrr","followers_url":"https://api.github.com/users/igrr/followers","following_url":"https://api.github.com/users/igrr/following{/other_user}","gists_url":"https://api.github.com/users/igrr/gists{/gist_id}","starred_url":"https://api.github.com/users/igrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrr/subscriptions","organizations_url":"https://api.github.com/users/igrr/orgs","repos_url":"https://api.github.com/users/igrr/repos","events_url":"https://api.github.com/users/igrr/events{/privacy}","received_events_url":"https://api.github.com/users/igrr/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":7,"state":"open","created_at":"2018-01-16T03:19:46Z","updated_at":"2018-02-05T04:31:42Z","due_on":"2018-02-01T08:00:00Z","closed_at":null},"comments":22,"created_at":"2017-12-14T16:24:07Z","updated_at":"2018-02-05T13:44:06Z","closed_at":null,"author_association":"NONE","body":"### Basic Infos\r\n\r\n#### Hardware\r\nHardware:\t\tESP-12/NodeMCU v1.0\r\nCore Version:      \t2.4.0-github\r\n\r\n### Description\r\n\r\nWhen using github version of Arduino ESP8266, the dhcp client is not sending hostname in request, resulting in a blank name in the DHCP server, and no DNS entry created. If I recompile with 2.3.0, then the hostname is sent, and assigned as expected.\r\n\r\nI noticed blank hostnames previously, but wasn't sure where they came from. It turns out that jumping between 2.3.0 and 2.4.0-github was masking the issue, as once the server has the name set, it maintains it thru renewals, even when the name is not specified subsequently. And something is causing my modules running 2.4.0-github to occasionally lose their lease (localIP() shows 0.0.0.0).\r\n\r\nALSO, the default generated hostname (ESP_xxxx) is invalid, as the underscore character is not allowed in a valid hostname. A valid hostname may only contain letters, numbers and the dash \"-\", though a valid hostname cannot begin or end with a dash. [https://en.wikipedia.org/wiki/Hostname](url)\r\n\r\n### Settings in IDE\r\n\r\nArduino IDE:\t\t1.8.5\r\nModule:  \t\t\tNodeMCU 1.0(ESP-12E)\r\nFlash Size: \t\t4M(1M)\r\nCPU Frequency:\t80 Mhz\r\nlwip:\t\t\t\tv2\r\nUpload Using:\t\tSerial\r\n\r\n### Sketch\r\n\r\n```\r\n#include <ESP8266WiFi.h>\r\n\r\n#define HOST \"test-hostname\"\r\n#define WIFI_SSID \"SSID\"\r\n#define WIFI_PASS \"PASS\"\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  while (!Serial);\r\n  delay(100);\r\n  Serial.println();\r\n  Serial.print(F(\"setup: WiFi connecting to \"));\r\n  Serial.print(WIFI_SSID);\r\n  Serial.print(F(\"...\"));\r\n  WiFi.hostname(HOST);\r\n  WiFi.mode(WIFI_STA);\r\n  WiFi.begin(WIFI_SSID, WIFI_PASS);\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    Serial.print(F(\".\"));\r\n    delay(500);\r\n  }\r\n  Serial.println(F(\" OK\"));\r\n  Serial.print(F(\"Last reset reason: \"));\r\n  Serial.println(ESP.getResetReason());\r\n}\r\n\r\nvoid loop() {\r\n  String ip = WiFi.localIP().toString();\r\n  int heap = ESP.getFreeHeap();\r\n  Serial.printf(\"%s: %6d %6d \\r\\n\", ip.c_str(), millis(), heap);\r\n  delay(2000);\r\n}\r\n```\r\n\r\n### Debug Messages\r\n\r\nNo related errors or other messages observed, even with full debug enabled.\r\n"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/363088195","html_url":"https://github.com/esp8266/Arduino/issues/3970#issuecomment-363088195","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/3970","id":363088195,"user":{"login":"dragondaud","id":26858302,"avatar_url":"https://avatars3.githubusercontent.com/u/26858302?v=4","gravatar_id":"","url":"https://api.github.com/users/dragondaud","html_url":"https://github.com/dragondaud","followers_url":"https://api.github.com/users/dragondaud/followers","following_url":"https://api.github.com/users/dragondaud/following{/other_user}","gists_url":"https://api.github.com/users/dragondaud/gists{/gist_id}","starred_url":"https://api.github.com/users/dragondaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragondaud/subscriptions","organizations_url":"https://api.github.com/users/dragondaud/orgs","repos_url":"https://api.github.com/users/dragondaud/repos","events_url":"https://api.github.com/users/dragondaud/events{/privacy}","received_events_url":"https://api.github.com/users/dragondaud/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T13:44:06Z","updated_at":"2018-02-05T13:44:06Z","author_association":"NONE","body":"DHCPREQUEST for 10.10.10.195 (10.10.10.1) from 60:01:94:34:4f:0c (Hostname Unsuitable for Printing) via em1\r\n\r\nStill seeing problem in lwip2 here."}}
{"actor":{"display_login":"dragondaud"}}