Using an old iPhone 4s to connect to internet to develop apps
Solution 1:
Is your iPhone 4s running (at least) iOS 7.1? If so, then I believe this support page from Apple should do the trick:
https://support.apple.com/en-ca/ts1559
If neither of Apple's instructions work, then one idea is to you back up your iPhone using iTunes and restore the device. I recommend making a clean restore. If the Wi-Fi works, then you can either leave it as it is or go ahead and restore again, but this time, using the backup that you made on iTunes.
If that still doesn't work, then... well, I don't usually recommend this, but you could jailbreak the iPhone and try a fix from there. I'm not entirely familiar with that process, but that's the only other thing that I can possibly suggest. Otherwise, you're out of luck (unless you want to try the Apple Store to get it fixed/replaced, but I think that it'd be a waste of your time).