Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi thinks it's connect to Wifi but doesn't an have internet connection. #23

Open
dlind28 opened this issue Mar 23, 2017 · 12 comments
Open

Comments

@dlind28
Copy link

dlind28 commented Mar 23, 2017

Fist awesome job on this! This is the only repo that I found that actually does this.
Here is the problem I'm running into:
I got it to send out the AP, connected to it with my iPhone. Went to the IP:88 and was able to choose a network and login and connect fine. Once I got it connected, the UI freezes (not sure if that is supposed to happen), then I realized I had my ethernet cable still connected. So I rebooted the RPi and tried the process again. However, when I start the server and it still thinks it's connected to wifi, but has no internet connection, and I haven't been able to connect to the server from my phone or computer since then.

  1. Is there a way to clear the memory of previous wifi networks?
  2. How can I make the Node server always appear in case I need to change the Wifi config again?
@dlind28 dlind28 changed the title Pi thinks it's connect to Wifi but doesn't an internet connection. Pi thinks it's connect to Wifi but doesn't an have internet connection. Mar 23, 2017
@sabhiram
Copy link
Owner

The freeze in the UI is the app trying to switch from AP mode to connected to your AP. However, the code probably does not gracefully handle the swapping of this.

As for:

  1. I think if we implemented Create a startup service to manage the wifi-conf utility #2 and hosted an endpoint which allowed you to "reset" it would nuke any old networks that it might remember.
  2. See Enable dual wifi interfaces, one as an AP - one as the wifi #1 :)

@sabhiram
Copy link
Owner

From what I can recall, the code will assume you have a valid wifi network connection if it manages to think that we have found a legit IP address on wlan0 (etc).

@sabhiram
Copy link
Owner

Could you tell me your version of raspbian and which type of Pi you are running on? Additionally the type of wifi (USB?) chipset would be valuable to know as well. If possible I can repro locally on one of the Pis I have sitting around.

@dlind28
Copy link
Author

dlind28 commented Mar 28, 2017

Yes thanks for your answers to 1 & 2. I'd have to dig a little deeper in your code to figure out exactly how to do that since I'm new to Node.js.

Yeah that's how I assume it would work, the console on the RPi says that it is connected, but when i try to browse the web, there is no connection. I'm not sure why it thinks it is connected. Reboot doesn't fix it.

I'm using a RPi 3 Model B and its got an integrated 802.11n wireless LAN running on Raspbian Jessie 2016-04-06.

@sabhiram
Copy link
Owner

Ok ill order one up and give it a test. I am happy to help you navigate the code (I think its all in one or two spots).

@dlind28
Copy link
Author

dlind28 commented Apr 5, 2017

@sabhiram did you get a chance to give it a test yet?

@sabhiram
Copy link
Owner

sabhiram commented Apr 5, 2017

Waiting on the Pi3 still. If you tear down the wireless network (wlan0) and reset the server - it should try and put it back into AP mode - its been a very long while since I looked into all this Node stuff so be warned :)

@dlind28
Copy link
Author

dlind28 commented Apr 18, 2017

Did you get it working with the model 3 yet?

@dlind28
Copy link
Author

dlind28 commented Apr 21, 2017

@sabhiram Still trying to figure this out. I'm having trouble figuring out where it is reading that Wifi is enabled and assigning an IP. Just trying to follow the functions in server.js, and need some guidance. I've tried tearing down the wlan0, but not totally sure what all needs to be done for that.

@OneStromberg
Copy link

@sabhiram hi there! I've got the same issue.
I can add that my router don't give an ip to the my Raspberry(Pi3b)

@squidmarks
Copy link

I too am stuck on this issue. Got it installed and running on a B+. On first run, it correctly determined that no wifi was configured and started AP mode. I pulled up the AP web page on my iPad, refreshed it and it showed all wifi networks. I stopped there as I did not yet want to select a wifi network, but wanted to do some tweaking first. But, when I ran it a second time, indicated on the console that wifi was enabled and it had a IP of 192.168.44.1 assigned. Perhaps another mechanism of checking for a valid wifi connection is needed (perhaps a ping to a known address?). It looks like that IP is configured as static when the AP is setup, so if it restarts without having a valid wifi setup, that statically assigned IP remains and fools the app into thinking it has an IP and valid wifi config.

Thanks in advance for any help on this!

Geoff

@sabhiram
Copy link
Owner

sabhiram commented Sep 8, 2017

Please check this issue: #24 (comment)

I am pretty sure the issues seen here are resolved. Sorry this took me so long :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants