Can not get NodeMCU webserver to work - esp8266

So I have brought a NodeMCU and I am just trying to get a basic project to work over wifi. Well this project here:
https://randomnerdtutorials.com/esp8266-web-server-with-arduino-ide
Now I have it all setup and ready to go I uploaded the code to the board and the serial told me Wifi Connected, ip address 192.168.1.12
I navigate to the ip address on either my phone or computer and they both tell me this site cant be reached.
I tried googling the answer to this issue on my own however all that comes up is "make sure the device is on the same network" and that's the only answer that I can find. All my devices are on the same ssid.
after a while of googling I tried flashing it with NODEMCU FIRMWARE PROGRAMER
and it looked like it flashed successfully but it did not make any difference.
then I tried to see if I could use ESPlorer but everytime I try to connect it just keeps saying communication with mcu... and just hangs there.
Can someone please tell me whats going wrong. I've tried to look on the nodeMCU website but there support page just redirects me to here stack overflow.
Thank you

So I worked out that the problem was with the network router for some reason it was stopping my nodeMCU from being viewed on the network. I factory reset the router and evey thing then worked.

Related

I am attempting to connect my Android blu130 to the "existing" wifi signal with zero success. Help, anyone?

I currently reside in my parent's guest house and I wish to connect my Android blu130 to an existing wifi connection in the "main house."
My ostensible purpose is to be able to listen to music.
My trouble seems to be that I cannot "connect with the wifi in any sense of the word.
I have dutifully tried to utilize the password for said wifi however I keep receiving the (or perhaps "a") message that the password is merely "saved."
Does anyone have any suggestions at all?
Yes, I am "still" a very neophyte "techie" (at least partly, if that) ay fifty-six years of age.
Thank you for reading.

How can you tell if someone is cutting you off from a wifi connection on your laptop or is it just a weak wifi signal?

I need your knowledge and/or opinions about this since I'm concerned if someone is doing it, or if the WiFi signal isn't strong.
My laptop is connected to WiFi that I do not own (they know that it is connected and they know it's me), and I am just watching YouTube videos, then after like 7 minutes I get disconnected from WiFi. When that happens, I just restart my laptop and it auto-connects to the WiFi. The fastest that I got disconnected is when the moment I opened my Google Chrome browser.
My laptop is near to the modem/router. This is happening like when I feel like it's coming and it's kinda fast. Here are my questions about this:
I use an add-on VPN for my Google Chrome browser, does this affect my connection?
They use an Apple iPhone. Could it be that they're disconnecting it from the phone?
Does a USB WiFi adapter help, and is there a USB WiFi adapter without needing to put in WiFi info?
Is there any software that can help me detect if someone is cutting me off from the WiFi connection?
Maybe there's an app they use that can disconnect me from WiFi?
What are my defense options?
Maybe it is because of the brand of the laptop?
I've burnt out of questions for now, but there must be more. Please help.
I also just saw that my Internet connection got disconnected then reconnected again in just like 1 or 2 seconds.
It doesn't sound like they are 'disconnecting' you. To me, I would first check the DHCP settings within the WiFi router, but if you don't own it, that might not be possible.
It sounds like you are unable to maintain a valid IP address. I think this is happening due to the fact that when you restart your machine, and request a new IP, it seems to work for a short period of time. It's a tough problem to troubleshoot without more information though.

Wifi assist on iOS not working

I have next case:
Wifi assist enabled
I connected my iphone to WIFI without inet
connection
I enabled Cellular Data(mobile data)
My app cant send requests. Network is unreachable.
I try open some page with safary, but "server cannot be found"
I thougth if I enable assist, ios should switch between GSM and Wifi, am I right?
Any idias or advice
I have had this problem too for a long time. Talked to Apple about it online but their solution was not to forward this to their developers for a bug fix, but to install the next update and see if this helps. So Apple's solution is to not do anything. Thanks for that.
The issue seems to be that the wifi assist only works on wifi signal strength and not on the ability to actually meaningfully transfer data to load even the most fundamental of website homepages. There is only one solution at the moment and that is that when you encounter these wifi networks that load nothing, that you have to go into your wifi option in settings and manually 'Forget this network'.
Not ideal but that's the only solution I have that seems to work.

iOS ignoring NodeMCU http server response and browser shows no connection

So I recently got a nodeMCU Lua V1, I started it up connected to my WiFi, and loaded the default HTTP server from https://en.wikipedia.org/wiki/NodeMCU#HTTP_server. Excitedly I did a port forward on my ADSL router and asked friends to connect to see my hello world response. My friends that has apple devices (iPhone/iPad) where unable to load the website. Where as friends with android devices or computers had no trouble viewing the site. I tried using my iPad that is on the same WiFi network. It also had this behavior. To find out what is going on, I tried different browsers on the iPad. I did a Wireshark trace and saw the NodeMCU sending the response to the iPad. But the iPad kept showing either connection error, or a you are offline message. Thinking it might be html headers that is missing I changed the response the nodeMCU is sending to:
<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>
Still the iPad showed the same message.
So my question is why is iOS behaving this way, what is blocking it and making the browser think it has no internet connection? Is the browser on iOS behaving this way, or is the OS doing something odd. What would I need to do in order for an iOS device to see the web page?
Oh man, that Wikipedia article really is awful (also see https://github.com/nodemcu/nodemcu-firmware/issues/832). I've seen this code example many times but never realized where it originated from.
First of all, you shouldn't use the old 0.9.x binaries your NodeMCU module probably come loaded with. They're no longer supported and contain lots of bugs. Build a custom firmware from the dev or master branch. Second, checkout the official documentation on socket:send() to learn how to do that properly.
The actual problem though is conn:send("<h1> Hello, NodeMcu.</h1>") because that message is NOT a valid HTTP response. You need to prefix that with HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n.
Similar questions & answers are here and here.

How to get the device name and type of device while scan local network?

I am scanning my local network and i am getting their ip and their mac address, but i want also the device name like "Hassan's Iphone" and type of device, so help me how can i get this.
thanks in advance
I think you need to have a look at something like in the following link:
Stumbler
We deal with anything wireless on the iPhone: 802.11, GSM, and Bluetooth.
Stumbler lets you view the wireless networks in your area. While right now Stumbler only handles 802.11 networks, soon you should see Bluetooth and GSM capabilities as well. Stumbler is still in a early Alpha stage, but it is fully functional, and pretty stable
However they also thoroughly mention that:
Stumbler can not be distributed through the app store, as it uses private APIs!
Following is the link to the blog post where I found the above Stumbler Google Code Project!
So I'm not sure even if what you require is possible to do, it won't be able to publish through the Apple App Store.
You better read the following StackOverflow answers too:
Programmatically finding IP address of another computer on LAN
gethostbyname xcode issues
https://stackoverflow.com/a/27099363/1752988
How Scan devices in a LAN network
Another blog post which mentioned about Stumbler tool
iOS. get other device/computer name by IP in the same local network
iOS - How to get device make and model?
LAN-Scan Git Hub Project
I think it's better next time before you put a StackOverflow Question please research on the web using Google and StackOverflow both together!

Resources