-->
Page 1 of 1

NodeMCU attaches to my home network but cannot be found

PostPosted: Fri Apr 26, 2019 8:58 am
by Peter Mathews
Hi,
I have used a number of generic programmes to try to let me see my NodeMCU ESP8266 as a web server.

However although the code compiles uploads & runs and outputs its IP address - when I try to connect to it using a PC or phone using that IP address it cannot connect.

I have enabled debugging and when I try to connect I get multiple :
wifi evt: 7
printed out - so something is getting through to the NodeMCU but it is not responding.

Any ideas??

Re: NodeMCU attaches to my home network but cannot be found

PostPosted: Wed May 08, 2019 9:01 pm
by mel
Hi, i have been having problems with the cheaper NodeMcu the one with 2 chips not the one with the square silver chip,,, ok when i test and upload the sketch from windows 10 using arduino IDE it looks to upload ok, but shortly after connecting to the wifi it crashes, but if i upload it in Linux from Arduino IDE, it connects to the wifi and it works fine, i tried on 2 windows 10 computers, no luck, but Linux looks to be ok.
Regards
Melissa

Re: NodeMCU attaches to my home network but cannot be found

PostPosted: Tue May 21, 2019 10:33 am
by MiG_Fulcrum
Yes, Linux does help. It's what I'm using most of the time, but I have another computer that runs on Windows 8.1; I'll try and see whether it works under this OS as well, and will post the results, for the record.

Re: NodeMCU attaches to my home network but cannot be found

PostPosted: Wed May 22, 2019 1:16 am
by quackmore
have a look to the wifi events
Code: Select allfrom "user_interface.h" ...
enum {
    EVENT_STAMODE_CONNECTED = 0,
    EVENT_STAMODE_DISCONNECTED,
    EVENT_STAMODE_AUTHMODE_CHANGE,
    EVENT_STAMODE_GOT_IP,
    EVENT_STAMODE_DHCP_TIMEOUT,
    EVENT_SOFTAPMODE_STACONNECTED,
    EVENT_SOFTAPMODE_STADISCONNECTED,
    EVENT_SOFTAPMODE_PROBEREQRECVED,
    EVENT_OPMODE_CHANGED,
    EVENT_SOFTAPMODE_DISTRIBUTE_STA_IP,
    EVENT_MAX
};


wifi event 7 just says your nodemcu wifi AP is being probed by some station around (likely the PC or the phone)
but you also say the nodemcu connects to your network
does that mean your nodemcu is configured as station + softap ?
two different interfaces with two different IPs and obviously two separate networks ?
which one is the web server listening on ?

sometimes, you're better off keeping things simple
and choose if you want your nodemcu to work as an independent AP or connected to your network