[Question] How to enable cellular connection using terminal?
-
Introduction
Hi, I wrote few scripts that reconnect user to configured VPN in specific situations e.g. when wifi is off it enables it.
I would like to do same thing with cellular data. Unfortunately I can't find out what is the command for it. I tired somenmclicommands with no success.Question
Is there possibility to enable cellular data using terminal without
sudo?My Tries
1
nmcli device connect ril_0Error: Filed to add/activate new connection: Message recipient disconnected from message bus without replying2
nmcli connection up ifname ril_0Error: Connection activation filed: The device 'ril_0' has no connection available for activation3
When you typenmcli c showthe gsm is assigned to device field and it looks like something that shouldn't be shared in Internet
nmcli c up /xxxxxxxxxxxx/xxxxxError: connection activation filed: No suitable device found for this connection.4
nmcli monitorThen I clicked switch to enable cellular data, output:
ril_0: disconnected Networkmanager is now in the 'connecting state' ril_0: connecting (prepare) ril_0: using connection '/xxxxxxxxxx/xxxxx' rmnet0: device removed Connectivity is now 'full' '/xxxxxxxxxxxxxx/xxxxxx' is now primary connection Networkmanager is now in the 'connected' state ril_0: connectedSo how we can do all above steps manually?
Solution
here will be the solutionFirst post changelog
- 2020.08.21 - issue creation.
-
@BigB Hi, afaik NetworkManager doesn't manage cellular connection in UT, you should probably try with ofono / rild.
-
@Capsia said in [Question] How to enable cellular connection using terminal?:
ofono / rild
Hi, interesting too, my cell phone loses the connection to the cell network.
-
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