Skip to content

Instantly share code, notes, and snippets.

@stevz
Created March 4, 2011 05:04
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 stevz/854202 to your computer and use it in GitHub Desktop.
Save stevz/854202 to your computer and use it in GitHub Desktop.
Blue
#!/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