Created
March 4, 2011 05:04
-
-
Save stevz/854202 to your computer and use it in GitHub Desktop.
Blue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script para conectarse con tu movil via bluetooth a internet | |
CMDLN_ARGS="$@" | |
export CMDLN_ARGS | |
echo "Conexion por 3g usando Bluetooth" | |
dispositivo=`gdialog --inputbox "Ingrese nombre de su equipo" 2>&1` | |
if [ $UID -ne 0 ]; then | |
toor=`gdialog --msgbox "Ud no es root, favor ingrese el password" 2>&1` | |
PWD=`gdialog --inputbox "Ingrese password de root" 2>&1` | |
exec $PWD | sudo -s | |
exit | |
fi | |
rfcomm release 0 | |
MAC=$(hcitool scan | grep 'dispositivo' | awk '{print $1}') | |
canal=$(sdptool search --bdaddr $MAC DUN | grep Channel | awk '{print $2}') | |
rfcomm bind 0 $MAC $canal | |
wvdial nokia-bt & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment