I believe my question is different from the suggested duplicate in that the other questioner never had access to the internet over Wifi, whereas I had access to Wifi without any problems for one week but no longer do. Along with a fix, I am asking to debug it to see what happened. KDMs answer also permitted me to reactivate the WiFi without restarting; whereas the other answer required a firmware update and a restart.
I hooked up my new Raspberry Pi 3 and the Wifi was very easy to set up. However, about 1 week after this I could not SSH into the pi. My router's UI didn't show the RPI3 registered any more over Wifi.
I plugged in an Ethernet cable and my Pi immediately registered with my router. I SSH'd into it and attached to my session of
screen and saw that my application was still running. This means the Pi never turned off or restarted -- only the Wifi stopped working. It has been about one more week and the Wifi has never come back online by itself. My RPi2, cellphone, laptop, etc. still have access to WiFi.
Aside from doing a restart, how do I fix this? How do I debug this?
Update: @KDM's solution, which use used on RP1/RP2 for wifi dongle problems, also worked for me (I believe this proves that this question is not a duplicate):
sudo ifdown wlan0 sudo ifup wlan0
However, I am concerned that the WiFi stopped working in the first place. I don't want to have to plug in an ethernet cable and issue these two commands every week. I have two RPI 1s with two different WiFi dongles. One of them never had any issues at all, while the other one needed to be restarted every so often. I'm worried that there could be something wrong with the RPI3's in built WiFi.
I have the latest version of Raspbian Lite, version March 2016.
sudo apt-get dist-upgrade shows that the following packages will be upgraded:
apt apt-utils gnupg gpgv initramfs-tools libapt-inst1.5 libapt-pkg4.12 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libhogweed2 libnettle4 libpcre3 libsystemd0 libtalloc2 libudev1 libwbclient0 locales multiarch-support openssh-client openssh-server openssh-sftp-server raspberrypi-sys-mods raspi-config samba-common ssh systemd systemd-sysv tzdata udev
sudo iwlist wlan0 scan > scan.log and find my SSID in the list. I can post this if it would be helpful.
ifconfig shows the
I am using the default
/etc/network/interfaces file that comes loaded on Raspbian Jesse for RPI3:
source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf