I have a bunch of RPi computers around my house connected wirelessly to my router and usually the connection is pretty spotty for the ones further away from the router.
Last week I got a pi0 w and ever since I tried to get wifi to work on it. I tried first stretch and then jessie and I did get it to work when it was very close to the router. In the process I learned various wifi commands like iw, iwconfig and iwlist, which I knew about, but never had to actually learn. So doing an
iwlist wlan0 scanning
on one of my working pi, I saw about 8 wifi networks available (me and my neighbors), most of them using the default channel 1 - just like mine. I figured this must be the reason for the weak connection for my distant PIs, so I set my router to channel 4. Lo and behold, all my RPis started to work flawlessly (knock on wood). All, except the pi0 w, that is.
Before switching the router to channel 4, I DID manage to get the pi0 w to work, in the very close proximity of the router. After switching to channel 4, with the exact same configuration as before, wlan0 does not have an IP address and route -n shows an empty routing table. The logs (journalctl) and iwconfig show it's not associated to anything. Then, it occurred to me that switching to channel 4 may have something to do with it, so I did
iw wlan0 info
which showed channel 1 (2412 MHz). Now I don't pretend to understand all the details of wifi communications, but since my router is set to channel 4, I would assume the wifi card should also be set to channel 4 as well. This certainly seems the case with my other (working) RPis, which all figured out on their own that they needed to be on channel 4. All my other RPis have edimax usb dongles.
So I tried to set the wifi card on the pi0 W to channel 4, but
iwconfig wlan0 channel 4
Error for wireless request "Set Frequency" (8b04) :
SET failed on device wlan0 ; Operation not supported.
I'm guessing this is a driver issue, or am I not doing this right?
I found this possibly related thread: https://github.com/RPi-Distro/repo/issues/51 so I replaced my
brcmfmac43430-sdio.txt with the one mentioned in the thread, but that didn't change anything.
Does anybody have the pi0 W working on a channel other than the default?
If it's any use, I also set my router to WPA2 only and 11n (300Mb), which the edimax of my other PIs seems to like. Can the pi0 W do 11n? Can this be the problem? I'm pretty sure it's the channel thing though. Sorry I can't post logs and such, since the pi is not connected.