1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

esp8266 loss wifi connectivity problem

Discussion in 'IoT - Internet of Things' started by naveen123, Feb 13, 2018.

  1. naveen123

    naveen123 New Member

    Joined:
    Feb 13, 2018
    Messages:
    2
    Likes:
    0
    I'm using esp82266 for relay control.esp8266 act as a access point and its connect with my router.DHCP function provide ip address to my esp8266,with help of ip address ,i control relay through android App.
    The problem is,initially its working well,after some undefined time,either hanging of esp8266 loss wifi connectivity.So i cant control relay,until hard reset.

    So Please give me any solution.Thanks in advance.
     
  2. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,592
    Likes:
    202
    Location:
    Lancashire UK
    It is possible that DHCP is assigning a different IP address each time your router sees the ESP after loosing contact with it. If this is the case try to configure the router to reserve a fixed IP address for the ESP.

    Les.
     
    • Like Like x 1
  3. naveen123

    naveen123 New Member

    Joined:
    Feb 13, 2018
    Messages:
    2
    Likes:
    0
    Thank You Les Jones.That's not possible,while selling this as product.Clients Don't know about that.Is there any way to avoid the problem
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,710
    Likes:
    421
    Location:
    Brisbane Australia
    Is your board acting as an access point or is it connecting to an existing access point?

    I currently have a Wemos board connected to my wifi and serving up a webpage that displays temperature and humidity and can control a servo connected to the Wemos.

    I can test your code on the Wemos board if need be.

    Mike.
     
  6. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    5,198
    Likes:
    159
    Location:
    morristown,tn
    Is maybe not what you want That means is kind of playing the same roll as router Kind of.
    You want the esp to access the router, So do you need both Station mode and Access Point mode.

    The bigger problem is the router needs WiFi.begin(ssid, password); That means you are sending to a router.

    This kind of means WiFi.softAP(ssid, password); your acting as a router in a simple way.

    Whats the kicker you have to know the ssid and password.

    It be nice if the esp8266 could auto connect to router with button . like somethings can.

    But you have this the next best thing I guess AutoConnectWithHTTPServer
    That kind of saying your not using the esp as access point.
    The problem is access point give's out ip addresses and if you give out one that's the same as the esp guess what !! you can no longer see the esp it will look as if it stopped working.

    What you really need to do is have the esp hooked to serial com and when it stops working it will dump the code that caused it to serial.

    Or like mike said post your code and lets look at it. I run a relay for a month it still works

     
    Last edited: Feb 14, 2018
  7. Cicero

    Cicero Active Member

    Joined:
    Nov 21, 2014
    Messages:
    416
    Likes:
    41
    Location:
    UK
    Really not enough information here. Are you using Arduino?

    Do you have debug output from your ESP? If not, get that going asap and let us know what it says.
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. unclejed613

    unclejed613 Well-Known Member

    Joined:
    Apr 3, 2009
    Messages:
    2,252
    Likes:
    148
    one other question.... does the OP live in an apartment building? if so, it's likely theres a lot of wifi interference.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice