Академический Документы
Профессиональный Документы
Культура Документы
(/)
share what you make >
(/)
(/editInstructable/) (/id/intel/) (/tag/typeid/categoryliving/channelreuse/?sort=FEATURED)
(/tag/typeid/categoryoutside/channelcamping/?sort=FEATURE
(/tag/typeid/categorytechnology/channel
UsingtheESP8266module byPropellerpowered(/member/Propellerpowered/)
Download(/id/UsingtheESP8266module/?download=pdf) (/id/UsingtheESP8266module/) 8Steps
AboutThisInstructable
479,018views License:
(http://cdn.instructables.com/F74/YBB3/I0HYTNK5/F74YBB3I0HYTNK5.LARGE.jpg) 247favorites
Propellerpowered
ThisInstructablewillteachyouhowtousethose$5.00ESP8266modules,as (/member/Propellerpowered/)
wellasprovideyousomebasicknowledgeaboutnetworking.I'llbeusingthe Propellerpowered
MicromiteCompanionKit(http://propellerpowered.com/shop/?page_id=1946)in (http://www.propellerpowered.com)
myexampleswhichisprogrammedinBASIC,howeveralloftheseinstructions (/member/Propellerpowered/)
Follow 175
shouldbeadaptableeasilytoyourfavoritemicro.
Inshort,theESP8266moduleisaTTL"SerialtoWirelessInternet"device. MorebyPropellerpowered
ProvidingyourmicrocontrollerhastheabilitytotalktoaTTLserialdevice(most
do)you'llbeinbusiness!Theoriginalinstructionshavebeentranslatedfrom
Chineseintocrypticdatasheets.We'lltrytochangethatwiththisInstructable.
TheESP8266moduleisa3vdevice,butit'snowimp.Itdrawsquiteabitof (/id/Buildingyourown
MicromiteCompanionMinicomputer)
power.Infact,you'llprobablyneedtomakesurethatyourcircuit'spowersupply
canhandleatleast1ampofpower.(Inmycase,Iwasusingasimple7.5v
500mapowersupply.WhenIstartedworkingwiththismodule,Iswitcheditfora
7.5v1amppowersupplyandhadplentyofpower.)Asitturnsoutthereisgood (/id/Microcontroller
reasonforthissomeYoutubevideoshavesurfacedrecentlywithfolksseeing controlledHomeEntertainmentSyst)
anythingfrom500meterstoacouplemilesoftransmissioncapabilityfromthis
module.That'salotofhorsepowerfor$5.00!
(/id/Howtobuildthe
QuickPlayerExtreme)
Tags:
ESP8266(/tag/typeid/categorytechnology/keyword
esp8266/)
8266(/tag/typeid/categorytechnology/keyword
8266/)
wireless(/tag/typeid/categorytechnology/keyword
Freecloudfor wireless/)
ESP8266 BASIC(/tag/typeid/categorytechnology/keyword
basic/)
jumpwire.io micromite(/tag/typeid/categorytechnology/keyword
MakeyourIoTin5min.PublicAlpha micromite/)
Released companion(/tag/typeid/category
technology/keywordcompanion/)
server(/tag/typeid/categorytechnology/keyword
Step1:Obtainingandpreparingyour8266module server/)
Related
Buildingyourown
MicromiteCompanion
Minicomputer
(/id/Buildingyourown
MicromiteCompanion
TriggeryourDSLR
wirelesslywith
smartphoneandESP8266
Wifimodule(/id/Trigger
yourDSLRwirelessly
(http://cdn.instructables.com/F5H/I3AH/I0HYTNTY/F5HI3AHI0HYTNTY.LARGE.jpg) ESP8266FROM
ANYWHERE(/id/ESP8266
FROMANYWHERE/)
bytcpipchip
(/member/tcpipchip/)
EasyESP8266WiFi
DebuggingwithPython
(/id/EasyESP8266WiFi
DebuggingwithPython/)
byjimk3038
CBDBv2Evolution
ESP8266Development
BoardmeetsARDUINO
IDE!(/id/CBDBv2
EvolutionESP8266
SeeMore(/tag/typeid/?q=)
(http://cdn.instructables.com/FVC/5F6R/I0HYTNYA/FVC5F6RI0HYTNYA.LARGE.jpg)
IobtainedmymodulefromanEbayvendor
(http://www.ebay.com/itm/281430286471?
_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT)in
theUnitedStates.TheshippingwasfasterthanChina,butmoreimportantly,the
vendorprovidesthemodulewithoutthepinssolderedin.
The8266moduleisn'treallybreadboardfriendly,butit'seasytoconvertittoa
fourpinmoduleifyoupurchasethepinlessversion.(ortakeafewminutesto
removethepinsifyouhaveobtainedtheotherversion)
You'llneed5pinconnectionstomakethemodulework.(Seeimage1)
RX,TX,ground,and3vconnectedtotwopositionsonthemodule.
Isourceda4pinfemalecablefrommypartsboxandcutoffoneend.
Iusedasmallamountofnailpolishtocarefullypaintovertheunusedpin,then
loopedthe3vconnectionfromthepowerpinovertheunusedpinintothecenter.
(Seeimage2)
Theendresultisa4pinmodulethatisnowbreadboardfriendlytoplugintoyour
project.
Step2:Hookingitup
(http://cdn.instructables.com/FHX/O2JV/I0HYTNV3/FHXO2JVI0HYTNV3.LARGE.jpg)
Onceyouhavethemoduleadapted,nowmakethefourconnections,
(RX,TX,3v,Gnd)toyourmicrocontroller.I'vebreadboardedminetomyMicromite
Companion(http://propellerpowered.com/shop/?page_id=1946)whichisusing
theMicromitechip(createdbyGeoffGraham)runningBASIC.TheMicromite
hasmultipleserialconnections,andaconsolewhichI'musingasmyinterface
tothe8266module.YoucouldevenconnectthemoduledirectlytoyourPCif
youhaveaTTLSerialtoUSBadapter.(Don'ttrytoconnectthemoduletoaPC
serialportdirectly,youcouldcausedamagetothemoduleortheyour
computer!)
ThecorrectconnectionstotheMicromiteCompanion(Micromite)areRXto21,
TXto22.
Thedefaultbaudratesettingsare115200,N,8,1
Next,you'llneedtouseaterminalprogramtoprogramtheunit.
I'vewrittenthefollowingBASICterminalprogramfortheMicromite:
Open"Com1:115200"As#1
terminal:
a$="":b$=""
a$=Inkey$
Ifa$<>""ThenPrint#1,a$
IfLoc(#1)>=1Thenb$=Input$(1,#1)
char=Asc(b$)
Ifchar>31ThenPrintb$
Ifchar=13ThenPrint""
GoToterminal
Step3:Configuringthe8266Module
(http://cdn.instructables.com/FV4/W5CM/I0HYTNO2/FV4W5CMI0HYTNO2.LARGE.jpg)
You'llneedtoconfigurethemoduleforyourwirelessnetwork.
YoushouldalreadyknowyourwirelessSSIDandpassword,aswe'llneedthose
next!
Fromyourterminal,typeATandpressenter.IfyougetacheeryOKfromthe
module,youhavehaveaccomplishedabigstepinthisInstructable!
Next,typeAT+RSTandgivethemoduleamomenttoreset.You'llseea
paragraphofdatareturned.
TypeAT+CWMODE=3tosetthemoduleasbothaclientandanaccesspoint.
Don'tworryifyoumakeatypointheprocessofdoingthesecommands.
(There'snobackspace)JusthittheenterbuttonandenjoythebrokenEnglish
errormessageandretypethecommand.
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,replacingSSIDand
passwordwithyourinformation.
AT+CWJAP="SSID","password"
Congratulations!Yourmoduleisconfiguredforyournetwork.
NowweneedtoseewhatIPaddresshasbeenassignedtoit.
TypeAT+CIFSRandpressenter.Yourmodule'sIPaddressshouldbe
displayed.
192.168.1.20
Step4:BASICnetworking
(http://cdn.instructables.com/F3L/D6ND/I0HYU6WD/F3LD6NDI0HYU6WD.LARGE.jpg)
Ok,we'velostabouthalfouraudienceattheendofthelaststep.Ifyouarestill
reading,itmeansthatyouhaveaworkingmodule,butneedsomeguidancein
theworldofnetworking.Don'tworry,youareingoodhands.I'mgoingto
condenseasemesterofnetworkingclasses(IusedtoteachCCNA)intojust
enoughnetworkingknowledgetobereallydangerous.Soundlikefun?Readon!
SoyouhavetheIPaddressthatwasdisplayedinthelaststepofthelastpage.
(Didyouwriteitdown?)
Nowwhat?
I'llassumeyouareathomewithawirelessroutersomewhereinyourhome.It's
probablyconnectedtoeitheracablemodemorDSLadapter.It'sevenpossible
thatyouhaveasingledevicewhichisdoingbothjobs.Thisdeviceisthe
gatewaytoallofyourinternettravels,eventheInstructableyouarereading!
Yourhomenetworkhasaprivateside,andapublicside.Theprivatesideof
yournetworkisallofthecomputersanddeviceswhichareconnectedtoyour
wirelessrouter.Theycanbewiredtoit'sports,orconnectedwirelessly.
YouactuallygotaBIGCLUEtohowtheprivatesideofyournetworkis
configuredbytheIPAddressyouweregiventoyourmodule.Minewas
192.168.1.20.
Takealookatthosefirstthreenumbers..192.168.1
Thosearetheprivatesideofyournetwork.Youmighthave192.168.0oreven
10.0.0.
AllofyourcomputersandwirelessdevicesonyournetworkhaveanIPaddress
thatstartswiththosethreedigits.
It'sthatlastdigit(20inmycase)thatdeterminesthefulladdressofeach
connection.
Eachofyourdeviceswillhaveadifferentlastnumber.Yourwirelessrouter
probablyuses1.192.168.1.1
Theneatpartabouttheprivatenumbersisthattypicallythereisroomforupto
254differentdevicesandcomputersonyournetworkrightnow!Talkabouta
LANparty!
Takealookattheimageabove.
RememberwhenIsaidthatyourwirelessrouterhasbothaprivatesideanda
publicside?
YourrouterreceivesaliveIPaddressfromyourInternetprovider.Thisaddress
isuniquetotheentireworld,andit'sveryimportantthatitis!Thewirelessrouter
actuallycontainstwoaddresses.Oneistheprivateside,theotheristheliveIP
addresswhichisvisibletotheworld.Don'tworry,yourrouterisdesignedtobe
thegatekeeper,controllingyourwebrequestsfromyourdevicesandkeeping
thebadguysoutofyourcomputers.Thetruthis,thoseprivateIPaddressesare
notvisiblefromtheoutsideworld.(Unlesswewantthemtobe,keepreading!)
Step5:Communicatingwiththemodule
(http://cdn.instructables.com/FBU/DXVL/I0HYU1QU/FBUDXVLI0HYU1QU.LARGE.jpg)
Let'stakeabreakfromnetworkingclasstoseeifyourlittle8266moduleisable
tocommunicatewithyournetwork.AneasywaytodothisisusingthePING
command.
IfyouareusingWindows:
ClickonStart,Run,andtypeCMDandpressenter.
TypeIPCONFIGandpressenter. Hover to Expand
TypePINGandtheIPaddressofyourmodule.(ItypedPING192.168.1.20)
IfyouareusingLinux:
Openaterminalwindow
TypeIFCONFIGandpressenter
TypePINGandtheIPaddressofyourmodule(ItypedPING192.168.1.20)
I'vecircletwopiecesofinformationinmyimage.ThefirstistheIPaddressof
thecomputerI'mworkingat.(Thisisalwaysgoodinformation)andthesecondis
theIPaddressofwhatIactuallyPINGed.DidyoucatchmePINGingmy
wirelessrouter?Goodeyes!Pingyourrouteraswellasseeifitanswers.It's
usually.1
AsuccessfulPINGrequestwillalwaysreturnasetofnumberslikeminedid.If
youget"RequestTimeOut"messagesitmeansthatsomethingisn't
communicating.
Step6:RunningasimplewebserverinBASIC
(http://cdn.instructables.com/FOJ/LW69/I0HYU2ED/FOJLW69I0HYU2ED.LARGE.jpg)
Ifyou'vegottengoodPINGresultsfromyourmodule,youarereadytostart
experimenting!
Let'sstartwithareallysimplewebserverwritteninMMBASIC.Ifyouareusing
anothermicro,theBASICprogramshouldbeveryeasytoreadandconvertto
yourlanguage.
TypeinthelittleprogramandRUNitonyourMicromiteCompanion.
Ifyouareusingaterminalprogramconnectedtoyour8266module,takenoteof
thefollowingcommands..
AT+CIPMUX=1
AT+CIPSERVER=1,80
Thesetwocommandssetupthemagictomakethemoduleautomatically
answerarequestfromanothercomputerordevice.Inmycase,I'veconfigured
themoduletoanswerwebrequestsonport80.
Typicalportsareasfollows:
80=Httpwebrequests
8080=Httpwebrequestsonnetworksonwhich80isblocked
23=Telnet(textterminal)requests
Onceyou'veruntheprogram,openawebbrowserandtypetheaddressofyour
device(minewas192.168.1.20)intothewebaddressbar.Thatplacewhere
you'vetypedwww.instructables.com.(http://www.instructables.com.)
ThemoduleseemstohandlealloftheformattingoftherequiredHTMLheaders
yourwebbrowserislookingfor,soyoucanblastdatadirectly.(Atareasonable
speedofcourse!)
Step7:InvitingtheInternet
(http://cdn.instructables.com/F97/JM6P/I0HYTNYC/F97JM6PI0HYTNYC.LARGE.jpg)
(http://cdn.instructables.com/FYD/5OYP/I0HYTNVY/FYD5OYPI0HYTNVY.LARGE.jpg)
Soyoucancommunicatefromyourwebbrowser,yourphone,laptop,orother
Internetcapabledevicetocontrolyourprojects.I'llbettheideasarealready
churning!
WhatifyouwantyourfriendinIrelandtocontrolyourprojectaswell?
Whatifyouwanttocontrolyourprojectfromsomewhereotherthanyour
(http://cdn.instructables.com/FWJ/TMWJ/I0HYTNX4/FWJTMWJI0HYTNX4.LARGE.gif)
homenetwork?
ThoseprivateIPaddressesareonlygoodwhileyouareinsideyourown
network.
It'stimetotalkaboutpublicaddressandsomethingcalledrouter"Port
Forwarding".
First,youneedtoknowyourrouter'spublicInternetaddress.It'seasytofind.
Simplypointyourwebbrowseratwww.whatismyip.com
(http://www.whatismyip.com)areyoubegivenyourliveIPaddress.(Seefirst
image)
Nextyou'llneedtoconfigureyourroutertoallowrequestsfromtheoutsideworld
intoyournetworkandprovideita"rule"toallowcertaintraffictoyourwireless
module.Thisiscalled"PortForwarding".
RememberwhenisaidthatIPING'dmywirelessrouterat.1tofindit's
address?
Openyourwebbrowserandtypetheaddressofyourwirelessrouterintothe
addressbar.
(Usually,it's192.168.1.1or192.168.0.1dependingonyournetwork,butyou
shouldknowitnow.)
Therouterwillrespondwithalogin/passwordresponse.Unlessyouhavere
programmedit,(Mostpeoplehaven't)itwillacceptadminandpassword.(Don't
worry,yourrouterdoesn'tallowfolksfromtheInternettoprogramitbydefault!)
Here'sthetrickypart.You'llneedtodig,(usuallyinthe"advanced"menus)for
somethingcalled"PortForwarding"or"Forwarding".Allroutersarealittle
different,butdon'tbeafraidtopokearound.Youaren'tgoingtohurtanything.
Takealookatthe2ndand3rdimages.Theyaregreatsamplesofsome
commonrouters.
Onceyoufoundit,you'llneedtoaddarulewiththefollowinginformation:
TheExternalPort#youwanttousewithyourdevice.Mostofthetime,you'lluse
either80(ifyouwanttoprovidewebaccess)or23(ifyouwanttoprovidetelnet
"text"access).Justusethesamenumbertwiceasyouseeinmyexamples.
SomerouterswillalsoaskforanInternalPort#aswell.Againyoucanusethe
samenumberstwiceagain.Finally,givetheIPaddressofyourdevice.(Mine
was192.168.1.20)
Onceyou'veestablishedthisruleinyourrouter,yourdeviceisnowaccessible
fromtheworld!Fromoutsideofyournetwork,youcanuseyour"live"IPaddress
toaccessyour8266module.
Step8:ClosingNotes
(http://cdn.instructables.com/FF7/MJ5K/I0HYU490/FF7MJ5KI0HYU490.LARGE.jpg)
RememberwhenIsaidyou'dgetenoughnetworkinginformationtobe
dangerous?Welcometothefun.
Afewnotes:
First,someInternetproviders,inpaticularcableprovidersdon'tliketogiveyou
theabilitytousethecommonlowerportnumbers(likeport80,or23).Theywill
claimthatdoingthisisaviolationoftheirservice(nonsense!)orthattheyare
protectingyoubyblockingtheseports.(hogwash!)
Ifthisisthecase,justushigherportnumbers,like8080or2323(orjustmake
upahighernumberyoucanremembereasily.)Justadditattheendoftheweb
ortelnetrequesttomakeitwork.
Also,fromtimetotimeyour"live"IPaddresscanchangemakingitimpossible
foryoutoreachyourprojectuntilyougobackhomeandlookupthenew
addresswithwww.whatismyip.com.(http://www.whatismyip.com.)Thereisa
great,freeservicewhichyoucansubscribetocalledDuckDNS(
www.duckdns.org(http://www.duckdns.org))whichwillgiveyouanameontheir
serverandalittletooltorunonyourPCwhichwillkeeptrackofthechanges.
InsteadofusingtheIPaddress,you'llbeabletouse{yourname}.duckdns.org.It
reallyworkswell!
Needmorehelp?
DropovertoourfriendlyforumsatPropellerpoweredandpostup!
http://forums.propellerpowered.com(http://forums.propellerpowered.com)
Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.
IMadeit! AddImages MakeComment
140of Next(http://www.instructables.com/id/UsingtheESP8266module/?
58 &sort=ACTIVE&limit=40&offset=40#DISCUSS)
Hello,
(/member/AlessandroP/)
IamworkingonaprojectwiththeESP8266andneedtodefinerequirements
soIhavedifferentoptions.IwanttousetheESP8266Version12connected
toArduinotocollectsensorsdataandcommunicatewithamobileappthat
sendsthesedatatothecloud.SoIamtryingtofigureouthowtosetthe
ESP8266totalktothemobileapp.Themobileappwouldbelikeabridge
betweentheESP/Arduinosystemandthecloud.Themobilephonecanbeset
astetheringorportablehotspotviaWifiandconnecttothecloudvia4G.
Wouldliketohavesomesuggestionsforthebestsetupforthe
ESP8266/Arduinointhisconfiguration?
IsuggestsettingthemobileasanAccessPointandthenconnecting
directlyfromESP8266tocloud.IwillsoonputupanInstructable
(/member/drmpf/)
showinghowtouseESP826601asapassthroughWificonnectionfor
ArduinoconnectedviaSerial(orSerial1)
P.S.UsingtheATcommandsetisaskingfortrouble(althoughIhavea
librarythatworks,seewww.pfod.com.au)
poltu12345667(/member/poltu12345667/) AlessandroP
3monthsago Reply
Hey,
(/member/poltu12345667/)
Iamtooworkingonthistypeproject.Insteadof
arduinoIamusingAtmel8051.Itwillbeveryhelp
fullifyougivemesomeinformationonthesame.
Thanksinadvance
Hiwouldyoubeabletoassistinmakingaschematicwiththeesp8266?
(/member/jmpm4619/)
(/member/Ambrogio/)
Howcaniaccessmyesp8266fromanywhereintheworld..??
(/member/priyam170/)
howcanimaketheesp'sIPstatic(assignedbyrouter,somethinglike
192.168.1.17).
(/member/priyam170/)
Greatjob!ForthosewantingtotalkfromtheirPC,youcanusethisbreakout
boardtoconvertfromUSBtoTTL:https://www.sparkfun.com/products/9873.
(/member/SeanM9/)
(https://www.sparkfun.com/products/9873.)
ThereisaprogramcalledCoolTermWinthat'sfreethatletsyoucommunicate
totheboard:http://freeware.themeiers.org/.Besuretosetyourbaudto115K
intheoptions.
ReneS1(/member/ReneS1/) 3monthsago Reply
CanyouusethemoduleinaframeworklikeTemboo&grovestreams
(/member/ReneS1/)
Hi.Mymoduleseemstobeactingstrangeanddifferentlyfromboththis
exampleandallothersI'vefound.
(/member/fhovin/)
Icanconnecttomyaccesspoint.Butforsomereason,AT+CIFSRshowsmy
devicehavingTWOipaddresseswhenIuseAT+CWMODE=3Oneactualy
IPaddressinmyLAN(10.0.0.52),andanother(192.168.4.1)whichiddoesn't
getfrommyrouter.
IfIuseCWMODE=1,IonlygettheactualIPaddressinmyLAN.
But,ineithercase,I'munabletopingthedevice.Ijustget"Destinationhost
unreachable",alsoaftersettingAT+CIPMUX=1andAT+CIPSERVER=1,80.
AndIcannotconnecttoport80withaterminalprogrameither.>
Anyideas?
ThepingcommandissentoveryourEthernetnetworktothedevice,a
couplethingscouldbegoingon.
(/member/A.Paul.Frost/)
1.Youareseeingaresponsefromyourdeviceoverserial,butit'snot
actuallyconnectedtothenetwork.
2.Thedeviceisonthenetwork,butyourIPaddressand/orsubnet
maskarecausingcommunicationissues.Trytomakesurethefirst
threeoctetsofyourIPaddressandsubnetmaskmatchonboth
devices(pingerandpingee).
3.Afirewallorotherpieceofsoftwareisblockingcommunications.
Ididn'twritethisinstructablebutIhopethathelpsifyouhaven'tgotten
itworkingalready.
Heyguys,checkthisout!
(/member/radames+ajna/)
Aluabasedfirmwareforwifisocesp8266
https://github.com/nodemcu/nodemcufirmware
(https://github.com/nodemcu/nodemcufirmware)
yeahitisacoolfirmwareHere'sanexampleforaprojectwiththis
firmwareifyouareinterested
(/member/aav1/)
http://www.whatimade.today/esp8266andthewaterheater/
hey,isitpossibletosettheitupasanaccesspoint?i.emakeitdiscoverable
byanSSID?
(/member/radames+ajna/)
Yesitis.Ihave6namedGEOCACHE1,2,3andsoonforvarious
geocacheshiddeninthearea,Iamworkingonsometypeofsolarfor
(/member/KevinC10/)
thesupply,wastriggeringbyinfraredtostartthedevice,thenmoved
ontosolar.Inapmode,youcanlookatthewifisettingsonyourphone
ordownloadanappforrangeofwifi'sandasyougetclosertothe
geocachethesignalgetsbetteretc.Thisistheprimaryuseatthistime
forme.Ihave2othercontrollingrelaysandamusinganotherforrgb
ledmixing.ThergbcolormixingIamgoingtoexpandtouseonamini
remotecontrolcar,colormixingwillbethecontrolvoltageforright,left
andfoward[noreverseyet]bufferedoffa3transisters.Thisisjustfor
funandwhereIamnow.Ihaditconnectedtothewebwithnoother
interest.Iamapplyingthemtosurgestripsandoutletsnamingthem
outletone,orTVorkitchenlightetcusingadifferentcodetocontrol
theonoffofeachdevice,yesIknowsmartswitchsandplugsareout
theirbutwhenyoumakeityourselditisfun.
Heygreat!thanksfortheinformation
(/member/radames+ajna/)
Iwasthinkingofdoingthesamewithtegeocachesbutthenperhaps
alsolettingpeoplegetcordsfromthewebpagesorevenhaveapizzel
(/member/BugBlaster/)
builrintothepagethatthencouldopenthelockedcache
AlsohereisalinktosomeKUHNsmartsocketsforabout$21.00fre
shipping.http://www.ebay.com/itm/SmartWifiPlugSocketRemote
(/member/KevinC10/)
ControlPowerSocketforAndoidiPhoneAppUSPlug
/181588872808?pt=LH_DefaultDomain_0&hash=item2a478a4e68
WoW!ExcellentTutorial.Ilikeditverymuch.Easytofollow,andIjust
connectedmyESPmodulein15minutes.GreatWork.
(/member/GNoorP/)
howdoweenabledDHCP?imtryingtoconnectmymobilephonetoit......or
doesthisonlyallowinfrastructuretootheresp8266's?
(/member/wholliday1/)
ihavemadeasuccessfullTCPMessengers!
DHCPservingisafeatureofyourrouter/modem.Areyoutryingtoget
your8266toacquireanIPaddressbyDHCP?Ifyouweretoallowthis,
(/member/KDMcMullan/)
thentheotherdevicesonyournetwork(egyourphone)wouldn't
"know"theaddressofthe8266andcouldn'tcommunicatewithit.It's
bestfor"servers"(likethe8266)tohavefixedIPnumbers.
wellthecodeinsidethe8622hasDHCP,andwhybeanaccesspointit
cantassignedIPstootherconnections?
(/member/wholliday1/)
yousayingthatyoucanonlyconnecttothese8622softAPifother
connectionsTOthedeviceisusingpresetIPs?
(imnotusingarouteriwanttoconnectmymobiletocommunicateto
myrobot)
myphoneismeanttoaskforanIPfromthe8622DHCP,saysthatit
hasone
I'mcompletelyunawareofthefunctionalityofthecodeinthechip.Ifind
ithardtobelieveitcanbeaDHCPserver.
(/member/KDMcMullan/)
Iabsolutelydidnotsaythatonecanonlyconnectthese8266ifother
deviceshavefixedIPs.I'msayingthatifyouwantthe8266tobea
"server"IcannotseesenseinithavinganaddressallocatedbyDHCP
asotherdeviceswouldbeunabletotalktoitastheywouldhaveno
meansofknowingitsaddress.
Ifthe8266is,indeedaDHCPserver,thenyourphoneshouldbeable
toobtainanIPaddressfromitandcommunicatewithit.Idoubtithas,
though.
Irritatingly,themoreIreadaboutthedevice,themoreconvincedIam
thatthereisnowwaytogiveitafixedIPaddress!Cananyone
confirm?Howcanweportforwardiftheaddressisallocatedby
DHCP?
Okey,ithinkifoundsomething,oddlythesoftAPworkswhen
anotherdeviceisalreadyconnectedtoitsuchasanother8266after
(/member/wholliday1/)
thatthephoneconnectedandgotanipfromthesoftAPDHCP
service...
AmicorrectthattheDHCPforthesedevicesstartat100254?
Prettycoollittledevices!!DEFINATELYagamechanger
TrythisoutasIhavebeenexp.withthedevicesforabout3months.
Placethe8266inmode3,downloadtheesp8266smartswitchfromthe
(/member/KevinC10/)
playstroe,justruntheapp,itwillgiveyouthefollowingjustrunningthe
appwiththeespoff:
androidip:0.0.0.0
esp8266ip:0.0.0.0.
afterpoweringuptheespandifyouhaveitprogramedasanap,
searchforitinthewifimenuandconnecttoit,,thenhitstatusagainon
thesmartswitchapp,itwillgiveyousomthingdifferentnow,mineisthe
following:
androidip:192.168.4.100andtheesp8266ip:192.168.4.1hopethis
somehelp.Youcandownloadthecodeforeachappfromthe
developeryontsasyouwillseefromtheapp.Moreinfkeepscomming
everyday.Theirwasalmostnothingaboutthischipandnowitisalot
moreinfoouttheir.Havefun.
ThisarticleinspiredmetoincludeabreakoutfortheESP8266moduleas
standardpartoftheVZBUSmakingitsnaptocreateyourownPCB'sthatuse
(/member/JamesCaska/)
thesemodules.
https://www.kickstarter.com/projects/683231209/virtualbreadboardpcbdirect
(https://www.kickstarter.com/projects/683231209/virtualbreadboardpcb
direct)
Nicesimplewriteup!Thanks
(/member/thenecroscope/)
Hello,t
(/member/dhanishvijayan/)
Thanksforanicetutorial.
IsthereawaytoPingotherdevicesconnectedtothesamenetworkof
ESP8266.?
Greatinstructables.ItjustgivememostoftheinfoIneedforESP8266,
networkingandportforwarding.Thanks
(/member/zx+lee/)
KDMcMullan(/member/KDMcMullan/) zxlee 6monthsago Reply
www.portforward.comhasinstructionsonhowtosetupportforwarding
frommanydifferenttypesofrouter.
(/member/KDMcMullan/)
workingonit?
(/member/Vincent19/)
Excelenteexplicacionlosfelicito
(/member/WillarF/)
HereisacodetocontroltheIOPinsofarduinoUNOovertheweb.
(/member/rk_garg/)
#include<SoftwareSerial.h>
#defineDEBUGtrue
#defineSSID"uourSSID"
#definePASSWORD"password"
SoftwareSerialesp8266(2,3)//makeRXArduinolineispin2,makeTX
Arduinolineispin3.
//ThismeansthatyouneedtoconnecttheTXlinefromtheesptothe
Arduino'spin2
//andtheRXlinefromtheesptotheArduino'spin3
voidsetup()
{
Serial.begin(9600)
esp8266.begin(9600)//youresp'sbaudratemightbedifferent
pinMode(11,OUTPUT)
digitalWrite(11,LOW)
pinMode(12,OUTPUT)
digitalWrite(12,LOW)
pinMode(13,OUTPUT)
digitalWrite(13,LOW)
sendData("AT+RST\r\n",2000,DEBUG)//resetmodule
sendData("AT+CWMODE=3\r\n",1000,DEBUG)//configureasaccesspoint
booleanwifi_connected=false//notconnectedyet...
for(inti=0i<5i++)//attempt5timestoconnecttowifithisisagoodidea
{
if(connectWiFi())//areweconnected?
{
wifi_connected=true//yes
break//getouttahere!
}
}
sendData("AT+CIFSR\r\n",1000,DEBUG)//getipaddress
sendData("AT+CIPMUX=1\r\n",1000,DEBUG)//configureformultiple
connections
sendData("AT+CIPSERVER=1,80\r\n",1000,DEBUG)//turnonserveronport
80
}
voidloop()
{
if(esp8266.available())//checkiftheespissendingamessage
{
Serial.print("available")
if(esp8266.find("+IPD,"))
{
delay(1000)//waitfortheserialbuffertofillup(readalltheserialdata)
//gettheconnectionidsothatwecanthendisconnect
intconnectionId=esp8266.read()48//subtract48becausetheread()
functionreturns
//theASCIIdecimalvalueand0(thefirstdecimalnumber)startsat48
esp8266.find("pin=")//advancecursorto"pin="
intpinNumber=(esp8266.read()48)*10//getfirstnumberi.e.ifthepin13
thenthe1stnumberis1,thenmultiplytoget10
pinNumber+=(esp8266.read()48)//getsecondnumber,i.e.ifthepin
numberis13thenthe2ndnumberis3,thenaddtothefirstnumber
digitalWrite(pinNumber,!digitalRead(pinNumber))//togglepin
//makeclosecommand
StringcloseCommand="AT+CIPCLOSE="
closeCommand+=connectionId//appendconnectionid
closeCommand+="\r\n"
sendData(closeCommand,1000,DEBUG)//closeconnection
}
}
}
/*
*Name:sendData
*Description:FunctionusedtosenddatatoESP8266.
*Params:commandthedata/commandtosendtimeoutthetimetowaitfor
aresponsedebugprinttoSerialwindow?(true=yes,false=no)
*Returns:Theresponsefromtheesp8266(ifthereisareponse)
*/
StringsendData(Stringcommand,constinttimeout,booleandebug)
{
Stringresponse=""
esp8266.print(command)//sendthereadcharactertotheesp8266
longinttime=millis()
while((time+timeout)>millis())
{
while(esp8266.available())
{
//Theesphasdatasodisplayitsoutputtotheserialwindow
charc=esp8266.read()//readthenextcharacter.
response+=c
}
}
if(debug)
{
Serial.print(response)
}
returnresponse
}
booleanconnectWiFi()
{
Stringcmd="AT+CWJAP=\""//formeg:
AT+CWJAP="dynamode","55555555555555555555555555"
cmd+=SSID
cmd+="\",\""
cmd+=PASSWORD
cmd+="\""
esp8266.println(cmd)
delay(5000)//giveittimemyaccesspointcanbeveryslowsometimes
if(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/esp8266arduino
ledcontrolfromwebpage/
NiceWork!!!
(/member/atiq136/)
DoesanybodyworkedonSTM32F4DiscoveryboardwiththisESP8266WiFi
module...?????
(/member/aakash1995bansal/)
LackoffixedIPandthatpesky"busy"messagearethetwothingscurrently
seriouslyimpedingtheuseoftheESP8266whichisotherwisesomethingofa
(/member/Scargill/)
gamechanger.
Bullfrogerwytsch.(/member/Bullfrogerwytsch./) Scargill
7monthsago Reply
IthastohaveaMacaddressright?Cantyouset
yourroutertogivethatmacaddressacertainIP
(/member/Bullfrogerwytsch./)
everytime?
tomas.rudolf1(/member/tomas.rudolf1/) Bullfrogerwytsch.
6monthsago Reply
Yesyoucan,butyouwouldmustprogramthe
smartthingbehindthistoaskaDHCPserverfor
(/member/tomas.rudolf1/)
addressandthensettheIPtoaddressfromits
response(permanentorevendynamicIP,but
alwaysfromDHCPresponse).Thiswillworkonly
ifthiscancommunicateonMAClevelof
communication(afterjoiningthewifinetwork)
whichIdon'tknow(yet).
rkhope(/member/rkhope/) 7monthsago Reply
Nicework.
(/member/rkhope/)
Takealookatmywork!
OpenSource,StandaloneESP8266Webserverwithgreatresponsive,mobile
friendlyGUI
TurnGPIO0onoffremotely
Domore...explore..!
Alsoincludescompiledfirmwarefortest.
https://github.com/IOCare/esp8266GUI
(https://github.com/IOCare/esp8266GUI)
Basedonoriginalworkbysprite_tm(thanks)
IfIconfigurethe8266moduletoconnecttomyhomeWiFi,willitafterwards
automaticallyconnecteachtimeit'spoweredup,ordoessomeserial
(/member/arpruss/)
commandneedtobesentforiteachtimetoconnect?
Ifitconnectsautomaticallyonpowerup,thenonecanuseitasasupersimple
wirelesssensor(withsignificantlatency,butthat'sirrelevantformy
application).I'mthinkingofusingitinconjunctionwithaLeakfrogwaterleak
detector.TheideaisthatIwouldwire8266modulestoLeakfrogunits,sothat
whenawaterleakisdetectedthe8266ispoweredup,andconnectstoWiFi.
Someotherdevicerunningonmynetwork(e.g.,anoldAndroidphoneor
tablet,ormaybearouterwithcustomfirmware)willbepollingthenetworkand
willemailandtextmetotellmewhich8266modulehaspoweredup,andwill
againemailandtextwhenthemodulehaspowereddown.
Butifthe8266requiresaserialcommandtoconnect,thenamicrocontrolleris
neededtogeneratethatserialcommand,andthatcomplicatesthehardware.
140of Next(http://www.instructables.com/id/UsingtheESP8266module/?
58 &sort=ACTIVE&limit=40&offset=40#DISCUSS)
Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive.
AboutUs FindUs
WhoWeAre(/about/) Facebook(http://www.facebook.com/instructables)
Advertise(/advertise/) Youtube(http://www.youtube.com/user/instructablestv)
Contact(/about/contact.jsp) Twitter(http://www.twitter.com/instructables)
Jobs(/community/PositionsavailableatInstructables/)
Pinterest(http://www.pinterest.com/instructables)
Help(/id/howtowriteagreatinstructable/)
Google+(https://plus.google.com/+instructables)
Tumblr(http://instructables.tumblr.com)
iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/en
us/app/7afc8194c771441a9590
54250d6a8300)
GoProToday(/account/gopro?sourcea=footer)
We'reHiring!(/community/PositionsavailableatInstructables/)