18
(/) let's make Explore (/tag/typeid/) Create (/about/create.jsp) Contests (/contest/) Community (/community/) share what you make > (/editInstructable/) (/id/intel/) (/tag/typeid/categoryliving/channelreuse/?sort=FEATURED) (/tag/typeid/categoryoutside/channelcamping/?sort=FEAT (/tag/typeid/categorytechnology/cha This Instructable will teach you how to use those $5.00 ESP8266 modules, as well as provide you some basic knowledge about networking. I'll be using the Micromite Companion Kit (http://propellerpowered.com/shop/?page_id=1946) in my examples which is programmed in BASIC, however all of these instructions should be adaptable easily to your favorite micro. In short, the ESP8266 module is a TTL "Serial to Wireless Internet" device. Providing your microcontroller has the ability to talk to a TTL serial device (most do) you'll be in business! The original instructions have been translated from Chinese into cryptic data sheets. We'll try to change that with this Instructable. The ESP8266 module is a 3v device, but it's no wimp. It draws quite a bit of power. In fact, you'll probably need to make sure that your circuit's power supply can handle at least 1 amp of power. (In my case, I was using a simple 7.5v 500ma power supply. When I started working with this module, I switched it for a 7.5v 1amp power supply and had plenty of power.) As it turns out there is good reason for this; some Youtube videos have surfaced recently with folks seeing anything from 500 meters to a couple miles of transmission capability from this module. That's a lot of horsepower for $5.00! (http://cdn.instructables.com/F74/YBB3/I0HYTNK5/F74YBB3I0HYTNK5.LARGE.jpg) About This Instructable License: 479,018 views 247 favorites (/member/Propellerpowered/) Propellerpowered (/member/Propellerpowe Propellerpowered (http://www.propellerpowered.com Follow 175 (/id/Buildingyourown MicromiteCompanionMinicomputer) (/id/Microcontroller controlledHomeEntertainmentSyst) (/id/Howtobuildthe QuickPlayerExtreme) More by Propellerpowered ESP8266 (/tag/typeid/categorytechnology/keyword esp8266/) 8266 (/tag/typeid/categorytechnology/keyword 8266/) Tags: (/) Using the ESP8266 module by Propellerpowered (/member/Propellerpowered/) Collection I Made it! Download (/id/UsingtheESP8266module/?download=pdf) 8 Steps Favorite Share (/id/UsingtheESP8266module/) Login (/account/login) | Sign Up (/account/gopro?sourcea=header&sourceaUrl=/id/UsingtheESP8266module/?ALLSTEPS)

Using the ESP8266 Module

  • Upload
    victor

  • View
    120

  • Download
    2

Embed Size (px)

DESCRIPTION

ESP8266

Citation preview

(/)let's make Explore (/tag/typeid/) Create (/about/create.jsp) Contests (/contest/) Community (/community/)share what you make >(/editInstructable/)(/id/intel/) (/tag/typeid/categoryliving/channelreuse/?sort=FEATURED) (/tag/typeid/categoryoutside/channelcamping/?sort=FEATURED) (/tag/typeid/categorytechnology/channelraspberrypi/?sort=FEATURED)ThisInstructablewillteachyouhowtousethose$5.00ESP8266modules,aswellasprovideyousomebasicknowledgeaboutnetworking.I'llbeusingtheMicromiteCompanionKit(http://propellerpowered.com/shop/?page_id=1946)inmyexampleswhichisprogrammedinBASIC,howeveralloftheseinstructionsshouldbeadaptableeasilytoyourfavoritemicro.Inshort,theESP8266moduleisaTTL"SerialtoWirelessInternet"device.ProvidingyourmicrocontrollerhastheabilitytotalktoaTTLserialdevice(mostdo)you'llbeinbusiness!TheoriginalinstructionshavebeentranslatedfromChineseintocrypticdatasheets.We'lltrytochangethatwiththisInstructable.TheESP8266moduleisa3vdevice,butit'snowimp.Itdrawsquiteabitofpower.Infact,you'llprobablyneedtomakesurethatyourcircuit'spowersupplycanhandleatleast1ampofpower.(Inmycase,Iwasusingasimple7.5v500mapowersupply.WhenIstartedworkingwiththismodule,Iswitcheditfora7.5v1amppowersupplyandhadplentyofpower.)AsitturnsoutthereisgoodreasonforthissomeYoutubevideoshavesurfacedrecentlywithfolksseeinganythingfrom500meterstoacouplemilesoftransmissioncapabilityfromthismodule.That'salotofhorsepowerfor$5.00!(http://cdn.instructables.com/F74/YBB3/I0HYTNK5/F74YBB3I0HYTNK5.LARGE.jpg)AboutThisInstructableLicense:479,018views247favorites(/member/Propellerpowered/)Propellerpowered(/member/Propellerpowered/)Propellerpowered(http://www.propellerpowered.com)Follow 175(/id/BuildingyourownMicromiteCompanionMinicomputer)(/id/MicrocontrollercontrolledHomeEntertainmentSyst)(/id/HowtobuildtheQuickPlayerExtreme)MorebyPropellerpoweredESP8266(/tag/typeid/categorytechnology/keywordesp8266/)8266(/tag/typeid/categorytechnology/keyword8266/)Tags:(/)UsingtheESP8266module byPropellerpowered(/member/Propellerpowered/)Collection IMadeit!Download(/id/UsingtheESP8266module/?download=pdf) 8StepsFavorite Share(/id/UsingtheESP8266module/)Login(/account/login) | SignUp(/account/gopro?sourcea=header&sourceaUrl=/id/UsingtheESP8266module/?ALLSTEPS) HovertoExpand Colgate Sensitive Pro-ReliefFreecloudforESP8266jumpwire.ioMakeyourIoTin5min.PublicAlphaReleasedairtelbroadbandonlineRemovetheseadsbySigningUp(/account/gopro?sourcea=removeads&nxtPgName=Using+the+ESP8266+module&nxtPg=/id/UsingtheESP8266module/?ALLSTEPS)Step1:Obtainingandpreparingyour8266moduleIobtainedmymodulefromanEbayvendor(http://www.ebay.com/itm/281430286471?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT)intheUnitedStates.TheshippingwasfasterthanChina,butmoreimportantly,thevendorprovidesthemodulewithoutthepinssolderedin.The8266moduleisn'treallybreadboardfriendly,butit'seasytoconvertittoafourpinmoduleifyoupurchasethepinlessversion.(ortakeafewminutestoremovethepinsifyouhaveobtainedtheotherversion)You'llneed5pinconnectionstomakethemodulework.(Seeimage1)RelatedSeeMore(/tag/typeid/?q=)(http://cdn.instructables.com/F5H/I3AH/I0HYTNTY/F5HI3AHI0HYTNTY.LARGE.jpg)(http://cdn.instructables.com/FVC/5F6R/I0HYTNYA/FVC5F6RI0HYTNYA.LARGE.jpg)wireless(/tag/typeid/categorytechnology/keywordwireless/)BASIC(/tag/typeid/categorytechnology/keywordbasic/)micromite(/tag/typeid/categorytechnology/keywordmicromite/)companion(/tag/typeid/categorytechnology/keywordcompanion/)propeller(/tag/typeid/categorytechnology/keywordpropeller/)propellerpowed(/tag/typeid/categorytechnology/keywordpropellerpowed/)web(/tag/typeid/categorytechnology/keywordweb/)server(/tag/typeid/categorytechnology/keywordserver/)BuildingyourownMicromiteCompanionMinicomputer(/id/BuildingyourownMicromiteCompanionTriggeryourDSLRwirelesslywithsmartphoneandESP8266Wifimodule(/id/TriggeryourDSLRwirelesslyESP8266FROMANYWHERE(/id/ESP8266FROMANYWHERE/)bytcpipchip(/member/tcpipchip/)EasyESP8266WiFiDebuggingwithPython(/id/EasyESP8266WiFiDebuggingwithPython/)byjimk3038CBDBv2EvolutionESP8266DevelopmentBoardmeetsARDUINOIDE!(/id/CBDBv2EvolutionESP8266RX,TX,ground,and3vconnectedtotwopositionsonthemodule.Isourceda4pinfemalecablefrommypartsboxandcutoffoneend.Iusedasmallamountofnailpolishtocarefullypaintovertheunusedpin,thenloopedthe3vconnectionfromthepowerpinovertheunusedpinintothecenter.(Seeimage2)Theendresultisa4pinmodulethatisnowbreadboardfriendlytoplugintoyourproject.Step2:HookingitupOnceyouhavethemoduleadapted,nowmakethefourconnections,(RX,TX,3v,Gnd)toyourmicrocontroller.I'vebreadboardedminetomyMicromiteCompanion(http://propellerpowered.com/shop/?page_id=1946)whichisusingtheMicromitechip(createdbyGeoffGraham)runningBASIC.TheMicromitehasmultipleserialconnections,andaconsolewhichI'musingasmyinterfacetothe8266module.YoucouldevenconnectthemoduledirectlytoyourPCifyouhaveaTTLSerialtoUSBadapter.(Don'ttrytoconnectthemoduletoaPCserialportdirectly,youcouldcausedamagetothemoduleortheyourcomputer!)ThecorrectconnectionstotheMicromiteCompanion(Micromite)areRXto21,TXto22.Thedefaultbaudratesettingsare115200,N,8,1Next,you'llneedtouseaterminalprogramtoprogramtheunit.I'vewrittenthefollowingBASICterminalprogramfortheMicromite:Open"Com1:115200"As#1terminal:a$="":b$=""a$=Inkey$Ifa$""ThenPrint#1,a$IfLoc(#1)>=1Thenb$=Input$(1,#1)char=Asc(b$)(http://cdn.instructables.com/FHX/O2JV/I0HYTNV3/FHXO2JVI0HYTNV3.LARGE.jpg)Ifchar>31ThenPrintb$Ifchar=13ThenPrint""GoToterminalStep3:Configuringthe8266ModuleYou'llneedtoconfigurethemoduleforyourwirelessnetwork.YoushouldalreadyknowyourwirelessSSIDandpassword,aswe'llneedthosenext!Fromyourterminal,typeATandpressenter.IfyougetacheeryOKfromthemodule,youhavehaveaccomplishedabigstepinthisInstructable!Next,typeAT+RSTandgivethemoduleamomenttoreset.You'llseeaparagraphofdatareturned.TypeAT+CWMODE=3tosetthemoduleasbothaclientandanaccesspoint.Don'tworryifyoumakeatypointheprocessofdoingthesecommands.(There'snobackspace)JusthittheenterbuttonandenjoythebrokenEnglisherrormessageandretypethecommand.Next,let'sseeifwecanseeyourwirelessrouter.TypeAT+CWLAPandenter.You'llseesomethinglikethis.+CWLAP:(4,"Guest",75)+CWLAP:(4,"linksys",80)+CWLAP:(4,"family",90)+CWLAP:(4,"NETGEAR",91)Seeyouraccesspoint?Typethefollowingcommand,replacingSSIDandpasswordwithyourinformation.AT+CWJAP="SSID","password"Congratulations!Yourmoduleisconfiguredforyournetwork.NowweneedtoseewhatIPaddresshasbeenassignedtoit.TypeAT+CIFSRandpressenter.Yourmodule'sIPaddressshouldbedisplayed.(http://cdn.instructables.com/FV4/W5CM/I0HYTNO2/FV4W5CMI0HYTNO2.LARGE.jpg)192.168.1.20Step4:BASICnetworkingOk,we'velostabouthalfouraudienceattheendofthelaststep.Ifyouarestillreading,itmeansthatyouhaveaworkingmodule,butneedsomeguidanceintheworldofnetworking.Don'tworry,youareingoodhands.I'mgoingtocondenseasemesterofnetworkingclasses(IusedtoteachCCNA)intojustenoughnetworkingknowledgetobereallydangerous.Soundlikefun?Readon!SoyouhavetheIPaddressthatwasdisplayedinthelaststepofthelastpage.(Didyouwriteitdown?)Nowwhat?I'llassumeyouareathomewithawirelessroutersomewhereinyourhome.It'sprobablyconnectedtoeitheracablemodemorDSLadapter.It'sevenpossiblethatyouhaveasingledevicewhichisdoingbothjobs.Thisdeviceisthegatewaytoallofyourinternettravels,eventheInstructableyouarereading!Yourhomenetworkhasaprivateside,andapublicside.Theprivatesideofyournetworkisallofthecomputersanddeviceswhichareconnectedtoyourwirelessrouter.Theycanbewiredtoit'sports,orconnectedwirelessly.YouactuallygotaBIGCLUEtohowtheprivatesideofyournetworkisconfiguredbytheIPAddressyouweregiventoyourmodule.Minewas192.168.1.20.Takealookatthosefirstthreenumbers..192.168.1Thosearetheprivatesideofyournetwork.Youmighthave192.168.0oreven10.0.0.AllofyourcomputersandwirelessdevicesonyournetworkhaveanIPaddressthatstartswiththosethreedigits.It'sthatlastdigit(20inmycase)thatdeterminesthefulladdressofeachconnection.Eachofyourdeviceswillhaveadifferentlastnumber.Yourwirelessrouterprobablyuses1.192.168.1.1Theneatpartabouttheprivatenumbersisthattypicallythereisroomforupto254differentdevicesandcomputersonyournetworkrightnow!TalkaboutaLANparty!Takealookattheimageabove.RememberwhenIsaidthatyourwirelessrouterhasbothaprivatesideandapublicside?YourrouterreceivesaliveIPaddressfromyourInternetprovider.Thisaddressisuniquetotheentireworld,andit'sveryimportantthatitis!Thewirelessrouteractuallycontainstwoaddresses.Oneistheprivateside,theotheristheliveIP(http://cdn.instructables.com/F3L/D6ND/I0HYU6WD/F3LD6NDI0HYU6WD.LARGE.jpg)addresswhichisvisibletotheworld.Don'tworry,yourrouterisdesignedtobethegatekeeper,controllingyourwebrequestsfromyourdevicesandkeepingthebadguysoutofyourcomputers.Thetruthis,thoseprivateIPaddressesarenotvisiblefromtheoutsideworld.(Unlesswewantthemtobe,keepreading!)Step5:CommunicatingwiththemoduleLet'stakeabreakfromnetworkingclasstoseeifyourlittle8266moduleisabletocommunicatewithyournetwork.AneasywaytodothisisusingthePINGcommand.IfyouareusingWindows:ClickonStart,Run,andtypeCMDandpressenter.TypeIPCONFIGandpressenter.TypePINGandtheIPaddressofyourmodule.(ItypedPING192.168.1.20)IfyouareusingLinux:OpenaterminalwindowTypeIFCONFIGandpressenterTypePINGandtheIPaddressofyourmodule(ItypedPING192.168.1.20)I'vecircletwopiecesofinformationinmyimage.ThefirstistheIPaddressofthecomputerI'mworkingat.(Thisisalwaysgoodinformation)andthesecondistheIPaddressofwhatIactuallyPINGed.DidyoucatchmePINGingmywirelessrouter?Goodeyes!Pingyourrouteraswellasseeifitanswers.It'susually.1AsuccessfulPINGrequestwillalwaysreturnasetofnumberslikeminedid.Ifyouget"RequestTimeOut"messagesitmeansthatsomethingisn'tcommunicating.Step6:RunningasimplewebserverinBASIC(http://cdn.instructables.com/FBU/DXVL/I0HYU1QU/FBUDXVLI0HYU1QU.LARGE.jpg)See How Dove Elixir Oil is betterthan ordinary hair oils? Hover to ExpandIfyou'vegottengoodPINGresultsfromyourmodule,youarereadytostartexperimenting!Let'sstartwithareallysimplewebserverwritteninMMBASIC.Ifyouareusinganothermicro,theBASICprogramshouldbeveryeasytoreadandconverttoyourlanguage.TypeinthelittleprogramandRUNitonyourMicromiteCompanion.Ifyouareusingaterminalprogramconnectedtoyour8266module,takenoteofthefollowingcommands..AT+CIPMUX=1AT+CIPSERVER=1,80Thesetwocommandssetupthemagictomakethemoduleautomaticallyanswerarequestfromanothercomputerordevice.Inmycase,I'veconfiguredthemoduletoanswerwebrequestsonport80.Typicalportsareasfollows:80=Httpwebrequests8080=Httpwebrequestsonnetworksonwhich80isblocked23=Telnet(textterminal)requestsOnceyou'veruntheprogram,openawebbrowserandtypetheaddressofyourdevice(minewas192.168.1.20)intothewebaddressbar.Thatplacewhereyou'vetypedwww.instructables.com.(http://www.instructables.com.)ThemoduleseemstohandlealloftheformattingoftherequiredHTMLheadersyourwebbrowserislookingfor,soyoucanblastdatadirectly.(Atareasonablespeedofcourse!)Step7:InvitingtheInternet(http://cdn.instructables.com/FOJ/LW69/I0HYU2ED/FOJLW69I0HYU2ED.LARGE.jpg)Soyoucancommunicatefromyourwebbrowser,yourphone,laptop,orotherInternetcapabledevicetocontrolyourprojects.I'llbettheideasarealreadychurning!WhatifyouwantyourfriendinIrelandtocontrolyourprojectaswell?Whatifyouwanttocontrolyourprojectfromsomewhereotherthanyourhomenetwork?ThoseprivateIPaddressesareonlygoodwhileyouareinsideyourownnetwork.It'stimetotalkaboutpublicaddressandsomethingcalledrouter"PortForwarding".First,youneedtoknowyourrouter'spublicInternetaddress.It'seasytofind.Simplypointyourwebbrowseratwww.whatismyip.com(http://www.whatismyip.com)areyoubegivenyourliveIPaddress.(Seefirstimage)Nextyou'llneedtoconfigureyourroutertoallowrequestsfromtheoutsideworldintoyournetworkandprovideita"rule"toallowcertaintraffictoyourwirelessmodule.Thisiscalled"PortForwarding".RememberwhenisaidthatIPING'dmywirelessrouterat.1tofindit'saddress?Openyourwebbrowserandtypetheaddressofyourwirelessrouterintotheaddressbar.(Usually,it's192.168.1.1or192.168.0.1dependingonyournetwork,butyoushouldknowitnow.)Therouterwillrespondwithalogin/passwordresponse.Unlessyouhavereprogrammedit,(Mostpeoplehaven't)itwillacceptadminandpassword.(Don'tworry,yourrouterdoesn'tallowfolksfromtheInternettoprogramitbydefault!)Here'sthetrickypart.You'llneedtodig,(usuallyinthe"advanced"menus)forsomethingcalled"PortForwarding"or"Forwarding".Allroutersarealittledifferent,butdon'tbeafraidtopokearound.Youaren'tgoingtohurtanything.Takealookatthe2ndand3rdimages.Theyaregreatsamplesofsomecommonrouters.Onceyoufoundit,you'llneedtoaddarulewiththefollowinginformation:(http://cdn.instructables.com/F97/JM6P/I0HYTNYC/F97JM6PI0HYTNYC.LARGE.jpg)(http://cdn.instructables.com/FWJ/TMWJ/I0HYTNX4/FWJTMWJI0HYTNX4.LARGE.gif)(http://cdn.instructables.com/FYD/5OYP/I0HYTNVY/FYD5OYPI0HYTNVY.LARGE.jpg)Wehaveabenicecommentpolicy.Pleasebepositiveandconstructive.TheExternalPort#youwanttousewithyourdevice.Mostofthetime,you'lluseeither80(ifyouwanttoprovidewebaccess)or23(ifyouwanttoprovidetelnet"text"access).Justusethesamenumbertwiceasyouseeinmyexamples.SomerouterswillalsoaskforanInternalPort#aswell.Againyoucanusethesamenumberstwiceagain.Finally,givetheIPaddressofyourdevice.(Minewas192.168.1.20)Onceyou'veestablishedthisruleinyourrouter,yourdeviceisnowaccessiblefromtheworld!Fromoutsideofyournetwork,youcanuseyour"live"IPaddresstoaccessyour8266module.Step8:ClosingNotesRememberwhenIsaidyou'dgetenoughnetworkinginformationtobedangerous?Welcometothefun.Afewnotes:First,someInternetproviders,inpaticularcableprovidersdon'tliketogiveyoutheabilitytousethecommonlowerportnumbers(likeport80,or23).Theywillclaimthatdoingthisisaviolationoftheirservice(nonsense!)orthattheyareprotectingyoubyblockingtheseports.(hogwash!)Ifthisisthecase,justushigherportnumbers,like8080or2323(orjustmakeupahighernumberyoucanremembereasily.)Justadditattheendofthewebortelnetrequesttomakeitwork.Also,fromtimetotimeyour"live"IPaddresscanchangemakingitimpossibleforyoutoreachyourprojectuntilyougobackhomeandlookupthenewaddresswithwww.whatismyip.com.(http://www.whatismyip.com.)Thereisagreat,freeservicewhichyoucansubscribetocalledDuckDNS(www.duckdns.org(http://www.duckdns.org))whichwillgiveyouanameontheirserverandalittletooltorunonyourPCwhichwillkeeptrackofthechanges.InsteadofusingtheIPaddress,you'llbeabletouse{yourname}.duckdns.org.Itreallyworkswell!Needmorehelp?DropovertoourfriendlyforumsatPropellerpoweredandpostup!http://forums.propellerpowered.com(http://forums.propellerpowered.com)(http://cdn.instructables.com/FF7/MJ5K/I0HYU490/FF7MJ5KI0HYU490.LARGE.jpg)IMadeit! AddImages MakeComment(/member/AlessandroP/)5monthsagoReply(/member/drmpf/)1monthagoReply(/member/poltu12345667/)3monthsagoReply(/member/jmpm4619/)2monthsagoReply(/member/Ambrogio/)2monthsagoReply(/member/priyam170/)2monthsagoReply(/member/priyam170/)2monthsagoReply(/member/SeanM9/)3monthsagoReply140of58Next(http://www.instructables.com/id/UsingtheESP8266module/?&sort=ACTIVE&limit=40&offset=40#DISCUSS)AlessandroP(/member/AlessandroP/)Hello,IamworkingonaprojectwiththeESP8266andneedtodefinerequirementssoIhavedifferentoptions.IwanttousetheESP8266Version12connectedtoArduinotocollectsensorsdataandcommunicatewithamobileappthatsendsthesedatatothecloud.SoIamtryingtofigureouthowtosettheESP8266totalktothemobileapp.ThemobileappwouldbelikeabridgebetweentheESP/Arduinosystemandthecloud.ThemobilephonecanbesetastetheringorportablehotspotviaWifiandconnecttothecloudvia4G.WouldliketohavesomesuggestionsforthebestsetupfortheESP8266/Arduinointhisconfiguration?drmpf(/member/drmpf/) AlessandroPIsuggestsettingthemobileasanAccessPointandthenconnectingdirectlyfromESP8266tocloud.IwillsoonputupanInstructableshowinghowtouseESP826601asapassthroughWificonnectionforArduinoconnectedviaSerial(orSerial1)P.S.UsingtheATcommandsetisaskingfortrouble(althoughIhavealibrarythatworks,seewww.pfod.com.au)poltu12345667(/member/poltu12345667/) AlessandroPHey,Iamtooworkingonthistypeproject.InsteadofarduinoIamusingAtmel8051.Itwillbeveryhelpfullifyougivemesomeinformationonthesame.Thanksinadvancejmpm4619(/member/jmpm4619/)Hiwouldyoubeabletoassistinmakingaschematicwiththeesp8266?Ambrogio(/member/Ambrogio/)priyam170(/member/priyam170/)Howcaniaccessmyesp8266fromanywhereintheworld..??priyam170(/member/priyam170/)howcanimaketheesp'sIPstatic(assignedbyrouter,somethinglike192.168.1.17).SeanM9(/member/SeanM9/)Greatjob!ForthosewantingtotalkfromtheirPC,youcanusethisbreakoutboardtoconvertfromUSBtoTTL:https://www.sparkfun.com/products/9873.(https://www.sparkfun.com/products/9873.)ThereisaprogramcalledCoolTermWinthat'sfreethatletsyoucommunicatetotheboard:http://freeware.themeiers.org/.Besuretosetyourbaudto115Kintheoptions.(/member/ReneS1/)3monthsagoReply(/member/fhovin/)4monthsagoReply(/member/A.Paul.Frost/)3monthsagoReply(/member/radames+ajna/)5monthsagoReply(/member/aav1/)4monthsagoReply(/member/radames+ajna/)5monthsagoReply(/member/KevinC10/)5monthsagoReplyReneS1(/member/ReneS1/)CanyouusethemoduleinaframeworklikeTemboo&grovestreamsfhovin(/member/fhovin/)Hi.MymoduleseemstobeactingstrangeanddifferentlyfromboththisexampleandallothersI'vefound.Icanconnecttomyaccesspoint.Butforsomereason,AT+CIFSRshowsmydevicehavingTWOipaddresseswhenIuseAT+CWMODE=3OneactualyIPaddressinmyLAN(10.0.0.52),andanother(192.168.4.1)whichiddoesn'tgetfrommyrouter.IfIuseCWMODE=1,IonlygettheactualIPaddressinmyLAN.But,ineithercase,I'munabletopingthedevice.Ijustget"Destinationhostunreachable",alsoaftersettingAT+CIPMUX=1andAT+CIPSERVER=1,80.AndIcannotconnecttoport80withaterminalprogrameither.>Anyideas?A.Paul.Frost(/member/A.Paul.Frost/) fhovinThepingcommandissentoveryourEthernetnetworktothedevice,acouplethingscouldbegoingon.1.Youareseeingaresponsefromyourdeviceoverserial,butit'snotactuallyconnectedtothenetwork.2.Thedeviceisonthenetwork,butyourIPaddressand/orsubnetmaskarecausingcommunicationissues.TrytomakesurethefirstthreeoctetsofyourIPaddressandsubnetmaskmatchonbothdevices(pingerandpingee).3.Afirewallorotherpieceofsoftwareisblockingcommunications.Ididn'twritethisinstructablebutIhopethathelpsifyouhaven'tgottenitworkingalready.radamesajna(/member/radames+ajna/)Heyguys,checkthisout!Aluabasedfirmwareforwifisocesp8266https://github.com/nodemcu/nodemcufirmware(https://github.com/nodemcu/nodemcufirmware)aav1(/member/aav1/) radamesajnayeahitisacoolfirmwareHere'sanexampleforaprojectwiththisfirmwareifyouareinterestedhttp://www.whatimade.today/esp8266andthewaterheater/radamesajna(/member/radames+ajna/)hey,isitpossibletosettheitupasanaccesspoint?i.emakeitdiscoverablebyanSSID?KevinC10(/member/KevinC10/) radamesajnaYesitis.Ihave6namedGEOCACHE1,2,3andsoonforvariousgeocacheshiddeninthearea,Iamworkingonsometypeofsolarforthesupply,wastriggeringbyinfraredtostartthedevice,thenmovedontosolar.Inapmode,youcanlookatthewifisettingsonyourphoneordownloadanappforrangeofwifi'sandasyougetclosertothegeocachethesignalgetsbetteretc.Thisistheprimaryuseatthistimeforme.Ihave2othercontrollingrelaysandamusinganotherforrgbledmixing.ThergbcolormixingIamgoingtoexpandtouseonaminiremotecontrolcar,colormixingwillbethecontrolvoltageforright,left(/member/radames+ajna/)5monthsagoReply(/member/BugBlaster/)5monthsagoReply(/member/KevinC10/)5monthsagoReply(/member/GNoorP/)5monthsagoReply(/member/wholliday1/)6monthsagoReply(/member/KDMcMullan/)6monthsagoReply(/member/wholliday1/)6monthsagoReply(/member/KDMcMullan/)6monthsagoReplyandfoward[noreverseyet]bufferedoffa3transisters.ThisisjustforfunandwhereIamnow.Ihaditconnectedtothewebwithnootherinterest.Iamapplyingthemtosurgestripsandoutletsnamingthemoutletone,orTVorkitchenlightetcusingadifferentcodetocontroltheonoffofeachdevice,yesIknowsmartswitchsandplugsareouttheirbutwhenyoumakeityourselditisfun.radamesajna(/member/radames+ajna/) KevinC10Heygreat!thanksfortheinformationBugBlaster(/member/BugBlaster/) KevinC10IwasthinkingofdoingthesamewithtegeocachesbutthenperhapsalsolettingpeoplegetcordsfromthewebpagesorevenhaveapizzelbuilrintothepagethatthencouldopenthelockedcacheKevinC10(/member/KevinC10/) KevinC10AlsohereisalinktosomeKUHNsmartsocketsforabout$21.00freshipping.http://www.ebay.com/itm/SmartWifiPlugSocketRemoteControlPowerSocketforAndoidiPhoneAppUSPlug/181588872808?pt=LH_DefaultDomain_0&hash=item2a478a4e68GNoorP(/member/GNoorP/)WoW!ExcellentTutorial.Ilikeditverymuch.Easytofollow,andIjustconnectedmyESPmodulein15minutes.GreatWork.wholliday1(/member/wholliday1/)howdoweenabledDHCP?imtryingtoconnectmymobilephonetoit......ordoesthisonlyallowinfrastructuretootheresp8266's?ihavemadeasuccessfullTCPMessengers!KDMcMullan(/member/KDMcMullan/) wholliday1DHCPservingisafeatureofyourrouter/modem.Areyoutryingtogetyour8266toacquireanIPaddressbyDHCP?Ifyouweretoallowthis,thentheotherdevicesonyournetwork(egyourphone)wouldn't"know"theaddressofthe8266andcouldn'tcommunicatewithit.It'sbestfor"servers"(likethe8266)tohavefixedIPnumbers.wholliday1(/member/wholliday1/) KDMcMullanwellthecodeinsidethe8622hasDHCP,andwhybeanaccesspointitcantassignedIPstootherconnections?yousayingthatyoucanonlyconnecttothese8622softAPifotherconnectionsTOthedeviceisusingpresetIPs?(imnotusingarouteriwanttoconnectmymobiletocommunicatetomyrobot)myphoneismeanttoaskforanIPfromthe8622DHCP,saysthatithasoneKDMcMullan(/member/KDMcMullan/) wholliday1I'mcompletelyunawareofthefunctionalityofthecodeinthechip.IfindithardtobelieveitcanbeaDHCPserver.Iabsolutelydidnotsaythatonecanonlyconnectthese8266ifotherdeviceshavefixedIPs.I'msayingthatifyouwantthe8266tobea"server"IcannotseesenseinithavinganaddressallocatedbyDHCP(/member/wholliday1/)6monthsagoReply(/member/KevinC10/)5monthsagoReply(/member/JamesCaska/)5monthsagoReply(/member/thenecroscope/)5monthsagoReply(/member/dhanishvijayan/)6monthsagoReply(/member/zx+lee/)8monthsagoReplyasotherdeviceswouldbeunabletotalktoitastheywouldhavenomeansofknowingitsaddress.Ifthe8266is,indeedaDHCPserver,thenyourphoneshouldbeabletoobtainanIPaddressfromitandcommunicatewithit.Idoubtithas,though.Irritatingly,themoreIreadaboutthedevice,themoreconvincedIamthatthereisnowwaytogiveitafixedIPaddress!Cananyoneconfirm?HowcanweportforwardiftheaddressisallocatedbyDHCP?wholliday1(/member/wholliday1/) KDMcMullanOkey,ithinkifoundsomething,oddlythesoftAPworkswhenanotherdeviceisalreadyconnectedtoitsuchasanother8266afterthatthephoneconnectedandgotanipfromthesoftAPDHCPservice...AmicorrectthattheDHCPforthesedevicesstartat100254?Prettycoollittledevices!!DEFINATELYagamechangerKevinC10(/member/KevinC10/) wholliday1TrythisoutasIhavebeenexp.withthedevicesforabout3months.Placethe8266inmode3,downloadtheesp8266smartswitchfromtheplaystroe,justruntheapp,itwillgiveyouthefollowingjustrunningtheappwiththeespoff:androidip:0.0.0.0esp8266ip:0.0.0.0.afterpoweringuptheespandifyouhaveitprogramedasanap,searchforitinthewifimenuandconnecttoit,,thenhitstatusagainonthesmartswitchapp,itwillgiveyousomthingdifferentnow,mineisthefollowing:androidip:192.168.4.100andtheesp8266ip:192.168.4.1hopethissomehelp.Youcandownloadthecodeforeachappfromthedeveloperyontsasyouwillseefromtheapp.Moreinfkeepscommingeveryday.Theirwasalmostnothingaboutthischipandnowitisalotmoreinfoouttheir.Havefun.JamesCaska(/member/JamesCaska/)ThisarticleinspiredmetoincludeabreakoutfortheESP8266moduleasstandardpartoftheVZBUSmakingitsnaptocreateyourownPCB'sthatusethesemodules.https://www.kickstarter.com/projects/683231209/virtualbreadboardpcbdirect(https://www.kickstarter.com/projects/683231209/virtualbreadboardpcbdirect)thenecroscope(/member/thenecroscope/)Nicesimplewriteup!Thanksdhanishvijayan(/member/dhanishvijayan/)Hello,tThanksforanicetutorial.IsthereawaytoPingotherdevicesconnectedtothesamenetworkofESP8266.?zxlee(/member/zx+lee/)Greatinstructables.ItjustgivememostoftheinfoIneedforESP8266,networkingandportforwarding.Thanks(/member/KDMcMullan/)6monthsagoReply(/member/Vincent19/)6monthsagoReply(/member/WillarF/)6monthsagoReply(/member/rk_garg/)6monthsagoReplyKDMcMullan(/member/KDMcMullan/) zxleewww.portforward.comhasinstructionsonhowtosetupportforwardingfrommanydifferenttypesofrouter.Vincent19(/member/Vincent19/) zxleeworkingonit?WillarF(/member/WillarF/)Excelenteexplicacionlosfelicitork_garg(/member/rk_garg/)HereisacodetocontroltheIOPinsofarduinoUNOovertheweb.#include#defineDEBUGtrue#defineSSID"uourSSID"#definePASSWORD"password"SoftwareSerialesp8266(2,3)//makeRXArduinolineispin2,makeTXArduinolineispin3.//ThismeansthatyouneedtoconnecttheTXlinefromtheesptotheArduino'spin2//andtheRXlinefromtheesptotheArduino'spin3voidsetup(){Serial.begin(9600)esp8266.begin(9600)//youresp'sbaudratemightbedifferentpinMode(11,OUTPUT)digitalWrite(11,LOW)pinMode(12,OUTPUT)digitalWrite(12,LOW)pinMode(13,OUTPUT)digitalWrite(13,LOW)sendData("AT+RST\r\n",2000,DEBUG)//resetmodulesendData("AT+CWMODE=3\r\n",1000,DEBUG)//configureasaccesspointbooleanwifi_connected=false//notconnectedyet...for(inti=0imillis()){while(esp8266.available()){//Theesphasdatasodisplayitsoutputtotheserialwindowcharc=esp8266.read()//readthenextcharacter.response+=c}}if(debug){Serial.print(response)}returnresponse}(/member/atiq136/)6monthsagoReply(/member/aakash1995bansal/)6monthsagoReply(/member/Scargill/)9monthsagoReply(/member/Bullfrogerwytsch./)7monthsagoReply(/member/tomas.rudolf1/)6monthsagoReplybooleanconnectWiFi(){Stringcmd="AT+CWJAP=\""//formeg:AT+CWJAP="dynamode","55555555555555555555555555"cmd+=SSIDcmd+="\",\""cmd+=PASSWORDcmd+="\""esp8266.println(cmd)delay(5000)//giveittimemyaccesspointcanbeveryslowsometimesif(esp8266.find("OK"))//healthyresponse{Serial.println("ConnectedtoWiFi...")returntrue}else{Serial.println("NotconnectedtoWiFi.")returnfalse}}Usethewifiipaddress(NOTthe192.168.4.1)inhtmlpage.FollowthisURLfordetailshttp://allaboutee.com/2015/01/02/esp8266arduinoledcontrolfromwebpage/atiq136(/member/atiq136/)NiceWork!!!DoesanybodyworkedonSTM32F4DiscoveryboardwiththisESP8266WiFimodule...?????aakash1995bansal(/member/aakash1995bansal/)Scargill(/member/Scargill/)LackoffixedIPandthatpesky"busy"messagearethetwothingscurrentlyseriouslyimpedingtheuseoftheESP8266whichisotherwisesomethingofagamechanger.Bullfrogerwytsch.(/member/Bullfrogerwytsch./) ScargillIthastohaveaMacaddressright?CantyousetyourroutertogivethatmacaddressacertainIPeverytime?tomas.rudolf1(/member/tomas.rudolf1/) Bullfrogerwytsch.Yesyoucan,butyouwouldmustprogramthesmartthingbehindthistoaskaDHCPserverforaddressandthensettheIPtoaddressfromitsresponse(permanentorevendynamicIP,butalwaysfromDHCPresponse).ThiswillworkonlyifthiscancommunicateonMAClevelofcommunication(afterjoiningthewifinetwork)whichIdon'tknow(yet).(/member/rkhope/)7monthsagoReply(/member/arpruss/)7monthsagoReplyWehaveabenicecommentpolicy.Pleasebepositiveandconstructive.IMadeit! AddImages MakeCommentrkhope(/member/rkhope/)Nicework.Takealookatmywork!OpenSource,StandaloneESP8266Webserverwithgreatresponsive,mobilefriendlyGUITurnGPIO0onoffremotelyDomore...explore..!Alsoincludescompiledfirmwarefortest.https://github.com/IOCare/esp8266GUI(https://github.com/IOCare/esp8266GUI)Basedonoriginalworkbysprite_tm(thanks)arpruss(/member/arpruss/)IfIconfigurethe8266moduletoconnecttomyhomeWiFi,willitafterwardsautomaticallyconnecteachtimeit'spoweredup,ordoessomeserialcommandneedtobesentforiteachtimetoconnect?Ifitconnectsautomaticallyonpowerup,thenonecanuseitasasupersimplewirelesssensor(withsignificantlatency,butthat'sirrelevantformyapplication).I'mthinkingofusingitinconjunctionwithaLeakfrogwaterleakdetector.TheideaisthatIwouldwire8266modulestoLeakfrogunits,sothatwhenawaterleakisdetectedthe8266ispoweredup,andconnectstoWiFi.Someotherdevicerunningonmynetwork(e.g.,anoldAndroidphoneortablet,ormaybearouterwithcustomfirmware)willbepollingthenetworkandwillemailandtextmetotellmewhich8266modulehaspoweredup,andwillagainemailandtextwhenthemodulehaspowereddown.Butifthe8266requiresaserialcommandtoconnect,thenamicrocontrollerisneededtogeneratethatserialcommand,andthatcomplicatesthehardware.140of58Next(http://www.instructables.com/id/UsingtheESP8266module/?&sort=ACTIVE&limit=40&offset=40#DISCUSS)AboutUsWhoWeAre(/about/)Advertise(/advertise/)Contact(/about/contact.jsp)Jobs(/community/PositionsavailableatInstructables/)Help(/id/howtowriteagreatinstructable/)FindUsFacebook(http://www.facebook.com/instructables)Youtube(http://www.youtube.com/user/instructablestv)Twitter(http://www.twitter.com/instructables)Pinterest(http://www.pinterest.com/instructables)Google+(https://plus.google.com/+instructables)Tumblr(http://instructables.tumblr.com)Join our newsletter: Join! enteremailResourcesForTeachers(/teachers/)ArtistsinResidence(http://www.autodesk.com/artistinresidence/home)GiftProAccount(/account/give?sourcea=footer)Forums(/community/)Answers(/tag/typequestion/?sort=RECENT)Sitemap(/sitemap/)GoProToday(/account/gopro?sourcea=footer)We'reHiring!(/community/PositionsavailableatInstructables/)MobileDownloadournewappsforiOS,AndroidandWindows8!Android(https://play.google.com/store/apps/details?id=com.adsk.instructables)iOS(https://itunes.apple.com/app/instructables/id586765571)Windows(http://apps.microsoft.com/windows/enus/app/7afc8194c771441a959054250d6a8300)TermsofService(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |PrivacyStatement(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |LegalNotices&Trademarks(http://usa.autodesk.com/legalnoticestrademarks/) | MobileSite(http://m.instructables.com)(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)2015Autodesk,Inc.