ESP8266 mDNS For Web Address URL Using Arduino IDE (Mac OSX and Windows)

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 120

  • @pavisv6
    @pavisv6 5 років тому +2

    Great tutorial. mDNS didn't work before installed bonjour. After installed it working properly.Thanks for your effort.

    • @datasith
      @datasith  5 років тому +1

      Thanks! I could've sworn I had added it to the description, but that wasn't the case (it is now fixed). I'm glad you found the tutorial useful!

    • @nazmulhossain8194
      @nazmulhossain8194 4 роки тому

      @@datasith I have a mac so I did not install bonjour. So, what should I do to access the website?

    • @rsolovye
      @rsolovye 4 роки тому +1

      @@nazmulhossain8194 фф

  • @pascallacsap6276
    @pascallacsap6276 7 років тому

    Thanks again Cisco. This mDNS tip is far much smatter than requesting static IP address from our local DHCP server.
    Looking forward to your next broadcast !

    • @datasith
      @datasith  7 років тому

      No problem, Pascal. Our team is happy you're finding our content useful. Thanks for the encouragement! :)

  • @rajveersingh-ix6ti
    @rajveersingh-ix6ti Рік тому +1

    On Linux, Dont know what went wrong,
    but for me, Only this much worked.
    #include
    if (MDNS.begin("room1", WiFi.localIP()))
    Serial.println("mdns started.");
    (directly using MDNS instead of mdns, )

  • @jbbotha
    @jbbotha 3 роки тому

    I just don't get why some pricks would give this video the thumbs down? It's the best video I've watched on the subject so far and all his other videos are excellent. So why? Thank you so much Cisco. Just ignore those negative chumps. Hope I spelled your name right?

    • @datasith
      @datasith  3 роки тому +1

      i gave you a shoutout on social media. really appreciated the comment, particularly after being 10 months away from the channel. glad you found them useful, and yup, got the spelling right!

  • @jean-philipperiviere6368
    @jean-philipperiviere6368 5 років тому

    Thanks so much Sisco.
    I'm french (from Reunion Island) but i understand very well your english.
    very good works

    • @datasith
      @datasith  5 років тому

      That's awesome Jean-Philippe. I'm so glad you enjoyed the video all the way from Reunion Island!!

  • @t.n.1056
    @t.n.1056 2 роки тому

    Do you also have a video for the pin problems ? My Problem is: if reconnect the VCC, than sometimes some pins are on HIGH status. Reconnecting again, the same pins are suddenly in LOW status.I also did put a physical 10K resistor to pull the pins LOW. But this dont work. Maybe I should pull them up, and the PUSH Button push to GND ?

  • @rahul.chandrashekar
    @rahul.chandrashekar 2 роки тому

    when i try with IP address i am able to reach my page. But when i try with MDNS URL - the link is broken.

  • @prayersonchristian1936
    @prayersonchristian1936 5 років тому

    Thank you so much Sir. Following your every tutorial and getting 100% success. Thank you so much for your efforts and support. Lots of love from India.❤️

    • @datasith
      @datasith  5 років тому

      That's awesome to hear, Prayerson. Thanks so much for the kind words!

  • @codycarter7146
    @codycarter7146 7 років тому

    Good Job on this tutorial Cisco, I learned a lot from this!

    • @datasith
      @datasith  7 років тому

      Cody Carter, thanks for the kind words! Our team is glad you're finding the content useful!

  • @nihalsaxena2412
    @nihalsaxena2412 3 роки тому

    Sir , with ip address it is working but even after installing bonjour mDNS is not working.......Is there any other method for mDNS??

  • @debashisdas7557
    @debashisdas7557 7 років тому

    and thank u for all of the videos it is more simplified than other crap that i could find in the internet...

    • @datasith
      @datasith  7 років тому

      Haha, thanks for the kind comment! We're glad you're finding the info useful :)

  • @luotope
    @luotope 7 років тому +5

    Thanks for the video. I did copy your source code and uploaded it to my esp8266. The serial monitor shows that the mdns has been started like in your video. I get the ip address, too and using it I can connect to esp from my browser and get Hello world back. However, I cannot get connection by typing esp8266-01.local/ to my browser. The browser says: "esp8266-01.local’s server DNS address could not be found." Any idea what may be blocking me to use the mdns even if the ip does work? Thanks.

    • @datasith
      @datasith  7 років тому

      Hmm, let's try to find out what's different on your network. What OS and browser are you using?

    • @luotope
      @luotope 7 років тому

      I'm using Windows 10 in Surface pro 4 and there both Edge and Chrome. I have disabled firewall and defender just to be sure. BTW, the device is Wemos esp 8266 but it has worked for me very well in all projects so far.

    • @datasith
      @datasith  7 років тому +2

      Will double-check on Windows shortly and see what's the trick to getting it working -- yup, the WeMos work great and shouldn't be the problem.

    • @datasith
      @datasith  7 років тому +1

      Hi, Petri. As Bob mentions (thanks!) mDNS isn't supported by default on Windows. Here's a SO discussion on viable 3rd-party solutions:
      stackoverflow.com/questions/23624525/standard-mdns-service-on-windows

    • @luotope
      @luotope 7 років тому +1

      Thanks Bob and Cisco for the explanation. Is the OTA technique different than this? In an esp8266 solution example for OTA at least the same library was included, and I can indeed see the OTA device in my Arduino IDE. Although it does not work like a clock and the net device is not allways visible, but most of the time I can see it and I can upload my schetch over the air. However, it is not the same as this mDNS I assume...
      But thanks a lot for pointing out the reason. This may confuse some other Win users, too.

  • @ritwikmukherjee8744
    @ritwikmukherjee8744 3 роки тому +1

    mdns doesn't working in my android when accessing from chrome

  • @neilvermeulen5283
    @neilvermeulen5283 4 роки тому

    Brilliant. Thank you Cisco.

    • @datasith
      @datasith  4 роки тому

      No problem, boss. Thanks so much (as always) for watching!

  • @garyb9867
    @garyb9867 7 років тому

    I am learning a lot from your ESP8266 Web-server series of videos. I would really like to see a video using the ESP8266 as a Client sending and receiving data via POST & GET to a Remote Server running PHP script and saving data to a MySQL database. Thanks again.

    • @datasith
      @datasith  7 років тому

      Thanks for watching our vids, Gary. We're happy to say that after covering the server side of things somewhat extensively, we'll start on the client side! Sending, receiving, *and displaying* data is coming next!

  • @meggrobi
    @meggrobi 6 років тому

    great work, just what I was looking for.

    • @datasith
      @datasith  6 років тому

      That's great to hear, Gary. I'm glad you found it useful!

  • @ggonmar
    @ggonmar 4 роки тому

    It's not working for me on windows 10... any idea? I can access via the ip, but not the mDNS name. Neither I can ping to it.

  • @phucnguyen2k
    @phucnguyen2k 7 років тому

    great job sir. This funtion is all that i've found. im really in the way learning all your tips and tricks. Thanks.

    • @datasith
      @datasith  7 років тому

      Thanks! Glad you liked it :)

  • @shubhamadtp
    @shubhamadtp 7 років тому

    Nice tutorials hade learn lot from u guys

    • @datasith
      @datasith  7 років тому

      Thanks! Glad you're finding them useful. Many more are on the way :)

  • @Stefan_Dragancev
    @Stefan_Dragancev Рік тому

    Hello, how can i setup mdns “.local” domain on windows computer?

  • @himangshuchoudhury7138
    @himangshuchoudhury7138 4 роки тому

    The code is not working for me. I have installed avahi and working in linux, but its not working for me. In fact any code where I have included ESP8266WebServer library is not working. Please Help

    • @datasith
      @datasith  4 роки тому

      So the mDNS works, but not the WebServer?

  • @bharatirkal2658
    @bharatirkal2658 4 роки тому

    Hello Team. Good tutorial.
    But can the same implementation be used when ESP8266 is an AP rather than Station?

    • @datasith
      @datasith  4 роки тому

      I'm glad you liked the video. Yes it can, see the CaptivePortal example:
      github.com/espressif/arduino-esp32/blob/master/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino

  • @NoumanAli
    @NoumanAli 7 років тому +1

    +ACROBOTIC I'm working on Windows 10. mDNS is not working on my laptop. If access it via IP address it works well but doesn't work with mDNS. Please help.

    • @datasith
      @datasith  7 років тому +3

      mDNS is not supported by default on Windows, unfortunately. The easiest way would be to install iTunes or Apple Bonjour directly! Thanks for watching our video, and giving the code a try!

    • @NoumanAli
      @NoumanAli 7 років тому +1

      I installed Bonjour by Apply and viola it's working. :) Thanks anyway for your videos. Learned a lot. Can you do a video which involves ESP8266 NodeMCU with MATLAB?

  • @bmz7257
    @bmz7257 2 роки тому

    If we want to access this esp from another wireless, what we have to do.

  • @marcelobenitezabc
    @marcelobenitezabc 7 років тому

    Awesome work!
    Let me ask you a question..I've noticed you rely heavily (and I'm ok with this) on the 'routes' and the server.on method..but I would like to enhance the user browser gui, something like a control panel with buttons, sliders and checkboxes which would (by xmlhttp request, perhaps?) change parameters in the remote board , WITHOUT afecting the page displayed in the browser ....can yo please provide a tip on that?
    Thanks in advance!

    • @datasith
      @datasith  7 років тому +1

      Many different methods achieve the same results. A more advanced way would be to use the xmlhttp object and use AJAX. You'd still use the "server.on" method, but you'd return an entire html page, which would include the necessary JavaScript. We hope to do a video in the future illustrating this. Thanks for watching!

  • @dhanniekristanto
    @dhanniekristanto 7 років тому

    Good explanation. Thanks.

    • @datasith
      @datasith  7 років тому

      Thanks for watching, Dhannie!

  • @bkhalterman
    @bkhalterman 7 років тому

    Your videos are awesome! I am having trouble setting up an ESP8266 client to send variables to the mDNS server example you have shown. Which works perfectly for me. I want to send an HTTP GET function to the server from another ESP8266. How can I do this?

    • @datasith
      @datasith  7 років тому

      [blush] glad you like'em! Have you seen our web client video (ua-cam.com/video/8xqgdXvn3yw/v-deo.html)? Try the example therein, switching your requests from Weather Underground's URLs to your own web server's address. HTH!

  • @en-fun-fact
    @en-fun-fact 5 років тому

    Does mdns also work in esp01?
    And what version of the library is needed؟
    Because Could not get mdns

    • @datasith
      @datasith  5 років тому

      It should work on the ESP-01, make sure you install support on your computer (read the pinned comment).

  • @usmannasih
    @usmannasih 3 роки тому

    Why mDNS not supported on my Android Phone?

  • @WagonLoads
    @WagonLoads 4 роки тому

    I have a esp8266 cp2102 and esp32. I also have my own domain and mysql database. Example.com/data.php?id=1234 where 1234 is the name of the esp. And strings $d1 $d2 $d3 $d4
    How do I send strings to/from esp and website without revealing my SQL queries in the esp code?

  • @Mr_ToR
    @Mr_ToR 6 років тому

    I'm Cisco :-) that's really original. I'm Netgear and my last name is Linksys.

    • @datasith
      @datasith  6 років тому +3

      :) I guess I was born to work with Network devices!

  • @nguytd03
    @nguytd03 4 роки тому

    thank you so much. you saved my life.

    • @datasith
      @datasith  4 роки тому

      haha, I'm glad to hear! thanks so much for watching my vid

  • @hamididrees9351
    @hamididrees9351 3 роки тому

    How can it works on Android phone's browser? Any idea

  • @aswani3711
    @aswani3711 7 років тому

    The instructions worked out for me quite well, but for some reason, I can't toggle the led on and off. It just remains on no matter what. Any solutions?

    • @datasith
      @datasith  7 років тому

      Make sure you add a delay between setting the pin HIGH and LOW! Thanks so much for watching our videos, we're glad that things are working albeit partially ^_^

  • @DOM-cc
    @DOM-cc 7 років тому

    great tutorial! can you make an tutorial about reading/writing on the eeprom?

    • @datasith
      @datasith  7 років тому

      Thanks, we're glad you like it. Sounds like a plan, we'll add it to the queue!

  • @GodzillazzZ
    @GodzillazzZ 5 років тому

    Great tutorial.

  • @nazmulhossain8194
    @nazmulhossain8194 4 роки тому

    Great tutorial, but I am having a problem. I have a mac and windows, but none of them is working(IP is working but not the esp8266-01.local/). I installed bonjour on my windows but not in the Mac. Still, none of them working. So, what should I do to access the website?
    Thank you for your time.

    • @datasith
      @datasith  4 роки тому

      Hmm, interesting. Mac OS has Bonjour already installed, so there's no need to install anything else. Are you calling the mdns.begin() method in your setup function? When the code is running, do you see the debug message ("MDNS responder started") in the Serial Monitor?

    • @nazmulhossain8194
      @nazmulhossain8194 4 роки тому

      @@datasith I copied your code and only changed SSID and PASSWORD.

    • @seven-444d34
      @seven-444d34 4 роки тому

      @@nazmulhossain8194 it didn't work for me either. Then i followed an example from mdns library (github.com/esp8266/Arduino/tree/master/libraries/ESP8266mDNS/examples/mDNS_Web_Server) which worked just fine.

    • @seven-444d34
      @seven-444d34 4 роки тому +1

      You have to delete line 13 "MDNSResponder mdns;"
      Use "MDNS.begin("esp8266-01")" instead of "mdns.begin("esp8266-01", WiFi.localIP())" (line 51)
      Add "MDNS.update();" in the loop() function
      Thats it!

    • @nazmulhossain8194
      @nazmulhossain8194 4 роки тому

      @@seven-444d34 Thank you, It is working now.

  • @DabeerShah
    @DabeerShah 7 років тому

    i use your example but its give me following error in arduino compilation:
    exit status 1
    'toggleLED' was not declared in this scope

    • @datasith
      @datasith  5 років тому

      Double-check the capitalization in your statements, it's usually tricky to spot! :)

  • @AliG.G
    @AliG.G 7 років тому

    I am totally lost from 1.30 to 1.50. I dont know what terminal it is or what language you are using. Any guidance will be much appreciated.

    • @datasith
      @datasith  7 років тому

      Try searching the web for tutorials on the "Vim" text editor. Otherwise, you can use the text editor built in to the Arduino IDE. Thanks for giving our videos a try!

  • @ok4rm
    @ok4rm 6 років тому

    Is there a problem with android devices? Seem not to support mDNS either... At least mine cannot connect if I input the mDNS name, but works fine with plain IPv4 address.

    • @datasith
      @datasith  6 років тому

      I've heard of problems with Android devices, but I'm not sure of a workaround (I don't own any). Let me know if you find a solution; thanks for stopping by the channel!

    • @rwils6333
      @rwils6333 5 років тому

      maybe try DNSServer.h instead e.g. dnsServer.start(dns_port, "www.your_name. com", ip);

  • @s.i.3702
    @s.i.3702 7 років тому +1

    esp8266 client
    Hi there, thank you very much for this step-by-step tutorial. I've tried it and it works with standard browser. When I try to connect using an esp8266 client using the mdns server name the connection cannot be established. It work perfectly when I use the server IP but this defeat the purpose of using a mdsn name...
    I've tried many combinations of request from the client but nothing seems to work. I've checked your tutorial and actually there isn't one about esp8266 client sending request to esp8266 mdnes server. Could you suggest a solution?
    Many thanks and Regards

    • @datasith
      @datasith  7 років тому

      If you're trying to access the mDNS device, make sure you install Bonjour if you're running Windows OS (see previous comments for details). Thanks so much for watching!

    • @s.i.3702
      @s.i.3702 7 років тому

      ACROBOTIC Hi, I'm trying to connect to the esp8266 server via an esp8266 client using the mdns server address. It still doesn't work. (Request to the server from osx or windows work like a charm), help on this is much appreciated. I suspect the esp8266 can't resolve mdns names...

    • @datasith
      @datasith  7 років тому

      You need an mDNS client running on the ESP8266. Check this thread for more info: github.com/esp8266/Arduino/issues/1184

    • @Azifcreations
      @Azifcreations 6 років тому

      Salvatore have you find any solution for connecting mDns client(esp8266)?

  • @Owensv64
    @Owensv64 7 років тому

    Terrific series of videos on the ESP chip. I went through this one on adding a custom local domain name, but there seems to be one thing missing. Please help if you can:
    Everything indicates the mDNS server is working, but I cannot reach the webpage. I actually have my code set up to run an AP, which works great if I just type in the 192.168.4.1 address. The name I give it will not resolve, however. I read all the comments, adding the "" prefix, but this just will not connect from my phone (iPhone with latest IOS). Any suggestions on what to check is appreciated.

    • @datasith
      @datasith  7 років тому

      Does it work if you try to access the address (not the IP) from a computer browser? Sometimes the phones have trouble using mDNS. Just for the sake of testing, try running the code on station mode and connect the phone to the same Wi-Fi network as the ESP8266. This will tell you if the problem is with the phone or with the AP part of the firmware. HTH!

  • @prashantmanshrestha
    @prashantmanshrestha 3 роки тому

    It dose not work in android phone why ??

  • @codycarter7146
    @codycarter7146 7 років тому

    Can you show us how to program in LUA on the esp8266?

    • @datasith
      @datasith  7 років тому

      Hey, Cody. For the time being we're focusing on custom firmware written in C++ inside the Arduino IDE as we deem it the most beginner-friendly way to get started with the ESP8266. We'll certainly try to cover other options like Python (MicroPython), JavaScript (Espruino), and LUA (NodeMCU) in the future!

  • @mialcatel4279
    @mialcatel4279 4 роки тому

    Great tutorial. It works ! Does anyone know how to get the URL working loading pages from SPIFFS ?

    • @datasith
      @datasith  4 роки тому +1

      Thanks! If I understand correctly, you want to serve .html files from SPIFFS? If so, when the server receives a request for an URL, then you can use the fileStream function to serve the file in response. HTH!

    • @mialcatel4279
      @mialcatel4279 4 роки тому

      @@datasith got it working. But it doesn't work with windows, Linux and android. Only apple !

    • @datasith
      @datasith  4 роки тому +1

      @@mialcatel4279 awesome! Yeah, mDNS is tricky. Try installing Apple Bonjour on Windows, and activating mDNS on Linux! HTH!

  • @just4electronics101
    @just4electronics101 4 роки тому +1

    One more great tutorial from you guys!!! Dear one more thing i tried you mDNS code but i found one issue it is working well on my laptop but when I tested it on my mobile which is actually a wifi hospot its not working but when I type IP it works in mobile but when I enter (esp8266-01.local) it does not work

  • @NoumanAli
    @NoumanAli 7 років тому

    can we use same code on WeMos D1 Mini?

    • @datasith
      @datasith  7 років тому +1

      Yup, same code should work on WeMos and any other development board carrying an ESP8266 :)

    • @NoumanAli
      @NoumanAli 7 років тому

      Can you please do a video on how to add mDNS service on Windows. I'm unable to find any help regarding this problem. There are a lot of things about this on the internet but can't figure out how to use mDNS on Windows. Your help would be much appreciated.

  • @debashisdas7557
    @debashisdas7557 7 років тому +1

    in next video show us how to ota update the firmware of esp 8266

    • @datasith
      @datasith  7 років тому +2

      Will put it on our queue! Thanks for watching, Debashis!

  • @cad3175
    @cad3175 7 років тому

    ..thanks

  • @Jinso700
    @Jinso700 3 роки тому

    Raspberry is much better, cheaper and more userfriendly!

  • @antonios68
    @antonios68 6 років тому

    dont work for query service. LOL

    • @datasith
      @datasith  6 років тому

      if you do it properly, it does. LOL

  • @anupbalharpure
    @anupbalharpure 7 років тому

    Thanks for such a nice video.
    I have tried the same example but I got below error, can you please help me--
    //--------------------------------------------------------------------------------------------------------------------------
    I have used ESP8266 small module
    //------------------------------------------------------------------------------------------------------------------------........
    IP Address: 192.168.1.128
    MDNS responder started
    Fatal exception 0(IllegalInstructionCause):
    epc1=0x40106cf6, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
    Exception (0):
    epc1=0x40106cf6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
    ctx: sys
    sp: 3ffffd80 end: 3fffffb0 offset: 01a0
    >>>stack>>>
    3fffff20: 4021ae9f 09940160 402109c0 3ffecd00
    3fffff30: 3fff21e4 00000001 4021aede 402109d9
    3fffff40: 4021aced 3fff23ec 3fffff80 3fff166c
    3fffff50: 3ffe0000 3fff21e4 3ffee7b0 4021b6a0
    3fffff60: 3fff23ec 3fff166c 3ffea1ba 4021a43f
    3fffff70: 3fff166c 00000014 4021a9ea 3fff23ec
    3fffff80: 3fff166c 3fffdc80 3fff16f4 3ffefd20
    3fffff90: 402263a3 3fff23ec 00000000 402064af
    3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49

    • @datasith
      @datasith  7 років тому

      Try adding a delay inside your loop function. Also, make sure you have a proper power supply. Finally, try the code without any external component connected to the ESP8266, that way you can determine whether additional hardware is causing the failure.

    • @simerneet
      @simerneet 6 років тому

      I was having the same problem, I am using the 3.3v supply from arduino uno and neither did I have any other components connected to it but then I figured out that it is because I had stored my html page in the program memory and I was trying to access that html page stored as a constant character array in program memory as a normal char type array the only work around I could find was to declare that page as a simple const char type array because I couldn't find a way to access data from program memory.

  • @knowledge_seeker80
    @knowledge_seeker80 Рік тому

    is there a way to exchange .local to .com or .org because .local is not work with javascript websocket