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

    Is there a terminal command to disable the mobile data connection?

    Scheduled Pinned Locked Moved Unsolved Support
    2 Posts 2 Posters 22 Views 2 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.
    • Linus67L Offline
      Linus67
      last edited by

      Is there a simple command to disable mobile data in a script?

      nmcli radio wwan off
      nmcli connection down

      gsettings set com.lomiri.touch.connectivity.cellular data-enabled false
      gsettings set com.lomiri.touch.connectivity.cellular data-active false

      dbus-send ... com.canonical.Unity.Connectivity.SetCellularDataEnabled boolean:false

      /usr/share/ofono/scripts/deactivate-context /ril_0 1 (APN-Kontext entladen)
      /usr/share/ofono/scripts/set-gprs-powered /ril_0 false (GPRS-Modul abschalten)
      /usr/share/ofono/scripts/set-tech-preference /ril_0 gsm (Drosselung auf 2G/GSM)

      Nothing disables mobile data

      Pixel 3a, works with NextCloud, pihole, Wireguard VPN, Trilium, GhostCloud, Paperless ngx...and a lot of great apps from the Open Store.

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        gpatel-fr @Linus67
        last edited by

        @Linus67

        try

        dbus-send --session --type=method_call --print-reply --dest=com.lomiri.connectivity1 /com/lomiri/connectivity1/Private org.freedesktop.DBus.Properties.Set string:com.lomiri.connectivity1.Private string:
        MobileDataEnabled variant:boolean:true
        
        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post