@mitu Well... just installed Raspbian. Still can't connect to network.
Guess I'll look into troubleshooting that. Thanks.
This is stupid but I found solution. You need to connect an RJ45 (ethernet) cable to rpi port. Now you can run raspi-config without wpa-supplicant error and There was an error running option N2 Wi-fi.. Then can you now set ssid and password (now reboot or not) and wifi will works correctly.
When this wifi works correctly bluetooth too works good. When I had problem (like you) with wifi my bluetooth was non stop disconnecting.
@vance Even trying those URLs in a browser returns errors. Did you run sudo apt-get update first? Maybe the mirrors have been changed for China.
If that doesn't work you can try commenting out the Chinese mirrors and adding alternatives from this list https://www.raspbian.org/RaspbianMirrors to /etc/apt/sources.list
I'm not sure how that will work in China though so...
I have successfully gotten everything to work out now! I did a fresh install of Retropie 4.1, and the bluetooth connection worked straight away after installing the drivers. Maybe it is possible that trying to update Retropie from an older version was making something corrupt? I had not updated for probably close to a year or so, if not more. Even though I now have to reload all of my roms and everything, it seems like a small price to pay to get everything running smoothly. :) Hope this helps somebody else too!