Reply
Thread Tools
Posts: 21 | Thanked: 7 times | Joined on Sep 2007 @ California
#11
thanks for your feedback.. and gettin on me about putting it out.. it was the first .deb i've ever made and first program ive written for the n800 so hey.. excuse me if i'm a little nervous ;p

yeah man, connecting automatically was my first thought.. but i couldnt get any answers, no one has really messed with this stuff from my estimation.. and maemo prefers to have the user actually select the access point they want.. go figure.. heh.. the os2008 version i make will probably be a little more in depth..

regular access points are no problem to connect to through programming, but i couldnt find any good way of it even noticing that the dummy access point was connect-to-able though, only ones it can scan for and find.. i dunno..

if you can, try to get multiple bluetooth devices in your general area, and see if it sets precedence for your Dash.. it should be ok.. but i really haven't tested that much
...

cheers
 
Posts: 9 | Thanked: 0 times | Joined on Nov 2007
#12
This is working fine on my Orange M3100 and N800 (OS2007) - Thanks

A couple of questions/points though if I may.

Perhaps I have misunderstood how this is supposed to work but, the way I would LIKE it to work is that I enter the BT Name/ID of the device I want to connect to and it connects to just that device.

I don't understand why you would want it to search for and connect to any device it finds?

ANyway - a great and promising piece of software - many thanks
 
Posts: 21 | Thanked: 7 times | Joined on Sep 2007 @ California
#13
the reason i made it scan for available devices is the level of user interaction required (i wanted to make it wife proof if you know what i mean :P), you would have to edit the program i wrote to add your MAC manually.. or i'd have to do alot more programming to have you enter it in when the program starts the first time.. much easier for the user to just click something and have it be good to go rather than going through a bunch of crap to get it to work, (which is what this program was supposed to eliminate in the first place..) but i understand your point

i figured if you guys tell me your bluetooth names i can add them to the list of names it attempts to connect to first, in effect it would always connect to your device first.. and be available for other users of your type of device..

also the likelyhood of multiple devices being present is probably pretty low unless you're in a geek conference or airport or something, most of the time we'll probably be by ourselves in the middle of nowhere essentially and just have ours available anyway.

the location of the script is /usr/bin/whitejack.rb and its pretty well commented so just look for the spot where i have the Whitejack_bt_names variable, and add yours to the list.. (add a comma and your bluetooth name in double quotes.) but i ask if its a default name, post it here and i'll add it to the deb so everyone can use it

oh another option is change your bluetooth name on your phone to "Whitejack" and it'll be on the top of the list.. dunno how much you guys care about your originality of bluetooth names ;p

thanks for the input and keep it coming, put this thing through the ringer and tell me what probs come up.. we'll fix em asap
 
Posts: 9 | Thanked: 0 times | Joined on Nov 2007
#14
Ok - with you now I think

I don't know about here you live, but around here I find multiple BT devices all the time. There are three in my own house for example! I went shopping today, sat in the middle of the town square, turned on my phones bluetooth and found 23 devices in a couple of minutes!!

A suggestion or two then.

1) Add a /etc/default/whitejack to reduce editing errors.
2) Allow users to add devicename to the default file.
3) Add flags to above to allow for searching/single device mode.

Last edited by mwright; 2007-12-13 at 20:24.
 
Posts: 21 | Thanked: 7 times | Joined on Sep 2007 @ California
#15
good idea, will do.. maybe this weekend
 
Posts: 37 | Thanked: 2 times | Joined on Dec 2007
#16
I am still having trouble. It would be really useful if someone could do a video or write up step by step directions on how to connect the Dash to the N810. I have tried the .cab file to correct the DUN issue and your solution here, with no success. I am sure it is that I am just too inexperienced to get it yet. Any assistance start to finish would be a wonderful Christmas gift !

Thanks !
 
Posts: 21 | Thanked: 7 times | Joined on Sep 2007 @ California
#17
hey bradkap.. sorry man.. its probably nothing you're doing wrong, i didn't write it for os2008 which is what your n810 runs, os2008 got rid of some tools that i used for the os2007 version, but i just upgraded to os2008 as well, so i'll try and get a new version slapped together quickly cuz i'm in the same boat as you :P.. xmas present indeed.. it wont be any kind of final version or anything but i'll get you on by sunday deal? ;p

p.s. that dun cab has nothing to do with pan.. if you installed that you might be able to do the dialup networking (DUN?) way just like most other phones but i dont know much about that.. all i know is internet sharing from my phone to my n800 through PAN (Personal Area Networking) doesnt show up on my bill except as regular traffic as if my i had been browsing on my phone.. which is great..
 
Posts: 37 | Thanked: 2 times | Joined on Dec 2007
#18
you are a gentleman and a scholar. I would like to use the PAN connection if possible. I am slow so when you get it set up, could you send detailed installation and set up instructions ? thanks, and merry christmas !
 
Posts: 29 | Thanked: 0 times | Joined on Sep 2007
#19
Originally Posted by bradkap View Post
you are a gentleman and a scholar.
I second that. Not to mention that I'm glad truent upgraded to OS2008 around the same time I did (-;
 
Posts: 21 | Thanked: 7 times | Joined on Sep 2007 @ California
#20
sorry this weekend was a lot more jampacked than i had thought.. i didnt get to work on it much.. not to mention with all the repo woes wasn't easy getting what i needed.. but here's what ive been using to get on myself,.. just a script i found in http://internettablettalk.com/forums...ad.php?t=12666

save the attached code to a file..
change the BTADDR variable to your MAC,
chmod a+x filename
turn on internet sharing on your phone
./filename
udhcpc -i bnep0



Code:
#!/bin/sh
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
        exec sudo gainroot <<EOF
exec $0 $*
EOF
        exit $?
fi
# real script follows

#BT MAC of PC/phone
BTADDR='00:xx:xx:xx:xx:xx'
#bluetooth name of PC/phone, not important, just for infoprints
BTNAME="PC"
#desired IP address of your tablet
IP=192.168.2.2
#default gateway - IP address of PC/phone
GW=192.168.2.1 
#DNS server
NS=10.6.101.1
# remote PAN role, one of NAP, GN
PAN_ROLE=GN 

infoprint(){
DBUS_SESSION_BUS_ADDRESS='unix:path=/tmp/session_bus_socket' dbus-send --session --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint "string:$*" &
}

dbus_method(){
local dest=$1
shift
DBUS_REPLY=$(dbus-send 2>&1 --system --type=method_call --print-reply --dest="$dest" $* )
}

dbus_result(){
echo $DBUS_REPLY | cut -d ' ' -f 7 | tr -d \"
}

find_connection(){
#find or create connection
if dbus_method org.bluez /org/bluez org.bluez.Manager.ActivateService string:network ; then
    NET_BUS=$(dbus_result)
#    echo destination $NET_BUS
    if dbus_method "${NET_BUS}" /org/bluez/network org.bluez.network.Manager.FindConnection string:"${BTADDR}" ; then
        CONN=$(dbus_result)
    else
        if dbus_method "${NET_BUS}" /org/bluez/network org.bluez.network.Manager.CreateConnection string:"${BTADDR}" string:"$PAN_ROLE" ; then
        CONN=$(dbus_result)
        fi
    fi
fi
}


bnep_start(){
#find_connection
if [ "$CONN" != "" ] ; then
echo connection $CONN
if dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.Connect ; then
    BNEPDEV=$(dbus_result)
    echo connected to $BNEPDEV
    ifconfig $BNEPDEV $IP up
    if route -n | grep -q '^0.0.0.0' ; then
        echo "default gateway already set, skipping GW and DNS setting"
    else
        route add default gw $GW
        echo "nameserver $NS" >/tmp/resolv.conf.lo
    fi
    [ -t 1 ] || infoprint "Connected to $BTNAME"
fi
fi
}

bnep_stop(){
#find_connection
if [ "$CONN" != "" ] ; then
echo connection $CONN
if dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.Disconnect ; then
echo "OK, bringing down"
echo -n '' >/tmp/resolv.conf.lo
[ -t 1 ] || infoprint "$BTNAME disconnected"
fi
fi
}

echo "Searching for $BTADDR ..."
[ -t 1 ] || infoprint "Searching for $BTADDR"
find_connection
if [ "$CONN" = "" ] ; then
    echo $DBUS_REPLY
    echo "Setting up connection to $BTADDR failed"
    [ -t 1 ] || infoprint "Connection to $BTADDR failed"
    exit
fi

COMMAND=$1
if [ "$COMMAND" = "" ] ; then
    dbus_method "${NET_BUS}" ${CONN} org.bluez.network.Connection.IsConnected
    if [ "$(dbus_result)" = "true" ] ; then
        COMMAND=stop
    else
        COMMAND=start
    fi
fi

case $COMMAND in
    start)      bnep_start ;;
    stop)       bnep_stop ;;
esac
sorry guys, i'll see what i can do this week.. but uhh.. merry xmas!
 
Reply


 
Forum Jump


All times are GMT. The time now is 04:40.