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

  Рет қаралды 39,383

datasith

datasith

Күн бұрын

Пікірлер
@pavisv6
@pavisv6 6 жыл бұрын
Great tutorial. mDNS didn't work before installed bonjour. After installed it working properly.Thanks for your effort.
@datasith
@datasith 6 жыл бұрын
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 5 жыл бұрын
@@datasith I have a mac so I did not install bonjour. So, what should I do to access the website?
@rsolovye
@rsolovye 4 жыл бұрын
@@nazmulhossain8194 фф
@pascallacsap6276
@pascallacsap6276 8 жыл бұрын
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 8 жыл бұрын
No problem, Pascal. Our team is happy you're finding our content useful. Thanks for the encouragement! :)
@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!!
@ritwikmukherjee8744
@ritwikmukherjee8744 4 жыл бұрын
mdns doesn't working in my android when accessing from chrome
@prayersonchristian1936
@prayersonchristian1936 6 жыл бұрын
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 6 жыл бұрын
That's awesome to hear, Prayerson. Thanks so much for the kind words!
@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 ?
@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 жыл бұрын
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!
@Stefan_Dragancev
@Stefan_Dragancev Жыл бұрын
Hello, how can i setup mdns “.local” domain on windows computer?
@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.
@bmz7257
@bmz7257 2 жыл бұрын
If we want to access this esp from another wireless, what we have to do.
@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.
@luotope
@luotope 8 жыл бұрын
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 8 жыл бұрын
Hmm, let's try to find out what's different on your network. What OS and browser are you using?
@luotope
@luotope 8 жыл бұрын
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 8 жыл бұрын
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 8 жыл бұрын
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 8 жыл бұрын
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.
@usmannasih
@usmannasih 3 жыл бұрын
Why mDNS not supported on my Android Phone?
@hamididrees9351
@hamididrees9351 3 жыл бұрын
How can it works on Android phone's browser? Any idea
@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??
@WagonLoads
@WagonLoads 5 жыл бұрын
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?
@debashisdas7557
@debashisdas7557 8 жыл бұрын
and thank u for all of the videos it is more simplified than other crap that i could find in the internet...
@datasith
@datasith 8 жыл бұрын
Haha, thanks for the kind comment! We're glad you're finding the info useful :)
@codycarter7146
@codycarter7146 8 жыл бұрын
Good Job on this tutorial Cisco, I learned a lot from this!
@datasith
@datasith 8 жыл бұрын
Cody Carter, thanks for the kind words! Our team is glad you're finding the content useful!
@garyb9867
@garyb9867 8 жыл бұрын
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 8 жыл бұрын
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!
@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).
@prashantmanshrestha
@prashantmanshrestha 3 жыл бұрын
It dose not work in android phone why ??
@NoumanAli
@NoumanAli 8 жыл бұрын
+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 8 жыл бұрын
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 8 жыл бұрын
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?
@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?
@DabeerShah
@DabeerShah 8 жыл бұрын
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! :)
@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 :)
@knowledge_seeker80
@knowledge_seeker80 2 жыл бұрын
is there a way to exchange .local to .com or .org because .local is not work with javascript websocket
@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 жыл бұрын
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!
@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
@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!
@neilvermeulen5283
@neilvermeulen5283 5 жыл бұрын
Brilliant. Thank you Cisco.
@datasith
@datasith 5 жыл бұрын
No problem, boss. Thanks so much (as always) for watching!
@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 ^_^
@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 (kzbin.info/www/bejne/bqnUmJeOq9Nmr9k)? Try the example therein, switching your requests from Weather Underground's URLs to your own web server's address. HTH!
@shubhamadtp
@shubhamadtp 8 жыл бұрын
Nice tutorials hade learn lot from u guys
@datasith
@datasith 8 жыл бұрын
Thanks! Glad you're finding them useful. Many more are on the way :)
@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 6 жыл бұрын
maybe try DNSServer.h instead e.g. dnsServer.start(dns_port, "www.your_name. com", ip);
@NoumanAli
@NoumanAli 8 жыл бұрын
can we use same code on WeMos D1 Mini?
@datasith
@datasith 8 жыл бұрын
Yup, same code should work on WeMos and any other development board carrying an ESP8266 :)
@NoumanAli
@NoumanAli 8 жыл бұрын
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.
@codycarter7146
@codycarter7146 8 жыл бұрын
Can you show us how to program in LUA on the esp8266?
@datasith
@datasith 8 жыл бұрын
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!
@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!
@rajveersingh-ix6ti
@rajveersingh-ix6ti Жыл бұрын
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, )
@nazmulhossain8194
@nazmulhossain8194 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@datasith I copied your code and only changed SSID and PASSWORD.
@seven-444d34
@seven-444d34 5 жыл бұрын
@@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 5 жыл бұрын
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 5 жыл бұрын
@@seven-444d34 Thank you, It is working now.
@s.i.3702
@s.i.3702 7 жыл бұрын
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)?
@dhanniekristanto
@dhanniekristanto 8 жыл бұрын
Good explanation. Thanks.
@datasith
@datasith 8 жыл бұрын
Thanks for watching, Dhannie!
@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
@GodzillazzZ
@GodzillazzZ 5 жыл бұрын
Great tutorial.
@datasith
@datasith 5 жыл бұрын
Thanks!
@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!
@DOM-cc
@DOM-cc 8 жыл бұрын
great tutorial! can you make an tutorial about reading/writing on the eeprom?
@datasith
@datasith 8 жыл бұрын
Thanks, we're glad you like it. Sounds like a plan, we'll add it to the queue!
@mialcatel4279
@mialcatel4279 4 жыл бұрын
Great tutorial. It works ! Does anyone know how to get the URL working loading pages from SPIFFS ?
@datasith
@datasith 4 жыл бұрын
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 жыл бұрын
@@mialcatel4279 awesome! Yeah, mDNS is tricky. Try installing Apple Bonjour on Windows, and activating mDNS on Linux! HTH!
@debashisdas7557
@debashisdas7557 8 жыл бұрын
in next video show us how to ota update the firmware of esp 8266
@datasith
@datasith 8 жыл бұрын
Will put it on our queue! Thanks for watching, Debashis!
@just4electronics101
@just4electronics101 4 жыл бұрын
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
@Mr_ToR
@Mr_ToR 6 жыл бұрын
I'm Cisco :-) that's really original. I'm Netgear and my last name is Linksys.
@datasith
@datasith 6 жыл бұрын
:) I guess I was born to work with Network devices!
@cad3175
@cad3175 8 жыл бұрын
..thanks
@datasith
@datasith 5 жыл бұрын
YEAH!
@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.
@Jinso700
@Jinso700 3 жыл бұрын
Raspberry is much better, cheaper and more userfriendly!
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Host websites on ESP32 | ESP Webserver with mDNS | ESP32
13:29
RoboCircuits
Рет қаралды 1,9 М.
🤖Я в шоке! ChatGPT пишет Arduino проекты
28:24
ESP8266 Webserver mit mDNS - Tutorial deutsch
6:46
cooper
Рет қаралды 42 М.
#232 How to secure our devices using SSL (ESP8266, ESP32, Tutorial)
17:27
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31