Skip to content

Instantly share code, notes, and snippets.

@makiftasova
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makiftasova/63681e44e424c842331b to your computer and use it in GitHub Desktop.
Save makiftasova/63681e44e424c842331b to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
# Author: Mehmet Akif TAŞOVA <makiftasova@gmail.com>
# A simple shell script to unlock mobile broadband devices
# on linux systems.
# depends on mmcli utility.
if [ $# -eq 1 ] ; then
echo "device #$1 sims are:"
mmcli -m $1 | grep SIM
elif [ $# -eq 2 ] ; then
echo "please enter PIN to unlock device"
echo "usage: $0 $1 $2 [PIN_CODE]"
elif [ $# -ne 3 ] ; then
echo "usage: $0 [MODEM_CODE] [SIM_CODE] [PIN_CODE]"
echo "current devices are:"
mmcli -L
exit
else
mmcli -m $1 -i $2 --pin=$3
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment