Ubuntu cmd Modem Manager
mmcli - Ubuntu Command Line Modem Manager, how CooL is that!
- Installation:
sudo apt-get install modem-manager, this will also installmmclitool. - First find your modem id, the last digit modem/< int > is your modem number.
user@comp:~$ mmcli -L Found 1 modems: /org/freedesktop/ModemManager1/Modem/0 [huawei] E1731 - Type
mmcli --help-alland explore different options. - Check network signal and type with:
user@compu:~$ mmcli -m 0 --simple-status /org/freedesktop/ModemManager1/Modem/0 ------------------------- Status | state: 'connected' | signal quality: '77' (recent) | bands: 'unknown' | access tech: 'hspa' ------------------------- 3GPP | registration: 'roaming' | operator code: '40552' | operator name: 'TATA DOCOMO' | subscription: 'unknown' - Enter
mmcli -m 0to get the full information about your modem and network. - You can even send SMS through it. Refer:
mmcli -m 0 --help-sms - Though I was not able to place a call or receive a call through it.
- USSD numbers can also be dialed with command line, infact you can create a script to check you balance, in 2-3 lines :)
user@compu:~$ mmcli -m 0 --3gpp-ussd- --3gpp-ussd-cancel --3gpp-ussd-initiate= --3gpp-ussd-respond= --3gpp-ussd-status user@compu:~$ mmcli -m 0 --3gpp-ussd-initiate=*111*1# USSD session initiated; new reply from network: ' Loc-STD-Roam:239 Min for the day. Validity 24/03/2018 Daily DATA Bal:929.94MB validity 24/03/2018. More *111*2#.RC32=1GB 28 Din, RC349=Unlmited L+S+Roam+SMS + # More' user@compu:~$ mmcli -m 0 --3gpp-ussd-respond=# response successfully sent in USSD session; new reply from network: '1.4GB/Day 56Din, TnC' user@compu:~$ mmcli -m 0 --3gpp-ussd-status /org/freedesktop/ModemManager1/Modem/0 ---------------------------- USSD | status: 'idle' | network request: 'none' | network notification: 'Data Session Charge:Rs 0. Bal Rs.1.26. Vol Used :0.11 MB. Data left: 937 MB. Val :24/03/2018.'
Written on February 28, 2018
