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 Zero WiFi not working after first reboot #1012

Closed
stevexz opened this issue Jun 29, 2017 · 12 comments
Closed

Pi Zero WiFi not working after first reboot #1012

stevexz opened this issue Jun 29, 2017 · 12 comments
Labels

Comments

@stevexz
Copy link

stevexz commented Jun 29, 2017

Hi,

using the standard procedure wpa_supplicant.conf to add WiFi for the Pi Zero.
Works as intended at first boot and everything seems ok.

But when I from the web admin interface makes some changes like change of time zone and then reeboot I get Starting wpa_supplicant: failed

Tried with both stable and latest.

@ccrisan
Copy link
Collaborator

ccrisan commented Jun 29, 2017

How does your wpa_supplicant.conf look like before (i.e. the one you supply) and how does it look like after the changes (/data/etc/wpa_supplicant.conf)?.

@stevexz
Copy link
Author

stevexz commented Jun 29, 2017

Before:
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
scan_ssid=1
ssid="''''''''''''''''''''"
psk="'''''''''''''''''''''"
}

After change(before reboot, with nano):
update_config=1^M
ctrl_interface=/var/run/wpa_supplicant^M
^M
network={^M
scan_ssid=1^M
ssid="***********"
psk="**********"
}

@ccrisan
Copy link
Collaborator

ccrisan commented Jun 29, 2017

This doesn't make too much sense. The ^M is something that windows machines would add. However they shouldn't affect the file. Besides that, the file looks identically to me.

@stevexz
Copy link
Author

stevexz commented Jun 29, 2017

The situation with the reboot is the same as if you at first boot did forget the wap_supplicant and add it before next boot.

Maybe the wpa_supplicant is still on \boot and then overwrites the present?

@flatlining
Copy link

flatlining commented Jul 12, 2017

Same problem here, I notice that the /etc/wpa_supplicant.conf file on the partition created on the remaining space (not boot nor root) key_mgmt=NONE is added to the network and if I deleted the zero w connects again.

But any change done (e.g.: timezone or password) were not saved, and if I try again it happens again (key_mgmt=NONE added to the file).

Hope I helped somehow.

EDIT: added file content that leads to error

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=BR

network={
    ssid="WifiSSid"
    psk=wpa_passphrase
}

After try to config something and rebooting

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=BR

network={
    ssid="WifiSSid"
    psk=wpa_passphrase
key_mgmt=NONE
}

@jasaw
Copy link
Collaborator

jasaw commented Jul 14, 2017

Interestingly, I'm seeing this issue happening on my 2nd router. It keeps adding key_mgmt=NONE just like @flatlining is seeing. Works fine on my 1st router.

@jasaw
Copy link
Collaborator

jasaw commented Jul 14, 2017

Very interesting... I found a workaround to prevent it from adding the key_mgmt=NONE by adding another "network" block to confuse it. Make sure your actual network block is the last one in the file.

Example:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=AU

network={
        ssid="Dummy SSID"
        psk="Random Text"
}
network={
        ssid="Actual SSID"
        psk="Actual Password_Text"
}

Start with a fresh image, copy this new wpa_supplicant.conf to your boot partition and let it boot up. See if this works for you guys.

@ccrisan
Copy link
Collaborator

ccrisan commented Jul 14, 2017

Guys, can I have a wpa_supplicant.conf file before it gets the key_mgmt=None line? Also I'd need to have some insights on the ssid and psk. Normally, the key_mgmt=None is added when no psk is supplied (assuming an open network).

@jasaw
Copy link
Collaborator

jasaw commented Jul 14, 2017

Actual file:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=AU

network={
        ssid="Dummy Wifi"
        psk="Dummy Password"
}

network={
        ssid="DarkNet"
        psk=3d04392b31763f7c7212f158067b1eaea1706ccef18ce6c96eb392b1e8eb3241
}

@ccrisan
Copy link
Collaborator

ccrisan commented Jul 14, 2017

@jasaw Is this the file that is modified with key_mgmt=None by motionEye? Or is this the one that works?

@jasaw
Copy link
Collaborator

jasaw commented Jul 14, 2017

That's the file that works. Just remove the "Dummy Wifi" network block and it stops working.

@jasaw jasaw added the bug label Jul 31, 2017
@ccrisan
Copy link
Collaborator

ccrisan commented Aug 5, 2017

motioneye-project/motioneye@e895ff4 fixes this by adding support for hex-encoded PSKs.

@ccrisan ccrisan closed this as completed Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants