ESP8266 Developer Zone The Official ESP8266 Forum 2015-11-03T16:34:22+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=485 2015-11-03T16:34:22+08:00 2015-11-03T16:34:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=4430#p4430 <![CDATA[Re: mDNS of SDK API not working]]>
or does it should be done by userself!!!????

Statistics: Posted by marhc_seven — Tue Nov 03, 2015 4:34 pm


]]>
2015-06-15T16:05:34+08:00 2015-06-15T16:05:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=2232#p2232 <![CDATA[Re: mDNS of SDK API not working]]>
So sorry for the inconvenience,

Keep espconn_mdns_init(info); only would be OK,we offer a demo in “2C-ESP8266__SDK__Programming Guide”,mDNS API introduction.

espconn_mdns_server_register();
espconn_mdns_enable();

This two APIs is included in espconn_mdns_init, we offered them for some customer's requirement.
In general, they need not to be called.

Thanks for your reporting, we will optimize these APIs.

Statistics: Posted by ESP_Faye — Mon Jun 15, 2015 4:05 pm


]]>
2015-06-15T15:24:32+08:00 2015-06-15T15:24:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=2231#p2231 <![CDATA[Re: mDNS of SDK API not working]]>
espconn_mdns_server_register();
espconn_mdns_enable();

and keep only

espconn_mdns_init(info);

It stop crashing.
I don't understand why.
init function did also register and enable?
But for example Bonjour Browser on Android did not found any service, only device itself.
But this one https://play.google.com/store/apps/deta ... e.zeroconf found everything.

Also possibility to scan others services in the network will be great.

Statistics: Posted by tprochazka — Mon Jun 15, 2015 3:24 pm


]]>
2015-06-15T10:34:24+08:00 2015-06-15T10:34:24+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=2217#p2217 <![CDATA[Re: mDNS of SDK API not working]]> Statistics: Posted by hrsavla — Mon Jun 15, 2015 10:34 am


]]>
2015-06-15T04:34:08+08:00 2015-06-15T04:34:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=2213#p2213 <![CDATA[Re: mDNS of SDK API not working]]> I'm using the same code as hrsavla mentioned.
I tested it on SDK 1.0.1 and 1.1.0 and it always crash during scanning by any Android zero config app
I tested it by
https://play.google.com/store/apps/deta ... e.zeroconf
and
https://play.google.com/store/apps/deta ... id.bonjour

Code:

Fatal exception (28):
epc1=0x40224f3c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

 ets Jan  8 2013,rst cause:1, boot mode:(3,6)

load 0x40100000, len 24048, room 16
tail 0
chksum 0x81
load 0x3ffe8000, len 1328, room 8
tail 8
chksum 0xcb
load 0x3ffe8530, len 7300, room 0
tail 4
chksum 0xc6
csum 0xc6


My test code

Code:

void startmdns() {
   struct mdns_info *info = (struct mdns_info *)os_zalloc(sizeof(struct mdns_info));
   info->host_name = (char *) "test";
   info->ipAddr = WifiStation.getIP();
   info->server_name = (char *) "iot";
   info->server_port = 80;

    espconn_mdns_init(info);
    espconn_mdns_server_register();
    espconn_mdns_enable();
}

Statistics: Posted by tprochazka — Mon Jun 15, 2015 4:34 am


]]>
2015-06-05T10:39:47+08:00 2015-06-05T10:39:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=2063#p2063 <![CDATA[Re: mDNS of SDK API not working]]>
Was your problem solved?

Statistics: Posted by ESP_Faye — Fri Jun 05, 2015 10:39 am


]]>
2015-05-27T14:42:02+08:00 2015-05-27T14:42:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=1916#p1916 <![CDATA[Re: mDNS of SDK API not working]]>
--------------------------------------------------------------------------------------------------------------------------------
Hi hrsavla

Apple devices (iOS) have got built-in support for mDNS, after all it Apple's thing.

On Android you can't resolve host name in browser address bar, Android will try to google search your host name instead of try to resolve. The only way is via installing a ZeroConf browser app.

I haven't tried on Linux machines. Let me know if you have.

Windows does not have mDNS support built-in. However you can get it if you install Safari browser for Windows which also installs Bonjour services (you need to check a box at the time of Safari installation). Once this is done you should be able to resolve your .local host name provided that ESP mDNS is configured correctly.
Windows lookup for host names in below order;
- DNS server
- LLMNR (Similar to mDNS but its from Microsoft, uses multicast)
- NBNS (Netbios name resolution, again from Microsoft, uses broadcast )
- mDNS (only if Bonjour service is installed)

Below code from SDK document worked for me but I haven't done detailed testing with ESP mDNS yet.

Code:

      struct ip_info sta_ip;
      wifi_get_ip_info(STATION_IF, &sta_ip);
      struct mdns_info *info = (struct mdns_info *)os_zalloc(sizeof(struct mdns_info));
      info->host_name = "myesp8266"; // your device will be accessed using myesp8266.local
      info->ipAddr = sta_ip.ip.addr; //ESP8266 station IP
      info->server_name = "mywebserver";
      info->server_port = 80;
      info->txt_data = "version = myesp8266_v1.0";
      espconn_mdns_init(info);


Hope this helps. Btw I am no mDNS/DNS expert and also I dont work for Espressif :)

Statistics: Posted by Guest — Wed May 27, 2015 2:42 pm


]]>
2015-05-26T12:06:38+08:00 2015-05-26T12:06:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=1863#p1863 <![CDATA[Re: mDNS of SDK API not working]]> https://play.google.com/store/apps/deta ... conf&hl=en )

I am using SDK1.01 with Sming Framework by Anakod (https://github.com/anakod/Sming).

I am now able to connect to windows machine (I had not installed Bonjour Service previously).

But Android there is still a problem. Is there a service which can be installed in Android to make mDNS work in Browser ?

Also I want to know that Another ESP8266 module will be able to translate the DNS (test.local) to IP address with espconn_gethostbyname() function.

Statistics: Posted by hrsavla — Tue May 26, 2015 12:06 pm


]]>
2015-05-26T10:13:53+08:00 2015-05-26T10:13:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=1857#p1857 <![CDATA[Re: mDNS of SDK API not working]]>
Thanks for your interest in ESP8266 ,

Could you provide your Android "Zeroconf Browser" to us for debugging ?

And what's the SDK version you are using ?

Statistics: Posted by ESP_Faye — Tue May 26, 2015 10:13 am


]]>
2015-05-24T12:12:09+08:00 2015-05-24T12:12:09+08:00 https://bbs.espressif.com:443/viewtopic.php?t=485&p=1838#p1838 <![CDATA[mDNS of SDK API not working]]> Do I have to install some sofware on Windows / Android to get it work ??
Bellow code is based on Esp8266 SDK API. In Android "Zeroconf Browser", ESP8266 shows up as trial.local. But in browser (chrome, ie) (trial.local) it does not translate ip address.

Code:

void startmdns()
{
        struct mdns_info *info = (struct mdns_info *)os_zalloc(sizeof(struct
        mdns_info));
        info->host_name = (char *) "test";

        info->ipAddr = WifiStation.getIP(); //y; //0;//3232235782;// ESP8266 station IP
        info->server_name = (char *) "iot";
        info->server_port = 80;
        char *xyz = (char *) "version = now";
        info->txt_data = xyz;

        espconn_mdns_init(info);
        espconn_mdns_server_register();
        espconn_mdns_enable();
}

ESP8266 crashes with Fatal error every time Android "Zeroconf Browser" scans for new mDNS adverstisements.

Statistics: Posted by hrsavla — Sun May 24, 2015 12:12 pm


]]>