(ps. I aplologise for any typo's, bad formulations, or something along those lines, and please keep in mind when reading through ths wall-of-text that when writing all of this it's late in the day for me, and my mind is almost starting to go soggy and lose cohesion at this point, so I didn't have sufficient capacity to make a TLDR, or going through and making things more readable, as at this point I have the need for a TLDR for the TLDR)
(Wasn't sure what "Flair" to use, networking, windows, or programming)
To start off with, I live in an appartment building connected to a public gym hall and music rooms used by the local school, with free public WiFi connection, which is still being tinkered with and changed from time to time, but this is not always the most brilliant thing...
So to tell a long(er) story short; I was given the password for the, a bit less-than-public WiFi network when i moved in, I got a nice, good, stable, and (relatively) fast network connection. And somewhere along the line, i got access to an appartment-specific WiFi that didn't work at first, then worked for a good while, then didn't work anymore, so back to the previous one... -_-
It worked like usual for a while, then I started noticing the sloooooooow-af connection, and discovered this was the case for all my devices, so it wasn't just my PC being nasty with me, and got the suspicion the net speed is being capped. intentionally or not, i have no idea.
Thus, I am in the unfortunate situation where my network speed is capped at somewhere between 250-300KB/s, when originally the speed is ideally supposed to be between 3-4MB/s.
I did however notice somewhere between stressing around and raging at my capped WiFi speeds, that when i disconnect and reconnect to the network i get, for a brief time, a sweet uncapped 30 seconds or so internet speed.
I have managed to scrunge up a very barebone but working cmd script (using a .bat lauched with a .vbs script file used with Windows Task Scheduler) to disconnect and reconnect to a WiFi router every time i see my network speed goes plummeting when i press a keyboard button (gaming keyboard with programmable macro buttons)
So this is the script i have put together after a few hours of looking through numerous webpages and guides, and cooling off my steaming brain with cold sodas.
This is the script in the wifi-connect.bat file i made,
netsh wlan disconnect name="Wifi name" ssid="Wifi name" netsh wlan connect name="Wifi name" ssid="Wifi name"
And this is the wifi-connect.vbs that i used (tried to use with limited sucess) with Windows Task Scheduler (I simply just copy-pasted this one without any knowlege about how it works, other than it works, not sure i even need it anymore)
CreateObject("Wscript.Shell").Run "C:\scripts\wifi-connect.bat", 0, True
Problem was, the wole Windows Task Scheduler was a complicated and very limited mess when it comes to things with getting the thing to run at a 30sec interval when the lower limit was 1min, tho i managed to get my 30 second interval by setting it to do a double executions with one having a 30 second delay, and getting it to trigger the task at login, but otherwise the system for the triggering mechanism was waaay over my head :'(
So thus, the tediousness of having to restart my PC all the time, the Windows Task Scheduler thing was mostly scrapped in my opinion, and i ended up here.
So my question is (or more along the lines of almost begging), is there anyone that can wrap their heads around this who might be able to come up with a simpler solution, or even a way to refine this into a more workable script I can actually use
I know not being able to connect to Wi-Fi is one of arch's most discussed topics, BUT I swear I've read and tried everything I possibly could, so here I am asking for support, thanking in advance anyone who'll try to help me not punch a hole in my monitor.
Cannot connect to Wi-Fi routers. Smartphone USB tethering works. Ethernet works. I'm using a Wi-Fi USB3 dongle (lsusb -tvv results: Realtek Semiconductor Corp. RTL88x2bu [AC1200 Techkey]). Installed latest drivers (rtl88x2bu-dkms-git 188.8.131.52.r93.f915368-1). ncli dev wifi list works and lists available connections correctly. Connections cannot be established though, no matter what tool I use. rfkill shows 4 wlan phy3 unblocked unblocked which makes me suppose device is not blocked anyway.
- nmtui: Lists connections. Ask for WPA key when trying to connect to my router. Takes a long time "Connecting..." then ends up with "Could not activate connection: Activation failed: The Wi-Fi network could not be found".
- nmcli dev wifi connect password bssid : Ends up with "Error: Connection activation failed: (53) The Wi-Fi network could not be found".
- Added (wifi.scan-rand-mac-address=no) to NetworkManager.conf and restarted the service. No success.
- rm'ed existing connections from /etc/NetworkManagesystem-connections/. No success.
- Used iwctl to station wlan0 connect "" wpa2 but got "Invalid network name ''". Found out iw doesn't like dashes and such in SSIDs, which my network has, so no-go for me.