I use my iPhone 3G for listening to music, that's the reason I ignored the fact that the wireless signal wasn't working properly.
Behavior: when scanning for Wifi networks the list was always empty. Placing the iPhone 3G on top of the the wireless router made the network visible again. Taking the iPhone away from the wireless router resulted in network disconnection.
Solution: The "reset network settings" option had no effect. After watching a few videos on YouTube I opened the iPhone to analyze if there's a hardware issue.
First in mind there was a re-soldering of the Wifi/Bluetooth chips. Before getting the big guns out, the hot air station, I measured the wifi antenna continuity: from the main board connector to the screw that held the antenna. The wire inside the flex cable was broken so the wifi antenna was disconnected.
With a little bit of solder I connected a wire from the coax connector to the antenna.
Result: Wireless working on my iPhone 3G. Signal strength - about 80% of the initial factory signal.
If I replaced the entire antenna maybe the signal strength would be better, but I didn't have that spare part when I opened the iPhone.
You need to link points A and B (solder a wire between them).
Or just buy a replacement spare part antenna, if you're not in a hurry.