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

Connects to IP 192.168.44.1 and no wireless interfaces found #24

Open
mikaye opened this issue Jun 15, 2017 · 23 comments
Open

Connects to IP 192.168.44.1 and no wireless interfaces found #24

mikaye opened this issue Jun 15, 2017 · 23 comments

Comments

@mikaye
Copy link

mikaye commented Jun 15, 2017

Everything ran fine on RPi3 until I "Submitted" the new ssid/pwd on mobile. At that point, the i[ address was assigned as 192.168.44.1 . If I run the node app again it shows wifi enabled and IP 192.168.44.1 .

Upon rebooting, "no wireless conection" and eth0: Link is down.

Tried resetting all networking files but missing something.

Thoughts?

@sabhiram
Copy link
Owner

Hmm, this was written before the pi3 was released. I just got around to getting my hands on one. I found myself with a bit of time lately, and was going to re-write this utility in golang and make it a tad more robust. With that aside, I think the app is (incorrectly) thinking that it was successful in connecting to your wifi.

Let me fire this up on my pi3 in the next day or so and see what's up. Stay tuned.

@jackneil
Copy link

jackneil commented Sep 4, 2017

I second this. Same thing here.

@shawnipoo
Copy link

I third this. Same thing. After installing dnsmasq instead of dhcpd to act as the DHCP server, it will broadcast the AP network, and allow me to connect to a new network. Note that once connected, it does not restart. Once connected, all works well until a restart when the settings are not saved and it again broadcasts the AP network.

@sabhiram
Copy link
Owner

sabhiram commented Sep 7, 2017

I got this installed on my pi3, ill see about reproducing the issue - thank you.

@bkcoughlin
Copy link

bkcoughlin commented Sep 7, 2017 via email

@shawnipoo
Copy link

Amazing! Thank you so much for getting this up to date...
I have tried installing the latest version of Raspbian from scratch (not the lite version) and it presents quite a few errors on install!

@sabhiram
Copy link
Owner

sabhiram commented Sep 8, 2017

I am going to be a bit preoccupied for the next few days, @shawnipoo - any chance you can point me to what might be going afoot? This feels like something different than the issue being discussed? Regardless, I have this reproduced on my rpi3 - much thanks for the data point @bkcoughlin - there might be something there for sure.

@sabhiram
Copy link
Owner

sabhiram commented Sep 8, 2017

Made a few commits and edited the readme to reflect some findings. I think you guys probably updated raspbian and it installed dhcpcd as part of the gamut of tools. Explicitly denying it from dhcp'ing wlan0 (for example) seems to be required.

Also the correct detection of the access point was broken due to how iwconfig seems to now behave in raspbian as well.

Please let me know if this helps at all, my pi3 seems to connect just fine with the changes mentioned running the latest code.

@shawnipoo
Copy link

Wouldn't we have to stop dhcpd prior to executing npm? Moreover, with dhcpd ignoring wlan0, what would act as the DHCP server?

Finally, with the changes you make, can we still install through:
$git clone [email protected]:sabhiram/raspberry-wifi-conf.git
$cd raspberry-wifi-conf
$npm update
$bower install
$sudo npm run-script provision
$sudo npm start

Thank you so much for looking into this! AWESOME!

@sabhiram
Copy link
Owner

dhcpcd is a new binary that is installed in some versions of raspbian, we still use the isc-dhcp-server for dhcp etc. The line in the config is to prevent dhcpcd from taking over wlan0.

@shawnipoo
Copy link

shawnipoo commented Sep 10, 2017

I think there needs to be a delay set for something to load. When I set it up as a service, it fails, however, when I run it about 30 seconds after boot, it seems to work.

That being said, for whatever reason, the only network I can see is:
{{ cell.ssid }} {{

which cannot be selected :S

Moreover, the network broadcast only last about a minute, then it does not work anymore and no longer broadcasts, even though no error is thrown and the script says HTTP server running... Seems like hostapd fails because it starts broadcasting again when I restart hostapd.

Any advice?

@sabhiram
Copy link
Owner

try this -

sudo service isc-dhcp-server restart
sudo ifdown wlan0; sudo ifup wlan0
sudo service hostapd restart

@shawnipoo
Copy link

shawnipoo commented Sep 10, 2017

OK, so after much playing around, I realized three things:

  1. As as service, it does not run properly. It simply does not enable the interface.
  2. If I remove the service and execute it from the shell, it does the same thing regardless of the state of the connection, ie:
    i. If there is an existing connection, it closes it, tries to enable to AP but fails to enable the interface. When we restart isc-dhcp-server and hostapd, it will broadcast the AP, but as soon as you restart npm, it closes the connection until you restart npm a second time (ii).
    ii. If there is no connection, it closes it, re-enables the AP and succeeds to allow a wifi network selection.
  3. Once a wifi network is selected, it connects to the network, but does not reboot, however, the configuration is maintained. Note that if the wifi network is removed and there is no connection, we are back to (2) above.

It seems that the root of the issue is that it does not know when a connection is made or not.

@sabhiram
Copy link
Owner

Are you positive you have pulled the latest code?

@shawnipoo
Copy link

Well, I've done a brand new network install of Raspbian, so it's the latest version, and I've followed your guide to install:
$sudo apt-get install npm
$sudo npm install -g bower
$git clone [email protected]:sabhiram/raspberry-wifi-conf.git
$cd raspberry-wifi-conf
$sudo npm run-script provision
$sudo npm start
$echo "denyinterfaces wlan0" | cat - /etc/dhcpcd.conf > /tmp/out && sudo mv /tmp/out /etc/dhcpcd.conf

So I imagine so... The only errors I get are that bower is outdated, and that the DHCP server could not assign an IP (because it is already connected during the install)

Am I missing something?

@shawnipoo
Copy link

Hey! Any updates? Alternatively, could you possibly provide an ISO image of a full ad card working on a pi3?

@adilberrada
Copy link

Hi shawnipoo,

I am having the same problem with "{{ cell.ssid }} {{". Did you manage to get it work ?

thanks !

@shawnipoo
Copy link

Well, I reinstalled it and that particular problem went away.. I still, however, do not have it working properly (ie: broadcasting when not connecting, restarting after entering the code...)

I think a working ISO would be great!!

@sabhiram have you installed this using Raspbian or another OS?

@shawnipoo
Copy link

Any updates?

@sabhiram
Copy link
Owner

sabhiram commented Sep 29, 2017

Sorry, been busy juggling a bunch of startup work :)

I will dig into this before this weekend and see what is going on with a latest raspbian image.

{ I did not realize how quickly weekends come and go, I will take a pass at this as soon as I catch a break from work. }

@sabhiram
Copy link
Owner

sabhiram commented Oct 2, 2017

@shawnipoo - My last attempt left me with it working on Raspbian from probably 2 months ago. I am not sure if it has been updated since. Nonetheless I will try it from scratch (hopefully) soon and report back.

@shawnipoo
Copy link

Thank you so much!

@sabhiram
Copy link
Owner

Anyone having issues on a Pi3, please check this PR on how to use dnsmasq instead: #33

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

6 participants