To configure the wifi you should only need to edit file /etc/wpa_supplicant/wpa-supplicant.conf. If you have made any changes to other files then put the files back to how they were before you edited them.marciokoko wrote:Well something must be wrong because it just doesnt connect. I added your corrections to the wpa_supplicant.conf and it still wont connect. Do I need to remove that ether thing I put into the cmdline or config file?
There is a very simple way to set up the wifi on a Pi 0 if you use one of the new Raspbian images. After creating the SD card and booting the Pi 0 this will also allow you to connect to the Pi 0 using SSH to enable you to make any other changes to the set up if you need to.
Format the SD card and then copy the latest Raspbian image to the card. I use image 2017-04-10-raspbian-jessie-lite. I do this on a Windows 7 laptop using SDFormatter and Win32DiskImager. I have a copy of two files wpa_supplicant.conf and ssh on my Windows 7 laptop. The ssh is blank but you can also use a file name ssh.txt which is easier to make on a Windows system. The contents of the ssh/ssh.txt files is ignored. I then copy these two files to the boot partition on the SD card while it is still plugged in to my Windows 7 laptop. I then safely remove the SD card from my laptop.
The wpa_supplicant.conf is used to configure the wifi and the ssh/ssh.txt file is used to enable ssh which is now disabled by default as a security measure.
Now plug the SD card in to the Pi 0 and boot the Pi 0 with the wifi adapter connected to the Pi. The file wpa_supplicant.conf will be moved from the boot partition to /etc/wpa_supplicant/wpa_supplicant.conf to configure the wifi and file ssh/ssh.txt will make the Pi set up to allow connecting to the Pi using SSH. The two files will then be removed from the SD card /boot directory.
The set up can take a few minutes. Then check your router to see if the Pi is connected and get the IP address of the Pi so you can connect to it using SSH.
I have tested this using WEP using the format of the wpa_supplicant.conf file set up for WEP as in my earlier post and it works OK for me.
There is info somewhere on the Raspberry Pi web site about this but I haven't been able to find it.