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

when i enter password zzzzzzzz to rpi-config-app wifi network within my android phone. It always show obtaining IP address #21

Open
girishk55 opened this issue Feb 21, 2017 · 12 comments

Comments

@girishk55
Copy link

No description provided.

@sabhiram
Copy link
Owner

As soon as you enter the password, it should immediately store this info on the Pi and reboot. The UI will probably not update but the Pi should now be connected to your Wifi.

@avassdal
Copy link

I have the same problem. The problem is that i never get an IP, so this is related to the DHCP-server

@avassdal
Copy link

When i do ip addr show dev wlan0 i get:wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether a0:2c:36:89:2d:1d brd ff:ff:ff:ff:ff:ff

So no ip is set on the wlan0 interface

@sabhiram
Copy link
Owner

Oh interesting. Could you post what type of network adapter you are using for wifi? Could it be that wlan1 or wlan2 are active?

@avassdal
Copy link

avassdal commented Mar 15, 2017

No, i only have wlan0

> [email protected] start /home/chip/raspberry-wifi-conf
> node server.js


/home/chip/raspberry-wifi-conf/app/wifi_manager.js:136
            info["hw_addr"].toLowerCase() == info["ap_addr"].toLowerCase() &&
                                                             ^
TypeError: Cannot call method 'toLowerCase' of undefined
    at _is_ap_enabled_sync (/home/chip/raspberry-wifi-conf/app/wifi_manager.js:136:62)
    at _is_wifi_enabled_sync (/home/chip/raspberry-wifi-conf/app/wifi_manager.js:115:28)
    at /home/chip/raspberry-wifi-conf/app/wifi_manager.js:126:35
    at /home/chip/raspberry-wifi-conf/app/wifi_manager.js:90:20
    at /home/chip/raspberry-wifi-conf/node_modules/async/lib/async.js:251:17
    at /home/chip/raspberry-wifi-conf/node_modules/async/lib/async.js:154:25
    at /home/chip/raspberry-wifi-conf/node_modules/async/lib/async.js:248:21
    at /home/chip/raspberry-wifi-conf/node_modules/async/lib/async.js:612:34
    at /home/chip/raspberry-wifi-conf/app/wifi_manager.js:76:17
    at ChildProcess.exithandler (child_process.js:645:7)

`

I use Realtek 8723DS, which is functionally the same as Realtek 8723BS

The AP and DHCP server works fine if i set a static ip manually on wlan0

@sabhiram
Copy link
Owner

I think in the event that the AP is not enabled yet - this crash could occur since the _get_wifi_info() method only creates sane defaults for the hw_addr, inet_addr and unassocated fields, and ignores the ap_addr which does not (yet) exist.

@sabhiram
Copy link
Owner

Please check out the latest version with this commit: a719c76

@avassdal
Copy link

Still no DHCP:

sudo npm start

> [email protected] start /home/pi/raspberry-wifi-conf
> node server.js


Wifi is not enabled, Enabling AP for self-configure

Force reconfigure enabled - reset AP
... hostapd restarted!
... AP Enable Success!
wlan0     Link encap:Ethernet  HWaddr a0:2c:36:89:2d:1d  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:378 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:42900 (41.8 KiB)  TX bytes:4038 (3.9 KiB)

AP works and i can connect, but no dhcp.

@sabhiram
Copy link
Owner

Try this in a command line after the AP is up: service isc-dhcp-server restart

This should in theory update and restart the DHCP service. I wonder if maybe the template that was written to the file is missing. I wish I had more time to dig into this, but my startup has me putting in crazy hours as evidenced by my public commit logs recently (the last 2 years).

@avassdal
Copy link

This is the output from service isc-dhcp-server restart

● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server)
   Active: failed (Result: exit-code) since Sat 2017-03-18 13:12:13 UTC; 1min 30s ago
  Process: 461 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Mar 18 13:12:11 pi dhcpd[468]: 
Mar 18 13:12:11 pi dhcpd[468]: No subnet declaration for wlan0 (no IPv4 addresses).
Mar 18 13:12:11 pi dhcpd[468]: ** Ignoring requests on wlan0.  If this is not what
Mar 18 13:12:11 pi dhcpd[468]: you want, please write a subnet declaration
Mar 18 13:12:11 pi dhcpd[468]: in your dhcpd.conf file for the network segment
Mar 18 13:12:13 pi isc-dhcp-server[461]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Mar 18 13:12:13 pi isc-dhcp-server[461]: failed!
Mar 18 13:12:13 pi systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Mar 18 13:12:13 pi systemd[1]: Failed to start LSB: DHCP server.
Mar 18 13:12:13 pi systemd[1]: Unit isc-dhcp-server.service entered failed state.

Thank you for all your help in troubleshooting this!

@sabhiram
Copy link
Owner

No problem, lets see if we can get to the bottom of this :)

Can you go through the Gotchas section of the readme (https://github.com/sabhiram/raspberry-wifi-conf/blob/6b5949d052af7703b20c87033ff087c149b0573f/README.md#gotchas) and let me know if your adapter is behaving? You might have to update the hostapd binary. You probably already read that, but just making sure ;)

@avassdal
Copy link

Yes, i have done that, but the correct driver is nl80211, so it does not work if i update the hostapd with the rtl871xdrv driver

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

3 participants