My Macbook Pro (13-inch Early 2015 model) is having an issue where the Wi-Fi connection drops out every few seconds. The status will be set to "on" for three seconds and then switch to "looking for networks" for another three seconds and continue to go back and forth. This happens in different locations (independently of the Wi-Fi connection used) and has persisted through software updates (recently updated to Mojave). How might I fix this?
Here is the official link about how to troubleshoot Wi-Fi connectivity:
If the issue still persists, you could refer to the answer in this post:
• open Automator, select Application
• add a Shell Script item
• enter the following command in it: ping -i 0.2 192.168.1.1 (or whatever the IP of your router is)