Score:1

How to connect to my phones's hotspot automatically as soon as it is detected by my desktop?

mx flag

I have two devices through which i access the internet on my Ubuntu 21.10 desktop:a portable broadband device (always active/on) and my android phone's hotspot (active occasionally to save battery). Everytime i want to connect to my phone's hotspot i turn on my phone's hotspot, open ubuntu's settings, go to WiFi and then wait a few seconds for the hotspot to get discovered by the Wifi adapter and then select it and get on with my work. All of this is natural and there's no abnormal delay as such in this process but since i switch between my phone and the broadband device in the settings several times in a day it all adds up quickly and becomes really annoying and breaks my workflow. I use keyboard-shortcuts to open the settings but i still have to deal with the few seconds of wait when the hotspot is yet to be discovered by the wifi-adapter.

Aim - I want to switch to my phone's hotspot (with a terminal command) as soon as it is discovered by my desktop/wifi-adapter so that i can assign a keyboard shortcut for it in the end to make my life easier. How do i do that?

nobody avatar
gh flag
Please check if https://askubuntu.com/questions/947965/how-to-trigger-network-manager-autoconnect working.
Terrance avatar
id flag
I don't think that eliminating the connection delay is possible unless you have a WiFi card that is capable of supporting multiple networks, see https://unix.stackexchange.com/questions/328212/single-wifi-card-connect-to-multiple-access-points-simultaneously , or if you have a second card that will allow you to connect to a second access point before disconnecting from the first. That is how cell phones work is that they can be on the mobile network then switch priority over to the WiFi once the connection is fully established but they also still take seconds to connect to WiFi.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.