UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to disable autoconnect for known Wi-Fi connections?

    Scheduled Pinned Locked Moved Solved Support
    14 Posts 6 Posters 1.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • S Offline
        sven
        last edited by

        @AppLee This rough workaround is ok.

        @zubozrout Unfortunately, the change has no effect before a reboot. After a reboot, I could not reactivate the connection by removing autoconnect=false.

        VollaPhone22 (dual-boot of VollaOS and UT 20.04 OTA-5), Pocophone F1 (pmOS, edge)

        AppLeeA Z 2 Replies Last reply Reply Quote 0
        • AppLeeA Offline
          AppLee @sven
          last edited by

          @sven
          I think you can try to connect manually by tapping on the wifi SSID (white label) with autoconnect=false but I'm not sure it will work.
          I think changes to /etc/NetworkManager/system-connections/MyNetorkSSID are only applied after a reboot.

          1 Reply Last reply Reply Quote 0
          • mateo_saltaM Offline
            mateo_salta @sven
            last edited by

            @sven i had a bug filed sonewhere to enable that setting, although the existing gsetting seems not to work

            1 Reply Last reply Reply Quote 0
            • Z Offline
              zubozrout @sven
              last edited by

              @sven said in How to disable autoconnect for known Wi-Fi connections?:

              autoconnect=false

              Weird, I've just tried it and upon inserting autoconnect=false to the [connection] section in that file the respective WiFi network is not autoconnected on reboot and only if clicked on in the list of available WiFi networks with the UI. I am not sure if you need a different usecase and I misunderstood that but this config should definitely work as the network manager on the phone is basically the same thing as the one you can find on the desktop.

              Perhaps a stupid question to ask but did you save the changes in the file before leaving the nano text editor? As I have no idea what else could cause the issue. Also for changes to this folder remounting / fs to read/write should not be necessary.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sven @zubozrout
                last edited by sven

                @zubozrout Thanks for checking; and yes, that is the behavior I am looking for, but I cannot reproduce it on my device. What device and UT version did you use for your test?

                VollaPhone22 (dual-boot of VollaOS and UT 20.04 OTA-5), Pocophone F1 (pmOS, edge)

                Z 1 Reply Last reply Reply Quote 0
                • K Offline
                  kugiigi
                  last edited by

                  You can also run this instead of rebooting πŸ˜„
                  sudo service network-manager restart

                  1 Reply Last reply Reply Quote 1
                  • Z Offline
                    zubozrout @sven
                    last edited by zubozrout

                    @sven Meizu MX4, latest devel. But I don't think this could be device or some OS version specific :(, so have no idea what could be causing NetworkManager to ignore these config file changes. After all it must be using them since it autoconnects to known networks listed in that /etc/NetworkManager/system-connections folder.

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      kugiigi @zubozrout
                      last edited by

                      @zubozrout Try to check the previous networks list. Some networks are duplicated and maybe the one you modified isn't the one you connected.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sven @kugiigi
                        last edited by

                        @kugiigi Thanks for your help. I can confirm that your method works on my OnePlus3T. The problem on the Cosmo seems to be a more general Wi-Fi problem that is Cosmo-specific. (In short: the Wi-Fi interface is named wlan0 instead of wlp1s0 in normal UT, see https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/issues/4 )

                        VollaPhone22 (dual-boot of VollaOS and UT 20.04 OTA-5), Pocophone F1 (pmOS, edge)

                        arubislanderA 1 Reply Last reply Reply Quote 0
                        • arubislanderA Offline
                          arubislander @sven
                          last edited by

                          @sven said in How to disable autoconnect for known Wi-Fi connections?:

                          The problem on the Cosmo seems to be a more general Wi-Fi problem that is Cosmo-specific. (In short: the Wi-Fi interface is named wlan0 instead of wlp1s0 in normal UT, see https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/issues/4 )

                          I doubt very much that the name of the wireless network interface is contributing to the problem. The name the kernel assigns to an interface is based on the actual hardware and the kernel version.
                          For instance the wifi interface is also called wlan0 on my Meizu Pro 5. And wifi hotspot works on his device.

                          πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                          Happily running Ubuntu Touch
                          Google Pixel 3a (20.04 DEV)
                          JingPad (24.04 preview)
                          Meizu Pro 5 (16.04 DEV)

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            sven @arubislander
                            last edited by

                            @arubislander OK, and I thought I had a suspect for the non-operational hotspot on the Cosmo 😞

                            VollaPhone22 (dual-boot of VollaOS and UT 20.04 OTA-5), Pocophone F1 (pmOS, edge)

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post