This has troubled me for a long time and even after a replacement. wifi looses connection after a peroid time of inactivity, typically in a few hours. The only way to re-connect it is to restart it. I have tried all possible suggestions I can find here and elsewhere, and nothing worked.
I decided that it has to be a hardware problem, most likely due to faulty wifi card. So I took it apart, find the model of wifi card, and bought one, replaced it. Now, the connection has been rocket solid for last week and I believe I finally solved the problem !!!
1. the wifi card is located in the head unit, right behind its camera. you only need to unscrew four screws on the back to get the cover off and you will see the wifi card. extremely easy
2. the wifi card is of a model MM200-M. I googled it and found it in www.pchub.com -- 802.11b/g PCI Express half-height mini card MM200-M. bought it for ~$10 including shipping, and it actually showed up in my doorstep in about a week shipped from singapor.
3. the wifi card is soldered to the circuit board on the opposite end of common pci slot. you will need to get your iron to get it off. which will take a bit of soldering skills but nothing special, just be careful and slow, remove one bit a time
4. finally, insert the new card in the pci slot, put solder the other end back. and you are all good to go.
I can't believe that Rovio used such low quality card that probably costs $5 to them in a toy sold for hundreds of dollars, and create such wide spread problem.