ESP8266 Developer Zone The Official ESP8266 Forum 2015-09-25T19:13:20+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=530 2015-09-25T19:13:20+08:00 2015-09-25T19:13:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3864#p3864 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by webself — Fri Sep 25, 2015 7:13 pm


]]>
2015-09-25T19:09:41+08:00 2015-09-25T19:09:41+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3863#p3863 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Fri Sep 25, 2015 7:09 pm


]]>
2015-09-25T14:50:36+08:00 2015-09-25T14:50:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3856#p3856 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> I check espconn.h for "espconn_nbns_init" and nothing was found...

Statistics: Posted by webself — Fri Sep 25, 2015 2:50 pm


]]>
2015-08-24T17:51:44+08:00 2015-08-24T17:51:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3411#p3411 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> I found out that my Windows 7 machine does this, too. My Windows 10 machine tries NBNS only and cannot ping the module by host name (I have no idea why).

Try

nbtstat -a esp8266

It's a tool that comes with Windows: https://technet.microsoft.com/en-us/library/cc755486(v=ws.10).aspx

If NBNS works, there should be some output (compare it with, for example, a Linux system running Samba).

Statistics: Posted by blubb — Mon Aug 24, 2015 5:51 pm


]]>
2015-08-24T17:29:11+08:00 2015-08-24T17:29:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3410#p3410 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
With the code I provided above, it can ping "esp8266" successfully.

ping hostname.jpg


If your problem is still unsolved, please provide your test code and test steps, we will have a try.

Statistics: Posted by ESP_Faye — Mon Aug 24, 2015 5:29 pm


]]>
2015-08-18T19:19:20+08:00 2015-08-18T19:19:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3292#p3292 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
In the mean time I found a tool that can list NETBIOS nameservers on the local network:
http://www.unixwiz.net/tools/nbtscan.html

All my Windows machines and the Linux machines running Samba show up on the list. ESP8266 does not.

Statistics: Posted by blubb — Tue Aug 18, 2015 7:19 pm


]]>
2015-08-18T09:58:07+08:00 2015-08-18T09:58:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3280#p3280 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
Sorry that we can not duplicate your problem.

Here is our test code:

Code:

void ICACHE_FLASH_ATTR
user_esp_platform_check_ip(void)
{
    struct ip_info ipconfig;

   //disarm timer first
    os_timer_disarm(&test_timer);

   //get ip info of ESP8266 station
    wifi_get_ip_info(STATION_IF, &ipconfig);

    if (wifi_station_get_connect_status() == STATION_GOT_IP && ipconfig.ip.addr != 0) {

      os_printf("got ip !!! \r\n");

     wifi_station_set_hostname("esp8266");
     espconn_nbns_init();

    } else {
       
        if ((wifi_station_get_connect_status() == STATION_WRONG_PASSWORD ||
                wifi_station_get_connect_status() == STATION_NO_AP_FOUND ||
                wifi_station_get_connect_status() == STATION_CONNECT_FAIL)) {
               
         os_printf("connect fail !!! \r\n");
         
        } else {
       
           //re-arm timer to check ip
            os_timer_setfn(&test_timer, (os_timer_func_t *)user_esp_platform_check_ip, NULL);
            os_timer_arm(&test_timer, 100, 0);
        }
    }
}

void ICACHE_FLASH_ATTR
user_set_station_config(void)
{
   // Wifi configuration
   char ssid[32] = SSID;
   char password[64] = PASSWORD;
   struct station_config stationConf;

   //need not mac address
   stationConf.bssid_set = 0;
   
   //Set ap settings
   os_memcpy(&stationConf.ssid, ssid, 32);
   os_memcpy(&stationConf.password, password, 64);
   wifi_station_set_config(&stationConf);

   //set a timer to check whether got ip from router succeed or not.
   os_timer_disarm(&test_timer);
   os_timer_setfn(&test_timer, (os_timer_func_t *)user_esp_platform_check_ip, NULL);
   os_timer_arm(&test_timer, 100, 0);

}

void user_init(void)
{
    os_printf("SDK version:%s\n", system_get_sdk_version());
   
   //Set  station mode
   wifi_set_opmode(STATION_MODE);

   // ESP8266 connect to router.
   user_set_station_config();

}


- Do I need to call espconn_nbns_init every time ESP8266 got an IP?
-> Yes.
- Do I need to call espconn_nbns_init every time I change the host name with wifi_station_set_hostname?
-> No. It is enough calling it only once after got an IP.

Statistics: Posted by ESP_Faye — Tue Aug 18, 2015 9:58 am


]]>
2015-08-16T22:00:50+08:00 2015-08-16T22:00:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3269#p3269 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
- Do I need to call it every time ESP8266 got an IP?
- Do I need to call it every time I change the host name with wifi_station_set_hostname?
- Or is it enough calling it only once (in user_init() maybe)?

Statistics: Posted by blubb — Sun Aug 16, 2015 10:00 pm


]]>
2015-08-14T18:17:46+08:00 2015-08-14T18:17:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3242#p3242 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
When I ping the ESP by host name, Windows tries to ping IP 168.0.135.0 which is not correct. The correct IP would be 192.168.0.135 in my case.
Looking at the IPs I think it was shifted by 1 byte accidentally! So this should be easy to fix if you look at your code.

Statistics: Posted by blubb — Fri Aug 14, 2015 6:17 pm


]]>
2015-08-14T16:18:46+08:00 2015-08-14T16:18:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3236#p3236 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
So sorry for the inconvenience. I checked it with our engineer again, esp_iot_sdk_v1.3.0 did not add this optimization.

Here is a patch based on esp_iot_sdk_v1.3.0 to support this new feature.

Please replace it in folder "lib" and add definition below in espconn.h

Code:

void espconn_nbns_init(void)


Call it after ESP8266 station connected to AP and got a IP address. For example,

Code:

wifi_station_set_hostname("esp8266");
espconn_nbns_init();
liblwip.a.zip

Statistics: Posted by ESP_Faye — Fri Aug 14, 2015 4:18 pm


]]>
2015-08-14T01:58:50+08:00 2015-08-14T01:58:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3214#p3214 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by kolban — Fri Aug 14, 2015 1:58 am


]]>
2015-08-13T23:32:27+08:00 2015-08-13T23:32:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3212#p3212 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Thu Aug 13, 2015 11:32 pm


]]>
2015-08-13T10:40:18+08:00 2015-08-13T10:40:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3189#p3189 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
Yes, have a try with the latest sdk_v1.3.0

If your problem is still unsolved, please feel free to let us know.

Statistics: Posted by ESP_Faye — Thu Aug 13, 2015 10:40 am


]]>
2015-08-12T20:33:11+08:00 2015-08-12T20:33:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=3180#p3180 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Wed Aug 12, 2015 8:33 pm


]]>
2015-07-19T22:58:51+08:00 2015-07-19T22:58:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2743#p2743 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>

Statistics: Posted by blubb — Sun Jul 19, 2015 10:58 pm


]]>
2015-07-08T11:20:02+08:00 2015-07-08T11:20:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2565#p2565 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
We attach great importance to your suggestion.

It will be supported in next SDK.

Thanks for your interest in Espressif Systems and ESP8266 !

Statistics: Posted by ESP_Faye — Wed Jul 08, 2015 11:20 am


]]>
2015-07-01T17:51:19+08:00 2015-07-01T17:51:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2462#p2462 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Wed Jul 01, 2015 5:51 pm


]]>
2015-07-01T09:59:48+08:00 2015-07-01T09:59:48+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2448#p2448 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
Yes,windows client can not ping ESP8266 by hostname.

Because ESP8266 does not support protocol “NBNS” .

Please ping it through IP.

So sorry for the inconvenience.

Statistics: Posted by ESP_Faye — Wed Jul 01, 2015 9:59 am


]]>
2015-06-30T17:17:15+08:00 2015-06-30T17:17:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2445#p2445 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Tue Jun 30, 2015 5:17 pm


]]>
2015-06-30T10:49:47+08:00 2015-06-30T10:49:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2440#p2440 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by tve — Tue Jun 30, 2015 10:49 am


]]>
2015-06-29T17:30:28+08:00 2015-06-29T17:30:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2427#p2427 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> Statistics: Posted by blubb — Mon Jun 29, 2015 5:30 pm


]]>
2015-06-29T17:24:52+08:00 2015-06-29T17:24:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2426#p2426 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
Could your windows client ping other host ?

Statistics: Posted by ESP_Faye — Mon Jun 29, 2015 5:24 pm


]]>
2015-06-22T05:41:45+08:00 2015-06-22T05:41:45+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2337#p2337 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
I can see the hostname on my router's info page. I can ping the module from a linux client.

I cannot ping the module from a windows client!

However, Windows' nslookup command shows me the module's ip.

So something is still missing.

Statistics: Posted by blubb — Mon Jun 22, 2015 5:41 am


]]>
2015-06-14T03:56:56+08:00 2015-06-14T03:56:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2206#p2206 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
you solved my request with SDK 1.1.2 (wifi_station_set_hostname(hostname)).

I'm impressed how fast you react to user requests! Great job - Thanks!

Best regards
Blackfarmer

Statistics: Posted by Blackfarmer — Sun Jun 14, 2015 3:56 am


]]>
2015-06-09T18:54:46+08:00 2015-06-09T18:54:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2129#p2129 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]> http://fridge.local/

I'm currently solving this by using my own LWIP but this is a pain to maintain between SDK upgrades.

Statistics: Posted by joostn — Tue Jun 09, 2015 6:54 pm


]]>
2015-06-09T14:01:37+08:00 2015-06-09T14:01:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=2125#p2125 <![CDATA[Re: Hostname (standard PC-192-168-xxx-xxx)]]>
Thanks for your interest in ESP8266 !

Sorry that we don‘t have the API to set hostname right now.

But this is a valuable advice,we will work on it !

Statistics: Posted by ESP_Faye — Tue Jun 09, 2015 2:01 pm


]]>
2015-05-31T19:20:12+08:00 2015-05-31T19:20:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=530&p=1972#p1972 <![CDATA[Hostname (standard PC-192-168-xxx-xxx)]]>
I'm using the SDK of ESP822. Currently the device is registered in my network with the name 'PC-aaa-bbb-ccc-ddd', where aaa, bbb, ccc, ddd is the IP address. I would like to change this name into a myself generated name. How can I do this?

Thanks!
Blackfarmer

Statistics: Posted by Blackfarmer — Sun May 31, 2015 7:20 pm


]]>