Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
BT coneccion
#!/bin/sh
# Script para conectarse con tu movil via bluetooth a internet
echo "Conexion por 3g usando Bluetooth"
DevNum=0
case $1 in
start)
dispositivo=`gdialog --inputbox "Ingrese nombre de su equipo" 2>&1`
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 &
;;
stop)
rfcomm release $DevNum
killall wvidial
;;
status)
rfcomm show $DevNum
/sbin/ifconfig ppp0 | grep addr
;;
*)
cat<<EOF
Forma de uso:
$0 [ start | stop | status ]
EOF
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment