Created
March 5, 2011 06:25
-
-
Save stevz/856177 to your computer and use it in GitHub Desktop.
BT coneccion
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 | |
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