View Single Post
Posts: 125 | Thanked: 1 time | Joined on Aug 2006
#6
This is my modified PAN script which originated from one of our wonderful members (but embarassed that I forget who and cannotgivethe proper kudos)

Just for the record, here is my PANUP script for the *770 to my blackjack *(which ICS must be enabled on--the process isn't well orchestrated for this entire setup)


Code:
#!/bin/sh
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11'
BTADDR='00:18:AF:95:15:6E'
IP=192.168.0.170
GW=192.168.0.1
NS=192.168.0.1
IFACE=bnep0

hciconfig hci0 up

#insmod just to be sure
insmod /mnt/initfs/lib/modules/current/bnep.ko
#start PAN Bluetooth connection
pand --connect $BTADDR

# wait for the interface created by pand
s=60
echo -n "Waiting $s secs for $IFACE"
while [ $s -gt 0 ] ; do
        ifconfig $IFACE >/dev/null 2>&1 && break
        s=$((s-1))
        echo -n "."
        sleep 1
done
echo
if ifconfig $IFACE >/dev/null 2>&1 ; then
# bring it up
echo "OK, bringing $IFACE up"
ifconfig $IFACE $IP up
route add default gw $GW
echo "nameserver $NS" >/tmp/resolv.conf.lo
else
    echo "Error: $IFACE not available."
fi
best I recall I had to rip the MAC and other junk from the phone (from a winxp pan connection to the Blackjack) and put it in the file.

Remeber, first you must create a dummy connection but this works well.

Last edited by Luna; 2007-05-10 at 16:34.