I wouldn't know how to solve your problem, but I might have a temporary solution.
If you have an old android phone laying around, you could connect the phone to the WiFi and then connect it to the machine with a USB cable. Next up you enable USB tethering in the settings and then your machine should be connected to the Internet and the phone will stay charged.
I have no clue whether this trick would work as well with iPhones